Skip to content

Commit

Permalink
FEM: gmsh, add linear nodes interpolation parameter (thanks to _UR)
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and wwmayer committed Dec 17, 2019
1 parent 6af98e0 commit 0935a6b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Mod/Fem/femmesh/gmshtools.py
Expand Up @@ -757,6 +757,16 @@ def write_geo(self):
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
Expand Down
8 changes: 8 additions & 0 deletions src/Mod/Fem/femobjects/_FemMeshGmsh.py
Expand Up @@ -174,6 +174,14 @@ def __init__(self, obj):
)
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",
Expand Down

0 comments on commit 0935a6b

Please sign in to comment.