Celeritas
0.5.0-86+4a8eea4
|
Do bilinear interpolation on a 2D grid with the x value preselected. More...
#include <TwodSubgridCalculator.hh>
Public Types | |
Type aliases | |
using | Values = Collection< real_type, Ownership::const_reference, MemSpace::native > |
using | InterpT = FindInterp< real_type > |
Public Member Functions | |
CELER_FUNCTION | TwodSubgridCalculator (TwodGridData const &grid, Values const &storage, InterpT x_loc) |
Construct with grid data, backend values, and lower X data. More... | |
CELER_FUNCTION real_type | operator() (real_type y) const |
Calculate the value at the given y coordinate for preselected x. More... | |
CELER_FUNCTION real_type | operator[] (size_type i) const |
Calculate the value at the given y grid point for preselected x. | |
CELER_FORCEINLINE_FUNCTION size_type | x_index () const |
Index of the preselected lower x value. | |
CELER_FORCEINLINE_FUNCTION real_type | x_fraction () const |
Fraction between the lower and upper x grid values. | |
Do bilinear interpolation on a 2D grid with the x value preselected.
This is usually not called directly but rather given as the return result of the TwodGridCalculator.
|
inline |
Construct with grid data, backend values, and lower X data.
This is typically constructed from a TwodGridCalculator. The interpolated x location could be extended to allow a fractional value of 1 to support interpolating on the highest value of the x grid.
|
inline |
Calculate the value at the given y coordinate for preselected x.
This uses bilinear interpolation and and therefore exactly represents functions that are a linear combination of 1, x, y, and xy.