Create mesh of unit square.
(comm, dtype)
| 265 | @pytest.mark.parametrize("dtype", [np.float32, np.float64]) |
| 266 | @pytest.mark.parametrize("comm", [MPI.COMM_SELF, MPI.COMM_WORLD]) |
| 267 | def test_create_unit_square(comm, dtype): |
| 268 | """Create mesh of unit square.""" |
| 269 | mesh = create_unit_square(comm, 5, 7, dtype=dtype) |
| 270 | assert mesh.topology.index_map(0).size_global == 48 |
| 271 | assert mesh.topology.index_map(2).size_global == 70 |
| 272 | assert mesh.geometry.dim == 2 |
| 273 | assert mesh.comm.allreduce(mesh.topology.index_map(0).size_local, MPI.SUM) == 48 |
| 274 | assert mesh.geometry.x.dtype == dtype |
| 275 | |
| 276 | |
| 277 | @pytest.mark.parametrize("dtype", [np.float32, np.float64]) |
nothing calls this directly
no test coverage detected