OpenPisco.Unstructured.MmgMesher module#

OpenPisco.Unstructured.MmgMesher.Add_ElemTagsTo2DMesh(mesh)[source]#
OpenPisco.Unstructured.MmgMesher.Add_ElemTagsToMesh(mesh)[source]#
OpenPisco.Unstructured.MmgMesher.Add_NodalTagsToMesh(mesh)[source]#
OpenPisco.Unstructured.MmgMesher.AssertNoRegressionRefToTags(vanillaMesh, originalMesh, refBridge)[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity(GUI=False)[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_2DTagsToRefToTagsNoRemesh()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_3DTagsToRefToTagsNoRemesh()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_Adaptation()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_LevelSetRemeshingWithLocalParams()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_LevelSetRemeshingWithMetric()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_LevelSetRemeshingWithTwoMaterials()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_NodalTagsToRefToTagsWithRemesh()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_SetPhiZeroOnBoundary()[source]#
OpenPisco.Unstructured.MmgMesher.CheckIntegrity_mmg()[source]#
OpenPisco.Unstructured.MmgMesher.CleanNodalTagsOnIso(mesh, phi, iso=0.0)[source]#
OpenPisco.Unstructured.MmgMesher.ComputeDistanceField(nmesh, surf, computeDistanceWith='muscat')[source]#
OpenPisco.Unstructured.MmgMesher.Define_2DTestMesh()[source]#
OpenPisco.Unstructured.MmgMesher.Define_3DTestMesh()[source]#
OpenPisco.Unstructured.MmgMesher.GetIsoZeroSurface(nmesh, interfaceZoneName, skinTags=['Skin'], setPhiZeroOnBoundary=False)[source]#
OpenPisco.Unstructured.MmgMesher.MmgAvailable()[source]#
class OpenPisco.Unstructured.MmgMesher.MmgMesher[source]#

Bases: AppExecutableBase

File-exchange-based interface to the Mmg remeshing tool.

DeleteGeneratedFiles()[source]#
GenerateMesh(ops)[source]#
GetNewMesh(keepRefsFields=False)[source]#
GetParamExtention()[source]#
SetRemeshWithIso(val=True)[source]#
SetSupport(_support: Mesh, writeTopoZones=False)[source]#
WriteInputParametersFile(opts)[source]#
WriteLSReferencesMap()[source]#

LSReferences nregions

ref minus plus …

nregions (int) : number of regions ref (int) : reference number minus,plus (int) : reference numbers after level set split (negative and positive respectively)

https://www.mmgtools.org/parameter-file

WriteLevelSet(levelset)[source]#
WriteLocalRemeshingParams(opts)[source]#

Parameters nregions ref keyword hmin hmax hauds …

nregions (int) : number of regions ref (int) : reference number keyword (str) : Triangles/Tetrahedra hmin, hmax, hausd (floats): local remeshing parameters in rgion labeled with ref

NB When local parameters are assignes in level set mode we need to write the references numbers after split

https://www.mmgtools.org/parameter-file

WriteMetricField()[source]#
WriteSupport()[source]#
OpenPisco.Unstructured.MmgMesher.MmgMesherActionAddRidges(levelset, options={})[source]#
OpenPisco.Unstructured.MmgMesher.MmgMesherActionLevelset(levelset, child)[source]#

iso : iso surface to mesh (0.0) hmin : Minimal edge size hmax : Maximal edge size hsiz : Constant edge size rmc : Remove connected components smaller than a given threshold ar : Value for angle detection hausd: Maximal Hausdorff distance for the boundaries approximation nr : No angle detection computeDistanceWith (Muscat/meshdist/vtk) : update signed distance function using Muscat/meshdist/vtk keepGeneratedFiles : keep files generated during remeshing met : use isotropic metric field ‘met’ to drive the remeshing The metric field has to be calculated before calling this function and stored in levelset.support.nodeFields[“met”]

OpenPisco.Unstructured.MmgMesher.MmgMesherActionRemesh(support, child)[source]#
class OpenPisco.Unstructured.MmgMesher.TagsRefsBridge[source]#

Bases: object

Class to convert the tag names to reference for mmg3D

PrepareMeshTagsForPartitionRefining(mesh, cellType)[source]#
RebuildElemTagsFromRef(mesh, newElemRefNumber)[source]#
RebuildNodalTagsFromRef(mesh, newNodalRefNumber)[source]#
RefsToTags(mesh, keepRefsFields=False)[source]#
Reset()[source]#
TagsToRefs(mesh: Mesh)[source]#