20 "PiecewiseMultilinear performs linear interpolation on 1D, 2D, 3D or 4D " 21 "data. The data_file specifies the axes directions and the function " 22 "values. If a point lies outside the data range, the appropriate end " 25 "epsilon", 1e-12,
"Finite differencing parameter for gradient and time derivative");
37 return sampleInternal<false>(pt);
43 return sampleInternal<true>(pt);
57 for (
unsigned int i = 0; i <
_dim; ++i)
70 for (
unsigned int i = 0; i < (1u <<
_dim); ++i)
73 for (
unsigned int j = 0; j <
_dim; ++j)
75 if ((i >> j) % 2 == 0)
78 if (left[j] != right[j])
87 if (left[j] != right[j])
100 for (
unsigned int dim = 0;
dim < pt.size(); ++
dim)
101 if (left[
dim] != right[
dim])
116 auto s1 =
sample(pointInGrid<false>(t, p));
119 for (
const auto dir :
_axes)
Uses GriddedData to define data on a grid, and does linear interpolation on that data to provide func...
static InputParameters validParams()
static InputParameters validParams()
Create new PiecewiseMultiInterpolation object.
std::unique_ptr< GriddedData > _gridded_data
object to provide function evaluations at points on the grid
std::vector< std::vector< Real > > _grid
the grid
Uses GriddedData to define data on a grid, and does linear interpolation on that data to provide func...
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Utility class template for a semidynamic vector with a maximum size N and a chosen dynamic size...
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
void getNeighborIndices(std::vector< Real > in_arr, Real x, unsigned int &lower_x, unsigned int &upper_x) const
Operates on monotonically increasing in_arr.
virtual RealGradient gradient(Real t, const Point &p) const override
Function objects can optionally provide a gradient at a point.
PiecewiseMultilinear(const InputParameters ¶meters)
std::vector< int > _axes
_axes specifies how to embed the grid into the MOOSE coordinate frame if _axes[i] = 0 then the i_th a...
MooseADWrapper< Real, is_ad > sampleInternal(const MooseADWrapper< GridPoint, is_ad > pt) const
unsigned int _dim
dimension of the grid
virtual Real timeDerivative(Real t, const Point &p) const override
Get the time derivative of the function.
registerMooseObject("MooseApp", PiecewiseMultilinear)
virtual Real sample(const GridPoint &pt) const override
This does the core work.
typename MooseADWrapperStruct< T, is_ad >::type MooseADWrapper
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real