From 849dc77278f35f79ebf17db003de65bb1a6757d5 Mon Sep 17 00:00:00 2001 From: Arved Enders-Seidlitz Date: Tue, 3 Aug 2021 09:52:52 +0200 Subject: [PATCH] bugfix elmerkw.py, black --- CHANGES.txt | 3 +++ examples/2D_heat_transfer/heat_transfer_2d.py | 2 +- pyelmer/elmer.py | 1 + pyelmer/elmerkw.py | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 36f96f3..f0b0e02 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +v0.3.1 +- Bugfix in elmerkw + v0.3.0 - Removed solver specific keywords. For backward compatibility the new module elmerkw was added (usage: import pyelmer.elmerkw as elmer). - Moved data to examples, it's not shipped with the package any longer. diff --git a/examples/2D_heat_transfer/heat_transfer_2d.py b/examples/2D_heat_transfer/heat_transfer_2d.py index 87e6495..a7c8341 100644 --- a/examples/2D_heat_transfer/heat_transfer_2d.py +++ b/examples/2D_heat_transfer/heat_transfer_2d.py @@ -54,7 +54,7 @@ ############### # elmer setup -elmer.data_dir="./data" +elmer.data_dir = "./data" sim = elmer.load_simulation("2D_steady") diff --git a/pyelmer/elmer.py b/pyelmer/elmer.py index 3e4801e..5327197 100644 --- a/pyelmer/elmer.py +++ b/pyelmer/elmer.py @@ -12,6 +12,7 @@ data_dir = "./" + class Simulation: """Main wrapper for the sif file. The simulation class is used to collect all information. diff --git a/pyelmer/elmerkw.py b/pyelmer/elmerkw.py index e282584..6c8bdd8 100644 --- a/pyelmer/elmerkw.py +++ b/pyelmer/elmerkw.py @@ -21,7 +21,7 @@ class Boundary(elmer.Boundary): """Wrapper for boundaries in sif-file.""" - def __init__(self, simulation, name, geo_ids=[]): + def __init__(self, simulation, name, geo_ids=None): """Create boundary object. Args: @@ -126,7 +126,7 @@ def get_data(self): class BodyForce(elmer.BodyForce): """Wrapper for body forces in sif-file.""" - def __init__(self, simulation, name, data): + def __init__(self, simulation, name, data=None): """Create body force object. Args: