Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
Classes | Typedefs | Functions
sierra::nalu::utils Namespace Reference

Classes

struct  InterpTraits
 
struct  OutOfBounds
 

Typedefs

template<typename T >
using Array1D = std::vector< T >
 

Functions

template<typename T >
InterpTraits< T >::index_type check_bounds (const Array1D< T > &xinp, const T &x)
 Determine whether the given value is within the limits of the interpolation table. More...
 
template<typename T >
InterpTraits< T >::index_type find_index (const Array1D< T > &xinp, const T &x)
 Return an index object corresponding to the x-value based on interpolation table. More...
 
template<typename T >
void linear_interp (const Array1D< T > &xinp, const Array1D< T > &yinp, const T &xout, T &yout, OutOfBounds::OobAction oob=OutOfBounds::CLAMP)
 Perform a 1-D linear interpolation. More...
 

Typedef Documentation

template<typename T >
using sierra::nalu::utils::Array1D = typedef std::vector<T>

Function Documentation

template<typename T >
InterpTraits<T>::index_type sierra::nalu::utils::check_bounds ( const Array1D< T > &  xinp,
const T &  x 
)
inline

Determine whether the given value is within the limits of the interpolation table.

References sierra::nalu::utils::OutOfBounds::LOWLIM, sierra::nalu::utils::OutOfBounds::UPLIM, and sierra::nalu::utils::OutOfBounds::VALID.

Referenced by find_index().

template<typename T >
InterpTraits<T>::index_type sierra::nalu::utils::find_index ( const Array1D< T > &  xinp,
const T &  x 
)
inline

Return an index object corresponding to the x-value based on interpolation table.

The std::pair returned contains two values: the bounds indicator and the index of the element in the interpolation table such that xarray[i] <= x < xarray[i+1]

References check_bounds(), sierra::nalu::utils::OutOfBounds::LOWLIM, and sierra::nalu::utils::OutOfBounds::UPLIM.

Referenced by linear_interp().

template<typename T >
void sierra::nalu::utils::linear_interp ( const Array1D< T > &  xinp,
const Array1D< T > &  yinp,
const T &  xout,
T &  yout,
OutOfBounds::OobAction  oob = OutOfBounds::CLAMP 
)