FEM: gmsh, add linear nodes interpolation parameter (thanks to _UR)

This commit is contained in:
Bernd Hahnebach
2019-12-17 05:44:46 +01:00
committed by wwmayer
parent 508412ee41
commit d01997c172
2 changed files with 18 additions and 0 deletions

View File

@@ -757,6 +757,16 @@ class GmshTools():
geo.write("Coherence Mesh; // Remove duplicate vertices\n")
else:
geo.write("Mesh " + self.dimension + ";\n")
if hasattr(self.mesh_obj, "SecondOrderLinear") and self.mesh_obj.SecondOrderLinear is True:
geo.write(
"Mesh.SecondOrderLinear = 1; // Second order nodes are created "
"by linear interpolation instead by curvilinear\n"
)
else:
geo.write(
"Mesh.SecondOrderLinear = 0; // Second order nodes are created "
"by linear interpolation instead by curvilinear\n"
)
geo.write("\n")
# save mesh

View File

@@ -174,6 +174,14 @@ class _FemMeshGmsh():
)
obj.GeometryTolerance = 1e-06
obj.addProperty(
"App::PropertyBool",
"SecondOrderLinear",
"FEM Gmsh Mesh Params",
"Second order nodes are created by linear interpolation"
)
obj.SecondOrderLinear = True
obj.addProperty(
"App::PropertyEnumeration",
"Algorithm2D",