Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transport and thermo element sections for full mesh import #207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions meshpy/inputfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,7 @@ class InputFile(Mesh):
skip_sections = [
"ALE ELEMENTS",
"LUBRICATION ELEMENTS",
"TRANSPORT ELEMENTS",
"TRANSPORT2 ELEMENTS",
"THERMO ELEMENTS",
"ACOUSTIC ELEMENTS",
"CELL ELEMENTS",
"CELLSCATRA ELEMENTS",
Expand Down Expand Up @@ -593,6 +591,18 @@ def add_line(self_list, line):
self.elements.append(Element.from_dat(line))
else:
add_line(self.dat_elements, line)
elif section_name == "THERMO ELEMENTS":
for line in section_data_comment:
if mpy.import_mesh_full:
self.elements.append(Element.from_dat(line))
else:
add_line(self.dat_elements, line)
elif section_name == "TRANSPORT ELEMENTS":
for line in section_data_comment:
if mpy.import_mesh_full:
self.elements.append(Element.from_dat(line))
else:
add_line(self.dat_elements, line)
Comment on lines +594 to +605
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this works? Won't these elements end up in the STRUCTURE ELEMENTS section?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a test case would help to see that 😉

elif section_name == "FLUID ELEMENTS":
for line in section_data_comment:
if mpy.import_mesh_full:
Expand Down
Loading