Skip to content

[draft]Add support for Hermite elements to the global interpolate() method

Carsten Gräser requested to merge feature/hermite-aware-interpolation into master

Currently this contains two cases (activated via a macro):

  • (A) Local interpolation of fLocal assumes that derivative(fLocal) is really the derivative of fLocal.
  • (B) Local interpolation of fLocal assumes that derivative(fLocal) is the localized version of the global derivative.

See #76 for a discussion of the two variants.

This also included support for local functions lf where derivative(lf) hands out a reference to a cached derivative. This potentially allows to avoid the creation and copy of those local derivatives on each element which can be relatively costly as e.g. in case of DiscreteGlobalBasisFunction. However, the latter does not implement such caching so far but could easily be patched to provide it.

To test this, this furthermore adds the following:

  • A general checkInterpolateConsistency() utility for testing if global interpolate() and DiscreteGlobalBasisFunction are consistent.
  • An implementation of a 1d and 2d cubic Hermite basis for testing.
  • A new test that applies checkInterpolateConsistency() to the CubicHermitePreBasis to test the updated interpolate() method.

The CubicHermitePreBasis implementation is currently only used for testing and thus contained in the test directory. However it is fully functional in 1d and 2d and also brings all the boiler-plate code needed for general dimension. Hence we could also add it as real implementation. Internally it uses a new LeafPreBasisMapperMixIn class, that allows to simplify the Prebasis significantly, if index computations can be done using a MultipleCodimMultipleGeometryMapper.

Notice that this incorporates the changes from !413 (merged).

Edited by Carsten Gräser

Merge request reports

Loading