MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / test_create_unit_square_hex

Function test_create_unit_square_hex

python/test/unit/mesh/test_mesh.py:302–308  ·  view source on GitHub ↗
(comm, dtype)

Source from the content-addressed store, hash-verified

300@pytest.mark.parametrize("dtype", [np.float32, np.float64])
301@pytest.mark.parametrize("comm", [MPI.COMM_SELF, MPI.COMM_WORLD])
302def test_create_unit_square_hex(comm, dtype):
303 mesh = create_unit_cube(comm, 5, 7, 9, CellType.hexahedron, dtype=dtype)
304 assert mesh.topology.index_map(0).size_global == 480
305 assert mesh.topology.index_map(3).size_global == 315
306 assert mesh.geometry.dim == 3
307 assert mesh.comm.allreduce(mesh.topology.index_map(0).size_local, MPI.SUM) == 480
308 assert mesh.geometry.x.dtype == dtype
309
310
311def test_create_box_prism():

Callers

nothing calls this directly

Calls 2

create_unit_cubeFunction · 0.90
index_mapMethod · 0.45

Tested by

no test coverage detected