Skip to content

Fix wrong result of ConstitutiveMaterial.plot() if any stretch <= 0#872

Merged
adtzlr merged 1 commit into
mainfrom
fix-umat-plot-nonphysical-stretch
Oct 25, 2024
Merged

Fix wrong result of ConstitutiveMaterial.plot() if any stretch <= 0#872
adtzlr merged 1 commit into
mainfrom
fix-umat-plot-nonphysical-stretch

Conversation

@adtzlr

@adtzlr adtzlr commented Oct 25, 2024

Copy link
Copy Markdown
Owner

this raises an error now to avoid the wrong results.

fixes #852

>>> import felupe as fem
>>> 
>>> umat = fem.LinearElastic(E=1, nu=0.3)
>>> x = fem.math.linsteps([1, 0], num=50)
>>> ax = umat.plot(ux=x, bx=x, ps=x)
...
ValueError: All stretches must greater than 0.

this raises an error now to avoid the wrong results
@adtzlr adtzlr added the bug Something isn't working label Oct 25, 2024
@adtzlr adtzlr self-assigned this Oct 25, 2024
@codecov

codecov Bot commented Oct 25, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.54%. Comparing base (6704ed0) to head (3ab32a5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #872   +/-   ##
=======================================
  Coverage   97.54%   97.54%           
=======================================
  Files         149      149           
  Lines        5739     5749   +10     
=======================================
+ Hits         5598     5608   +10     
  Misses        141      141           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adtzlr adtzlr merged commit 9e07aa8 into main Oct 25, 2024
@adtzlr adtzlr deleted the fix-umat-plot-nonphysical-stretch branch October 25, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong result of umat.plot() for LinearElastic with stretches ≤ 0

1 participant