31.3 Usage
To include the cubic interpolation tool into your FLASH development, add the line
REQUIRES numericalTools/Interpolate
into the Config file of the directory where the global API's of the interpolation
unit will be used. Another way would be to include the option
-with-unit=numericalTools/Interpolate
into your command line when you configure the code with setup.
Both ways will give you access to the following cubic interpolation tools
in order of their application, where XX stand for the 3 rectangular domain geometries
1D,2D and 3D:
- Interpolate_cubicXXmonoDerv: Handles the logistics for producing optimum sets
of mixed vertex derivatives for a (sub)grid from vertex functional values to ensure monotonicity
of the generated cubic interpolation surfaces. Note that in oder to generate these
mixed derivatives the user needs to provide the vertex function values on a larger (sub)grid than
the target (sub)grid: 1,2,3 extra vertex layers for 1D,2D,3D rectangular geometries.
- Interpolate_cubicXXcoeffs: Calculate the cubic expansion coefficients
in equation 31.1 from user provided sets of vertex data , arranged
as shown in 31.4. The calculation is performed in situ, i.e. the
input vector is overwritten by the cubic expansion coefficient vector
using equation 31.8. The routine accepts a collection of different
vectors and processes them all at once. For XX = 2D or 3D, the code allows for multithreading.
- Interpolate_cubicXXF(d1)(d2): For a specific cubic expansion coefficient vector
and a set of up to three rescaled coordinates , these function routines
calculate the functional value using equation 31.1 and additionally
the complete set of 1st (,,) and 2nd (,,,,,) order
rescaled coordinate derivatives using equation 31.13. Transformation
to global coordinate derivatives via equation 31.12 is not done here and has to
be done by the user in his specific application.