def test_cell_facet_jacobian_horiz(cell, cell_facet_jacobian): dim = cell.get_spatial_dimension() actual = make_cell_facet_jacobian(cell, (dim - 1, 0), 0) # bottom facet assert np.allclose(np.reshape(cell_facet_jacobian, actual.shape), actual) actual = make_cell_facet_jacobian(cell, (dim - 1, 0), 1) # top facet assert np.allclose(np.reshape(cell_facet_jacobian, actual.shape), actual)
def test_cell_facet_jacobian_vert(cell, cell_facet_jacobian): dim = cell.get_spatial_dimension() vert_dim = (dim - 2, 1) for facet_number in range(len(cell.get_topology()[vert_dim])): actual = make_cell_facet_jacobian(cell, vert_dim, facet_number) expected = np.reshape(cell_facet_jacobian[facet_number], actual.shape) assert np.allclose(expected, actual)