Celeritas 0.6.0-dev.115+3b60a5fd
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
celeritas::NonuniformGridCalculator Class Reference

Find and interpolate real numbers on a nonuniform grid. More...

#include <NonuniformGridCalculator.hh>

Public Types

using Reals = Collection< real_type, Ownership::const_reference, MemSpace::native >
 Type aliases.
 
using Grid = NonuniformGrid< real_type >
 

Public Member Functions

CELER_FUNCTION NonuniformGridCalculator (NonuniformGridRecord const &grid, Reals const &storage)
 Construct from grid data and backend storage.
 
CELER_FUNCTION real_type operator() (real_type x) const
 Calculate the y value at the given x value.
 
CELER_FUNCTION real_type operator[] (size_type index) const
 Get the tabulated y value at a particular index.
 
CELER_FUNCTION Grid constgrid () const
 Get the tabulated x values.
 
CELER_FUNCTION NonuniformGridCalculator make_inverse () const
 Make a calculator with x and y flipped.
 

Static Public Member Functions

static CELER_FUNCTION NonuniformGridCalculator from_inverse (NonuniformGridRecord const &grid, Reals const &storage)
 Construct by inverting a monotonicially increasing generic grid.
 

Detailed Description

Find and interpolate real numbers on a nonuniform grid.

The end points of the grid are extrapolated outward as constant values.

Todo:
Template on value type and/or units?

Member Function Documentation

◆ make_inverse()

CELER_FUNCTION NonuniformGridCalculator celeritas::NonuniformGridCalculator::make_inverse ( ) const
inline

Make a calculator with x and y flipped.

Precondition
The y values must be monotonic increasing.

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