(mesh_factory)
| 199 | ], |
| 200 | ) |
| 201 | def test_local_dimension(mesh_factory): |
| 202 | func, args = mesh_factory |
| 203 | mesh = func(*args) |
| 204 | |
| 205 | v = element("Lagrange", mesh.basix_cell(), 1, dtype=default_real_type) |
| 206 | q = element( |
| 207 | "Lagrange", mesh.basix_cell(), 1, shape=(mesh.geometry.dim,), dtype=default_real_type |
| 208 | ) |
| 209 | w = v * q |
| 210 | |
| 211 | V = functionspace(mesh, v) |
| 212 | Q = functionspace(mesh, q) |
| 213 | W = functionspace(mesh, w) |
| 214 | for space in [V, Q, W]: |
| 215 | dofmap = space.dofmap |
| 216 | local_to_global_map = dofmap.tabulate_local_to_global_dofs() |
| 217 | ownership_range = dofmap.index_set.size_local * dofmap.index_set.block_size |
| 218 | dim1 = dofmap().index_map.size_local() |
| 219 | dim2 = dofmap().index_map.num_ghosts() |
| 220 | assert dim1 == ownership_range[1] - ownership_range[0] |
| 221 | assert dim1 + dim2 == local_to_global_map.size |
| 222 | |
| 223 | |
| 224 | @pytest.mark.skip |
nothing calls this directly
no test coverage detected