(mesh2d)
| 70 | |
| 71 | |
| 72 | def test_SymDevMatrixValuedL2(mesh2d): |
| 73 | mesh = mesh2d |
| 74 | space = MatrixValued(L2(mesh, order=2), dim=3, symmetric=True, deviatoric=True) |
| 75 | |
| 76 | def _expr(x, y): |
| 77 | return ((6 * x**2 + 4 * y**2, y**1 - 1.5 * x**2, y**2 - 1.5 * x**2), |
| 78 | (y**1 - 1.5 * x**2, 1 * x**2 - 5 * y**2 + 3*x*y, 0), |
| 79 | (y**2 - 1.5 * x**2, 0, -7 * x**2 + 1 * y**2 - 3*x*y)) |
| 80 | |
| 81 | def _check(gf): |
| 82 | return np.allclose(gf(mesh(0.5, 0.5)), np.array(_expr(0.5, 0.5)).flatten(), atol=1e-10, rtol=1e-10) |
| 83 | |
| 84 | _test_interpolation(space, _expr(x, y), _check) |
| 85 | |
| 86 | |
| 87 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected