Skip to content

Commit

Permalink
add intro_text property to Simulation class
Browse files Browse the repository at this point in the history
  • Loading branch information
arvedes committed Jan 5, 2022
1 parent f79176c commit 394ced1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v0.3.3
- add intro_text property for parameter definitions to Simulation class

v0.3.2
- Bugfix elmerkw

Expand Down
4 changes: 4 additions & 0 deletions pyelmer/elmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Simulation:
"""

def __init__(self):
self.intro_text = ""
self.materials = {}
self.bodies = {}
self.boundaries = {}
Expand All @@ -38,6 +39,9 @@ def write_sif(self, simulation_dir):
"""
self._set_ids()
with open(simulation_dir + "/case.sif", "w") as f:
if self.intro_text != "":
f.write(self.intro_text)
f.write("\n\n")
f.write("""Header\n CHECK KEYWORDS "Warn"\n Mesh DB "." "."\nEnd\n\n""")
f.write("Simulation\n")
f.write(self._dict_to_str(self.settings))
Expand Down

0 comments on commit 394ced1

Please sign in to comment.