Create mesh of unit cube.
(comm, dtype)
| 277 | @pytest.mark.parametrize("dtype", [np.float32, np.float64]) |
| 278 | @pytest.mark.parametrize("comm", [MPI.COMM_SELF, MPI.COMM_WORLD]) |
| 279 | def 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]) |
nothing calls this directly
no test coverage detected