Skip to content

Commit

Permalink
SemiAffineFiberMaterial accept also "None" as a string
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerum committed Dec 18, 2023
1 parent c7fd429 commit 389bf30
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions saenopy/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ class SemiAffineFiberMaterial(Material, Saveable):

def __init__(self, k, d_0=None, lambda_s=None, d_s=None):
super().__init__()
if d_0 == "None":
d_0 = None
if lambda_s == "None":
lambda_s = None
if d_s == "None":
d_s = None
# parameters
self.k = k
self.d_0 = d_0 if d_0 is not None and d_0 >= 0 else None
Expand Down

0 comments on commit 389bf30

Please sign in to comment.