dokken
2
Yes. You would use the correct Piola transform to do this evaluation in “physical” space.
They are built just-in-time and discarded after computation.
You can use dolfinx.fem.Expression
to evaluate your function in any point in physical space.
Expression takes in:
- Your expression: Say the test or trial function (or coefficient) you would like to evaluate
- Points in reference cell
Say:
v = ufl.TestFunction(V)
expr = dolfinx.fem.Expression(v, my_points_in_reference_element, comm=MPI.COMM_SELF)
expr.eval(mesh, np.array([my_cell_index, dtype=np.int32]))
This is for instance how PointSource
is implemented in scifem:
which is based on my original post at: