()
| 157 | |
| 158 | |
| 159 | def test_block_size(): |
| 160 | meshes = [ |
| 161 | create_unit_square(MPI.COMM_WORLD, 8, 8), |
| 162 | create_unit_cube(MPI.COMM_WORLD, 4, 4, 4), |
| 163 | create_unit_square(MPI.COMM_WORLD, 8, 8, CellType.quadrilateral), |
| 164 | create_unit_cube(MPI.COMM_WORLD, 4, 4, 4, CellType.hexahedron), |
| 165 | ] |
| 166 | for mesh in meshes: |
| 167 | P2 = element("Lagrange", mesh.basix_cell(), 2, dtype=default_real_type) |
| 168 | V = functionspace(mesh, P2) |
| 169 | assert V.dofmap.bs == 1 |
| 170 | |
| 171 | # Only BlockedElements have index_map_bs > 1 |
| 172 | V = functionspace(mesh, mixed_element([P2, P2])) |
| 173 | assert V.dofmap.index_map_bs == 1 |
| 174 | |
| 175 | for i in range(2, 6): |
| 176 | W = functionspace(mesh, mixed_element(i * [P2])) |
| 177 | assert W.dofmap.index_map_bs == 1 |
| 178 | |
| 179 | gdim = mesh.geometry.dim |
| 180 | V = functionspace(mesh, ("Lagrange", 2, (gdim,))) |
| 181 | assert V.dofmap.index_map_bs == mesh.geometry.dim |
| 182 | |
| 183 | |
| 184 | @pytest.mark.skip |
nothing calls this directly
no test coverage detected