Iterate over faces and sum area.
(cube, square)
| 27 | @pytest.mark.skip("volume_entities needs fixing") |
| 28 | @pytest.mark.skip_in_parallel |
| 29 | def test_area(cube, square): |
| 30 | """Iterate over faces and sum area.""" |
| 31 | # TODO: update for dim < tdim |
| 32 | # cube.topology.create_entities(2) |
| 33 | # area = dolfinx.cpp.mesh.volume_entities(cube, range(cube.num_entities(2)), 2).sum() |
| 34 | # assert area == pytest.approx(39.21320343559672494393) |
| 35 | |
| 36 | map = square.topology.index_map(2) |
| 37 | num_faces = map.size_local + map.num_ghosts |
| 38 | |
| 39 | cube.topology.create_entities(1) |
| 40 | area = _cpp.mesh.volume_entities(square, range(num_faces), 2).sum() |
| 41 | assert area == pytest.approx(1.0) |
| 42 | |
| 43 | |
| 44 | def test_normals(cube, square): |
nothing calls this directly
no test coverage detected