Fem: Add missing Gmsh 2D algorithm (Quasi-structured Quad)

This commit is contained in:
FEA-eng
2024-07-28 19:18:28 -03:00
committed by marioalexis
parent 8cb42f8d59
commit 06207c0707
2 changed files with 8 additions and 2 deletions

View File

@@ -101,6 +101,8 @@ class GmshTools:
self.algorithm2D = "8"
elif algo2D == "Packing Parallelograms":
self.algorithm2D = "9"
elif algo2D == "Quasi-structured Quad":
self.algorithm2D = "11"
else:
self.algorithm2D = "2"
@@ -839,7 +841,7 @@ class GmshTools:
)
geo.write(
"// 2D mesh algorithm (1=MeshAdapt, 2=Automatic, "
"5=Delaunay, 6=Frontal, 7=BAMG, 8=DelQuad, 9=Packing Parallelograms)\n"
"5=Delaunay, 6=Frontal, 7=BAMG, 8=DelQuad, 9=Packing Parallelograms, 11=Quasi-structured Quad)\n"
)
if len(self.bl_setting_list) and self.dimension == 3:
geo.write("Mesh.Algorithm = " + "DelQuad" + ";\n") # Frontal/DelQuad are tested

View File

@@ -230,6 +230,7 @@ class MeshGmsh(base_fempythonobject.BaseFemPythonObject):
"BAMG",
"DelQuad",
"Packing Parallelograms",
"Quasi-structured Quad",
],
)
)
@@ -276,7 +277,10 @@ class MeshGmsh(base_fempythonobject.BaseFemPythonObject):
for prop in self._get_properties():
try:
obj.getPropertyByName(prop.name)
if prop.name == "Algorithm3D":
if prop.name == "Algorithm2D":
# refresh the list of known 2D algorithms
obj.Algorithm2D = prop.value
elif prop.name == "Algorithm3D":
# refresh the list of known 3D algorithms
obj.Algorithm3D = prop.value
elif prop.name == "HighOrderOptimize":