MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / test_create_rectangle_gdim

Function test_create_rectangle_gdim

python/test/unit/mesh/test_mesh.py:337–344  ·  view source on GitHub ↗

Rectangle mesh embedded in gdim-dimensional space has correct tdim and gdim.

(gdim, cell_type)

Source from the content-addressed store, hash-verified

335@pytest.mark.parametrize("cell_type", [CellType.triangle, CellType.quadrilateral])
336@pytest.mark.parametrize("gdim", [2, 3])
337def test_create_rectangle_gdim(gdim, cell_type):
338 """Rectangle mesh embedded in gdim-dimensional space has correct tdim and gdim."""
339 mesh = create_rectangle(MPI.COMM_WORLD, [[0.0, 0.0], [1.0, 1.0]], [4, 4], cell_type, gdim=gdim)
340 assert mesh.topology.dim == 2
341 assert mesh.geometry.dim == gdim
342 domain = mesh.ufl_domain()
343 assert domain is not None
344 assert domain.ufl_coordinate_element().reference_value_shape == (gdim,)
345
346
347@pytest.mark.skip_in_parallel

Callers

nothing calls this directly

Calls 2

create_rectangleFunction · 0.90
ufl_domainMethod · 0.80

Tested by

no test coverage detected