Skip to content

Commit

Permalink
FEM: gmsh, new interpolation parameter, add missing code (thanks to _UR)
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Dec 17, 2019
1 parent 57bfc2e commit e7be69e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/Mod/Fem/femmesh/gmshtools.py
Expand Up @@ -723,6 +723,17 @@ def write_geo(self):
geo.write("\n")
geo.write("// mesh order\n")
geo.write("Mesh.ElementOrder = " + self.order + ";\n")
if self.order == "2":
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")

geo.write(
Expand Down Expand Up @@ -757,16 +768,6 @@ 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

0 comments on commit e7be69e

Please sign in to comment.