Adding a new class LagrangeInterpolator
that interpolates a GenericFunction
fast onto a Lagrange function space.
Mikael Mortensen
Branch: mikael/lagrange-interpolation
Branch: master
Merged
Merged pull request
Merge branch 'mikael/lagrange-interpolation'
With the new class
LagrangeInterpolator
two things are achievedMuch faster interpolation of
GenericFunction
s for Lagrange spaces. (Speed-up factor of ≈100 has been observed for aTensorFunctionSpace
in 3D.)Interpolation on non-matching meshes in parallel for Lagrange spaces
The implementation interferes very little with existing code. One struct
lt_coordinate
and one functionin_bounding_box
are borrowed fromPeriodicBoundaryComputation
. This suggests that there should probably be a base class or something similar containing these reuseable functions. Something I consider easily fixed later on.I'm also thinking that the
interpolate
wrapper function in Python could be made to take a keyword likeLagrange=True
, that would lead to more seamless integration of the class. This has not been added yet though.