Skip to content

Commit

Permalink
Test value error in umat.plot()
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Nov 16, 2024
1 parent a62aa3b commit ccabd1f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_constitution.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,17 @@ def neo_hooke(C, mu=1):
ax = umat.plot(incompressible=incompressible)
ax = umat.screenshot(incompressible=incompressible)

umat = fem.Hyperelastic(fem.neo_hooke, mu=np.nan)

with pytest.raises(ValueError):
umat.plot(bx=None, ps=None)

with pytest.raises(ValueError):
umat.plot(ux=None, bx=None)

with pytest.raises(ValueError):
umat.plot(ux=None, ps=None)


def test_umat_hyperelastic2():
r, x = pre(sym=False, add_identity=True, add_random=True)
Expand Down

0 comments on commit ccabd1f

Please sign in to comment.