Fem: Allow only one shape type per mesh group - Partially revert #16076

This commit is contained in:
marioalexis
2024-09-07 08:24:27 -03:00
committed by Chris Hennes
parent 83c846e411
commit 1ff2e0a876
3 changed files with 8 additions and 11 deletions

View File

@@ -363,10 +363,7 @@ class GmshTools:
Console.PrintMessage(" " + self.gmsh_bin + "\n")
def get_group_data(self):
# TODO: solids, faces, edges and vertexes don't seem to work together in one group,
# some output message or make them work together
# mesh group objects
# mesh group objects. Only one shape type is expected
if not self.mesh_obj.MeshGroupList:
# print(" No mesh group objects.")
pass
@@ -674,9 +671,8 @@ class GmshTools:
for phys in ele:
if ele[phys]:
name = group + "_{}".format(phys)
items = "{" + ", ".join(ele[phys]) + "}"
geo.write('Physical {}("{}") = {};\n'.format(phys, name, items))
geo.write('Physical {}("{}") = {};\n'.format(phys, group, items))
geo.write("\n")

View File

@@ -64,8 +64,9 @@ class _TaskPanel(base_femtaskpanel._BaseTaskPanel):
# geometry selection widget
# start with Solid in list!
# only one shape type is allowed
self.selectionWidget = selection_widgets.GeometryElementsSelection(
obj.References, ["Solid", "Face", "Edge", "Vertex"], True, False
obj.References, ["Solid", "Face", "Edge", "Vertex"], False, False
)
# form made from param and selection widget

View File

@@ -7,10 +7,10 @@ General.NumThreads = X;
Merge "tmp0TVZbM.brep";
// group data
Physical Surface("Face1_Surface") = {1};
Physical Surface("Face2_Surface") = {2};
Physical Surface("Face6_Surface") = {6};
Physical Volume("Solid1_Volume") = {1};
Physical Surface("Face1") = {1};
Physical Surface("Face2") = {2};
Physical Surface("Face6") = {6};
Physical Volume("Solid1") = {1};
// Characteristic Length
// no boundary layer settings for this mesh