GEOS
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS > Class Template Reference

#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< real64m_values
 Interpolated values.
 
arrayView1d< real64m_derivatives
 /// Interpolated derivatives
 

Detailed Description

template<integer NUM_DIMS, integer NUM_OPS>
class geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >

A class for multivariable piecewise interpolation with static storage All functions are interpolated using the same uniformly discretized space

Template Parameters
NUM_DIMSnumber of dimensions (inputs)
NUM_OPSnumber of interpolated functions (outputs)

Definition at line 44 of file MultivariableTableFunctionKernels.hpp.

Constructor & Destructor Documentation

◆ MultivariableTableFunctionStaticKernel()

template<integer NUM_DIMS, integer NUM_OPS>
geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >::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 
)
inline

Construct a new Multivariable Table Function Static Kernel object.

Parameters
[in]axisMinimumsminimum coordinate for each axis
[in]axisMaximumsmaximum coordinate for each axis
[in]axisPointsnumber of discretization points between minimum and maximum for each axis
[in]axisStepsaxis interval lengths (axes are discretized uniformly)
[in]axisStepInvsinversions of axis interval lengths (axes are discretized uniformly)
[in]axisHypercubeMultshypercube index mult factors for each axis
[in]hypercubeDatatable data stored per hypercube

Definition at line 69 of file MultivariableTableFunctionKernels.hpp.

Member Function Documentation

◆ compute() [1/2]

template<integer NUM_DIMS, integer NUM_OPS>
template<typename IN_ARRAY , typename OUT_ARRAY >
GEOS_HOST_DEVICE void geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >::compute ( IN_ARRAY const &  coordinates,
OUT_ARRAY &&  values 
) const
inline

interpolate all operators at a given point

Parameters
[in]coordinatespoint coordinates
[out]valuesinterpolated operator values

Definition at line 94 of file MultivariableTableFunctionKernels.hpp.

◆ compute() [2/2]

template<integer NUM_DIMS, integer NUM_OPS>
template<typename IN_ARRAY , typename OUT_ARRAY , typename OUT_2D_ARRAY >
GEOS_HOST_DEVICE void geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >::compute ( IN_ARRAY const &  coordinates,
OUT_ARRAY &&  values,
OUT_2D_ARRAY &&  derivatives 
) const
inline

interpolate all operators and compute their derivatives at a given point

Parameters
[in]coordinatespoint coordinates
[out]valuesinterpolated operator values
[out]derivativesderivatives of interpolated operators

Definition at line 127 of file MultivariableTableFunctionKernels.hpp.

◆ getAxisIntervalIndexLowMult()

template<integer NUM_DIMS, integer NUM_OPS>
GEOS_HOST_DEVICE integer geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >::getAxisIntervalIndexLowMult ( real64 const  axisCoordinate,
real64 const  axisMin,
real64 const  axisMax,
real64 const  axisStep,
real64 const  axisStepInv,
integer const  axisPoints,
real64 axisLow,
real64 axisMult 
) const
inlineprotected

Get the interval index, low and mult values for a given axis coordinate.

Parameters
[in]axisCoordinatecoordinate on a given axis
[in]axisMinminimum value on a given axis
[in]axisMaxmaximum value on a given axis
[in]axisStepinterval length for a given axis
[in]axisStepInvinversion of the interval length for a given axis
[in]axisPointsnumber of discretization points for a given axis
[out]axisLowleft coordinate of target axis interval
[out]axisMultweight of the right coordinate of target axis interval
Returns
integer target axis interval index

Definition at line 185 of file MultivariableTableFunctionKernels.hpp.

◆ getHypercubeData()

template<integer NUM_DIMS, integer NUM_OPS>
GEOS_HOST_DEVICE real64 const* geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >::getHypercubeData ( globalIndex const  hypercubeIndex) const
inlineprotected

Get pointer to hypercube data.

Parameters
[in]hypercubeIndex
Returns
pointer to hypercube data

Definition at line 164 of file MultivariableTableFunctionKernels.hpp.

◆ interpolatePoint()

template<integer NUM_DIMS, integer NUM_OPS>
template<typename IN_ARRAY , typename OUT_ARRAY >
GEOS_HOST_DEVICE void geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >::interpolatePoint ( IN_ARRAY const &  axisCoordinates,
real64 const *const  hypercubeData,
real64 const *const  axisLows,
real64 const *const  axisStepInvs,
OUT_ARRAY &&  values 
) const
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

Parameters
[in]axisCoordinatescoordinates of a point
[in]hypercubeDatadata of target hypercube
[in]axisLowsarray of left coordinates of target axis intervals
[in]axisStepInvsarray of inversions of axis steps
[out]valuesinterpolated operator values

Definition at line 235 of file MultivariableTableFunctionKernels.hpp.

◆ interpolatePointWithDerivatives()

template<integer NUM_DIMS, integer NUM_OPS>
template<typename IN_ARRAY , typename OUT_ARRAY , typename OUT_2D_ARRAY >
GEOS_HOST_DEVICE void geos::MultivariableTableFunctionStaticKernel< NUM_DIMS, NUM_OPS >::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
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

Parameters
[in]axisCoordinatescoordinates of a point
[in]hypercubeDatadata of target hypercube
[in]axisLowsarray of left coordinates of target axis intervals
[in]axisMultsarray of weights of right coordinates of target axis intervals
[in]axisStepInvsarray of inversions of axis steps
[out]valuesinterpolated operator values
[out]derivativesderivatives of interpolated operators

Definition at line 289 of file MultivariableTableFunctionKernels.hpp.


The documentation for this class was generated from the following file: