Skip to content

Commit

Permalink
fixes specific body force
Browse files Browse the repository at this point in the history
  • Loading branch information
joergbuchwald committed Jun 24, 2024
1 parent 00bdee5 commit ebdf5cd
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions ogs6py/classes/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,19 @@ def set_process(self, **args):
self.populate_tree(self.process_baseentries["darcy_gravity"],
"g",text = str(entry))
if "specific_body_force" in args:
self.populate_tree(self.process, "specific_body_force", text=" ".join(str(x) for x in args['specific_body_force']))
if isinstance(args["specific_body_force"], list):
self.populate_tree(self.process, "specific_body_force",
text=" ".join(str(x) for x in args['specific_body_force']))
else:
self.populate_tree(self.process, "specific_body_force",
text=args["specific_body_force"])
for key, value in args.items():
if isinstance(value, str):
self.populate_tree(self.process, key, text=value)
if key not in ["darcy_gravity", "specific_body_force"]:
if isinstance(value, str):
self.populate_tree(self.process, key, text=value)
else:
raise RuntimeError(f"{key} is not of type string")



def set_constitutive_relation(self, **args):
Expand Down

0 comments on commit ebdf5cd

Please sign in to comment.