MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / test_SymMatrixValuedL2

Function test_SymMatrixValuedL2

tests/pytest/test_interpolate.py:58–69  ·  view source on GitHub ↗
(mesh2d)

Source from the content-addressed store, hash-verified

56
57
58def test_SymMatrixValuedL2(mesh2d):
59 mesh = mesh2d
60 space = MatrixValued(L2(mesh, order=2), dim=2, symmetric=True)
61
62 def _expr(x, y):
63 return ((6 * x**2 + 4 * y**2, y**1 - 1.5 * x**2),
64 (y**1 - 1.5 * x**2, y**2 - 1.5 * x**1))
65
66 def _check(gf):
67 return np.allclose(gf(mesh(0.5, 0.5)), np.array(_expr(0.5, 0.5)).flatten(), atol=1e-10, rtol=1e-10)
68
69 _test_interpolation(space, _expr(x, y), _check)
70
71
72def test_SymDevMatrixValuedL2(mesh2d):

Callers

nothing calls this directly

Calls 2

_test_interpolationFunction · 0.85
_exprFunction · 0.85

Tested by

no test coverage detected