Exemple #1
0
def test_L2_interp_grid():
    domain = setupStepGauss()
    mesh = InterpolatedBathymetryMesh(domain,triangleOptions="gVApq30Dena%8.8f" % (0.5**3,),atol=1.0e-1,rtol=1.0e-1,maxLevels=25,maxNodes=50000,
                                      bathyType="grid",bathyAssignmentScheme="interpolation",errorNormType="L2")
    archive = XdmfArchive(dataDir='.',filename="interpolatedBathySimpleTest_grid_L2_interp_", global_sync=False)
    archive.domain = ElementTree.SubElement(archive.tree.getroot(),"Domain")
    mesh.meshList[-1].writeMeshXdmf(ar=archive,init=True)
    archive.sync(); archive.close()
Exemple #2
0
 def test_L1(self):
     domain = self.setupStepGauss()
     mesh = InterpolatedBathymetryMesh(domain,
                                       triangleOptions="gVApq30Dena%8.8f" % (0.5**3,),
                                       atol=1.0e-1,
                                       rtol=1.0e-1,
                                       maxLevels=25,
                                       maxNodes=50000,
                                       bathyType="points",
                                       bathyAssignmentScheme="localAveraging",errorNormType="L1")
     outfile = "interpolatedBathySimpleTest_L1_"
     archive = XdmfArchive(dataDir='.',filename = outfile, global_sync=False)
     archive.domain = ElementTree.SubElement(archive.tree.getroot(),"Domain")
     mesh.meshList[-1].writeMeshXdmf(ar=archive,init=True)
     archive.sync(); archive.close()
     self.aux_names.append(outfile)
def test_Linfty():
    domain = setupStepGauss()
    mesh = InterpolatedBathymetryMesh(domain,
                                      triangleOptions="gVApq30Dena%8.8f" %
                                      (0.5**3, ),
                                      atol=1.0e-3,
                                      rtol=1.0e-3,
                                      maxLevels=25,
                                      maxNodes=50000,
                                      bathyType="points",
                                      bathyAssignmentScheme="localAveraging",
                                      errorNormType="Linfty")
    archive = XdmfArchive(dataDir='.',
                          filename="interpolatedBathySimpleTest_Linfty_")
    archive.domain = ElementTree.SubElement(archive.tree.getroot(), "Domain")
    mesh.meshList[-1].writeMeshXdmf(ar=archive, init=True)
    archive.sync()
    archive.close()
Exemple #4
0
def test_L2_interp_grid():
    domain = setupStepGauss()
    mesh = InterpolatedBathymetryMesh(domain,
                                      triangleOptions="gVApq30Dena%8.8f" %
                                      (0.5**3, ),
                                      atol=1.0e-1,
                                      rtol=1.0e-1,
                                      maxLevels=25,
                                      maxNodes=50000,
                                      bathyType="grid",
                                      bathyAssignmentScheme="interpolation",
                                      errorNormType="L2")
    archive = XdmfArchive(
        dataDir='.',
        filename="interpolatedBathySimpleTest_grid_L2_interp_",
        global_sync=False)
    archive.domain = ElementTree.SubElement(archive.tree.getroot(), "Domain")
    mesh.meshList[-1].writeMeshXdmf(ar=archive, init=True)
    archive.sync()
    archive.close()