Skip to content

Commit 14f58e0

Browse files
Fix dtype in interpolation test (#4092)
* Fix dtype * Consistent dtypes
1 parent 99b4604 commit 14f58e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/test/unit/fem/test_interpolation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ def test_submesh_interpolation_mapped(ghost_mode):
11581158
comm = MPI.COMM_WORLD
11591159

11601160
N = 8
1161-
domain = create_unit_cube(comm, N, N, N, ghost_mode=ghost_mode)
1161+
domain = create_unit_cube(comm, N, N, N, ghost_mode=ghost_mode, dtype=default_real_type)
11621162
tdim = domain.topology.dim
11631163

11641164
eps = 50 * np.finfo(domain.geometry.x.dtype).eps
@@ -1173,7 +1173,7 @@ def test_submesh_interpolation_mapped(ghost_mode):
11731173
parent_cells = sub_to_parent.sub_topology_to_topology(smsh_cells, inverse=False)
11741174

11751175
degree = 1
1176-
el = element("N1curl", domain.basix_cell(), degree)
1176+
el = element("N1curl", domain.basix_cell(), degree, dtype=default_real_type)
11771177

11781178
V = functionspace(domain, el)
11791179
V_sub = functionspace(submesh, el)
@@ -1182,7 +1182,7 @@ def test_submesh_interpolation_mapped(ghost_mode):
11821182
u_sub = Function(V_sub)
11831183

11841184
def f(x):
1185-
vals = np.zeros((domain.geometry.dim, x.shape[1]), dtype=np.float64)
1185+
vals = np.zeros((domain.geometry.dim, x.shape[1]), dtype=default_scalar_type)
11861186
vals[0, :] = x[0, :] * np.cos(np.pi * x[1, :])
11871187
return vals
11881188

0 commit comments

Comments
 (0)