GEOS
|
#include <MultivariableTableFunctionKernels.hpp>
Public Member Functions | |
MultivariableTableFunctionStaticKernel (arrayView1d< real64 const > const &axisMinimums, arrayView1d< real64 const > const &axisMaximums, arrayView1d< integer const > const &axisPoints, arrayView1d< real64 const > const &axisSteps, arrayView1d< real64 const > const &axisStepInvs, arrayView1d< globalIndex const > const &axisHypercubeMults, arrayView1d< real64 const > const &hypercubeData) | |
Construct a new Multivariable Table Function Static Kernel object. More... | |
template<typename IN_ARRAY , typename OUT_ARRAY > | |
GEOS_HOST_DEVICE void | compute (IN_ARRAY const &coordinates, OUT_ARRAY &&values) const |
interpolate all operators at a given point More... | |
template<typename IN_ARRAY , typename OUT_ARRAY , typename OUT_2D_ARRAY > | |
GEOS_HOST_DEVICE void | compute (IN_ARRAY const &coordinates, OUT_ARRAY &&values, OUT_2D_ARRAY &&derivatives) const |
interpolate all operators and compute their derivatives at a given point More... | |
Static Public Attributes | |
static constexpr integer | numDims = NUM_DIMS |
Compile time value for the number of table dimensions (inputs) | |
static constexpr integer | numOps = NUM_OPS |
Compile time value for the number of operators (interpolated functions, outputs) | |
static constexpr integer | numVerts = 1 << numDims |
Compile time value for the number of hypercube vertices. | |
Protected Member Functions | |
GEOS_HOST_DEVICE real64 const * | getHypercubeData (globalIndex const hypercubeIndex) const |
Get pointer to hypercube data. More... | |
GEOS_HOST_DEVICE integer | getAxisIntervalIndexLowMult (real64 const axisCoordinate, real64 const axisMin, real64 const axisMax, real64 const axisStep, real64 const axisStepInv, integer const axisPoints, real64 &axisLow, real64 &axisMult) const |
Get the interval index, low and mult values for a given axis coordinate. More... | |
template<typename IN_ARRAY , typename OUT_ARRAY > | |
GEOS_HOST_DEVICE void | interpolatePoint (IN_ARRAY const &axisCoordinates, real64 const *const hypercubeData, real64 const *const axisLows, real64 const *const axisStepInvs, OUT_ARRAY &&values) const |
interpolate all operators values at a given point The algoritm is based on http://dx.doi.org/10.1090/S0025-5718-1988-0917826-0 More... | |
template<typename IN_ARRAY , typename OUT_ARRAY , typename OUT_2D_ARRAY > | |
GEOS_HOST_DEVICE void | interpolatePointWithDerivatives (IN_ARRAY const &axisCoordinates, real64 const *const hypercubeData, real64 const *const axisLows, real64 const *const axisMults, real64 const *const axisStepInvs, OUT_ARRAY &&values, OUT_2D_ARRAY &&derivatives) const |
interpolate all operators values and derivatives at a given point The algoritm is based on http://dx.doi.org/10.1090/S0025-5718-1988-0917826-0 More... | |
Protected Attributes | |
arrayView1d< real64 const > | m_axisMinimums |
Array [numDims] of axis minimum values. | |
arrayView1d< real64 const > | m_axisMaximums |
Array [numDims] of axis maximum values. | |
arrayView1d< integer const > | m_axisPoints |
Array [numDims] of axis discretization points. | |
arrayView1d< real64 const > | m_axisSteps |
Array [numDims] of axis interval lengths (axes are discretized uniformly) | |
arrayView1d< real64 const > | m_axisStepInvs |
Array [numDims] of inversions of axis interval lengths (axes are discretized uniformly) | |
arrayView1d< globalIndex const > | m_axisHypercubeMults |
Array [numDims] of hypercube index mult factors for each axis. | |
arrayView1d< real64 const > | m_hypercubeData |
Main table data stored per hypercube: all values required for interpolation withing give hypercube are stored contiguously. | |
arrayView1d< real64 const > | m_coordinates |
Coordinates in numDims-dimensional space where interpolation is requested. | |
arrayView1d< real64 > | m_values |
Interpolated values. | |
arrayView1d< real64 > | m_derivatives |
/// Interpolated derivatives | |
A class for multivariable piecewise interpolation with static storage All functions are interpolated using the same uniformly discretized space
NUM_DIMS | number of dimensions (inputs) |
NUM_OPS | number of interpolated functions (outputs) |
Definition at line 44 of file MultivariableTableFunctionKernels.hpp.
|
inline |
Construct a new Multivariable Table Function Static Kernel object.
[in] | axisMinimums | minimum coordinate for each axis |
[in] | axisMaximums | maximum coordinate for each axis |
[in] | axisPoints | number of discretization points between minimum and maximum for each axis |
[in] | axisSteps | axis interval lengths (axes are discretized uniformly) |
[in] | axisStepInvs | inversions of axis interval lengths (axes are discretized uniformly) |
[in] | axisHypercubeMults | hypercube index mult factors for each axis |
[in] | hypercubeData | table data stored per hypercube |
Definition at line 69 of file MultivariableTableFunctionKernels.hpp.
|
inline |
interpolate all operators at a given point
[in] | coordinates | point coordinates |
[out] | values | interpolated operator values |
Definition at line 94 of file MultivariableTableFunctionKernels.hpp.
|
inline |
interpolate all operators and compute their derivatives at a given point
[in] | coordinates | point coordinates |
[out] | values | interpolated operator values |
[out] | derivatives | derivatives of interpolated operators |
Definition at line 127 of file MultivariableTableFunctionKernels.hpp.
|
inlineprotected |
Get the interval index, low and mult values for a given axis coordinate.
[in] | axisCoordinate | coordinate on a given axis |
[in] | axisMin | minimum value on a given axis |
[in] | axisMax | maximum value on a given axis |
[in] | axisStep | interval length for a given axis |
[in] | axisStepInv | inversion of the interval length for a given axis |
[in] | axisPoints | number of discretization points for a given axis |
[out] | axisLow | left coordinate of target axis interval |
[out] | axisMult | weight of the right coordinate of target axis interval |
Definition at line 185 of file MultivariableTableFunctionKernels.hpp.
|
inlineprotected |
Get pointer to hypercube data.
[in] | hypercubeIndex |
Definition at line 164 of file MultivariableTableFunctionKernels.hpp.
|
inlineprotected |
interpolate all operators values at a given point The algoritm is based on http://dx.doi.org/10.1090/S0025-5718-1988-0917826-0
[in] | axisCoordinates | coordinates of a point |
[in] | hypercubeData | data of target hypercube |
[in] | axisLows | array of left coordinates of target axis intervals |
[in] | axisStepInvs | array of inversions of axis steps |
[out] | values | interpolated operator values |
Definition at line 235 of file MultivariableTableFunctionKernels.hpp.
|
inlineprotected |
interpolate all operators values and derivatives at a given point The algoritm is based on http://dx.doi.org/10.1090/S0025-5718-1988-0917826-0
[in] | axisCoordinates | coordinates of a point |
[in] | hypercubeData | data of target hypercube |
[in] | axisLows | array of left coordinates of target axis intervals |
[in] | axisMults | array of weights of right coordinates of target axis intervals |
[in] | axisStepInvs | array of inversions of axis steps |
[out] | values | interpolated operator values |
[out] | derivatives | derivatives of interpolated operators |
Definition at line 289 of file MultivariableTableFunctionKernels.hpp.