Skip to content

Commit

Permalink
update tests for enhanced area-change
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Apr 20, 2022
1 parent b6e9f9f commit cd7a6dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/test_constitution.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ def test_linear_planestrain():
def test_kinematics():
r, F = pre(sym=False, add_identity=True)

N = F[:, 0]

for parallel in [False, True]:

lc = fe.constitution.LineChange(parallel=parallel)
Expand All @@ -206,6 +208,9 @@ def test_kinematics():
xf = lc.function(F)
xg = lc.gradient(F)

Yf = ac.function(F, N)
Yg = ac.gradient(F, N)

yf = ac.function(F)
yg = ac.gradient(F)

Expand All @@ -221,6 +226,9 @@ def test_kinematics():
assert yf.shape == (3, 3, *F.shape[-2:])
assert yg.shape == (3, 3, 3, 3, *F.shape[-2:])

assert Yf.shape == (3, *F.shape[-2:])
assert Yg.shape == (3, 3, 3, *F.shape[-2:])

assert zf.shape == F.shape[-2:]
assert zg.shape == (3, 3, *F.shape[-2:])
assert zh.shape == (3, 3, 3, 3, *F.shape[-2:])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_region():
r = fe.RegionQuad(mesh)
r = fe.RegionQuadBoundary(mesh)
r = fe.RegionConstantQuad(mesh)

mesh.cell_type = "some_fancy_cell_type"
with pytest.raises(NotImplementedError):
r = fe.RegionBoundary(mesh, fe.Quad(), fe.GaussLegendreBoundary(order=1, dim=2))
Expand Down

0 comments on commit cd7a6dd

Please sign in to comment.