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

Function test_create_unit_cube

python/test/unit/mesh/test_mesh.py:279–286  ·  view source on GitHub ↗

Create mesh of unit cube.

(comm, dtype)

Source from the content-addressed store, hash-verified

277@pytest.mark.parametrize("dtype", [np.float32, np.float64])
278@pytest.mark.parametrize("comm", [MPI.COMM_SELF, MPI.COMM_WORLD])
279def test_create_unit_cube(comm, dtype):
280 """Create mesh of unit cube."""
281 mesh = create_unit_cube(comm, 5, 7, 9, dtype=dtype)
282 assert mesh.topology.index_map(0).size_global == 480
283 assert mesh.topology.index_map(3).size_global == 1890
284 assert mesh.geometry.dim == 3
285 assert mesh.comm.allreduce(mesh.topology.index_map(0).size_local, MPI.SUM) == 480
286 assert mesh.geometry.x.dtype == dtype
287
288
289@pytest.mark.parametrize("dtype", [np.float32, np.float64])

Callers

nothing calls this directly

Calls 2

create_unit_cubeFunction · 0.90
index_mapMethod · 0.45

Tested by

no test coverage detected