From a518200d7cbe59b151542634d20f7453a2d37135 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 17 Dec 2024 15:58:57 +0100 Subject: [PATCH] Update test_mechanics.py --- tests/test_mechanics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_mechanics.py b/tests/test_mechanics.py index be3fc877..6b5e0072 100644 --- a/tests/test_mechanics.py +++ b/tests/test_mechanics.py @@ -293,7 +293,7 @@ def test_solidbody_incompressible(): assert np.allclose(t1, t2) -def test_solidbody_axi(): +def test_solidbody_axi_incompressible(): umat, u = pre_axi(bulk=None) b = fem.SolidBodyNearlyIncompressible(umat=umat, field=u, bulk=5000) b = fem.SolidBodyNearlyIncompressible( @@ -338,7 +338,7 @@ def test_solidbody_axi(): assert np.allclose(t1, t2) -def test_solidbody_axi_incompressible(): +def test_solidbody_axi(): umat, u = pre_axi() b = fem.SolidBody(umat=umat, field=u) @@ -351,6 +351,9 @@ def test_solidbody_axi_incompressible(): r2 = b.assemble.vector(**kwargs) assert np.allclose(r1.toarray(), r2.toarray()) + r3 = b.assemble.vector(**kwargs, block=False, apply=sum) + assert np.allclose(r1.toarray(), r3.toarray()) + K1 = b.assemble.matrix(u, **kwargs) assert K1.shape == (18, 18)