Skip to content
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

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

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

adtzlr
Copy link
Owner

@adtzlr adtzlr commented Oct 25, 2024

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
Copy link

codecov bot commented Oct 25, 2024

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
8 checks passed
@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