Make evaluate() method of FE Function Classes Blending-Aware
Hi,
as recently discussed on MatterMost the current implementation of the evaluate()
methods of our FE function classes is implicitly assuming that the point coordinates it receives are w.r.t. to the computational domain. If the coordinates are "blended", i.e. w.r.t. the physical domain, we will either get incorrect values for the point, or none at all, since no enclosing primitive will be found.
The outcome of our discussion IMHO is that we want to change this behaviour. Technically the requirement that the blending function must be globally a homeomorphism allows us to map the coordinates from the physical domain back to the computational domain, using a primitive's local blending map, and then check, whether the mapped point belongs to the primitive in the computational domain.
Note that this change will, of course, affect existing code that passes points with coordinates in the computational domain, such as in the current MMOC implementation.
As an aside I suggest to also remove in the process the specialisation of evaluate()
for real_t
using constexpr if
, to get cleaner code.
Cheers
Marcus