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

Function test_assemble_functional_ds

python/test/unit/fem/test_assembler.py:83–89  ·  view source on GitHub ↗
(mode, dtype)

Source from the content-addressed store, hash-verified

81@pytest.mark.parametrize("mode", [GhostMode.none, GhostMode.shared_facet])
82@dtype_parametrize
83def test_assemble_functional_ds(mode, dtype):
84 xtype = dtype(0).real.dtype
85 mesh = create_unit_square(MPI.COMM_WORLD, 12, 12, ghost_mode=mode, dtype=xtype)
86 M = form(1.0 * ds(domain=mesh), dtype=dtype)
87 value = assemble_scalar(M)
88 value = mesh.comm.allreduce(value, op=MPI.SUM)
89 assert value == pytest.approx(4.0, 1e-6)
90
91
92@dtype_parametrize

Callers

nothing calls this directly

Calls 3

create_unit_squareFunction · 0.90
formFunction · 0.90
assemble_scalarFunction · 0.90

Tested by

no test coverage detected