Fem: Update body heat source element getter for CalculiX

This commit is contained in:
marioalexis
2025-08-29 04:36:35 -03:00
parent a907b60561
commit 98e8704e79
2 changed files with 23 additions and 12 deletions

View File

@@ -58,12 +58,12 @@ def get_after_write_constraint():
def write_meshdata_constraint(f, femobj, bodyheatsource_obj, ccxwriter):
f.write(f"*ELSET,ELSET={bodyheatsource_obj.Name}\n")
if isinstance(femobj["FEMElements"], str):
f.write("{}\n".format(femobj["FEMElements"]))
else:
for e in femobj["FEMElements"]:
f.write(f"{e},\n")
for refs, surf, is_sub_el in femobj["BodyHeatSourceElements"]:
if not is_sub_el:
for elem in surf:
f.write(f"{elem},\n")
def write_constraint(f, femobj, bodyheatsource_obj, ccxwriter):