Skip to content

Added First Implementation of BH Curves. At this time Temperature dep… #637

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

Merged
merged 13 commits into from
Dec 10, 2021

Conversation

maxcapodi78
Copy link
Collaborator

…endance is not implemented

@maxcapodi78
Copy link
Collaborator Author

@beliaev-maksim I've created a new branch and created a new PR

@@ -232,6 +232,12 @@ def __init__(self, material, name, val=None, thermalmodifier=None):
elif val is not None and val["property_type"] == "AnisoProperty":
self.type = "anisotropic"
self.value = [val["component1"], val["component2"], val["component3"]]
elif val is not None and val["property_type"] == "nonlinear":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
elif val is not None and val["property_type"] == "nonlinear":
elif val["property_type"] == "nonlinear":

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@MaxJPRey I cannot commit this modification. If val is None then it would fail in looking for "property_type". So I need first to check that val is filled and then search for the type

Copy link
Collaborator

@MaxJPRey MaxJPRey Dec 9, 2021

Choose a reason for hiding this comment

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

Yes you are write, it would require a try/except block to prevent from that and raise an exception.

Copy link
Contributor

Choose a reason for hiding this comment

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

try/except is more expensive when it raises compared to type check

@MaxJPRey
Copy link
Collaborator

MaxJPRey commented Dec 9, 2021

Approved with suggestion..

@maxcapodi78 maxcapodi78 merged commit 6c1f605 into main Dec 10, 2021
@maxcapodi78 maxcapodi78 deleted the Enhancement/BHCurves2 branch December 10, 2021 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants