Go to the documentation of this file.
20 MooseEnum direction(
"left right",
"left");
22 "direction", direction,
"Direction to look to find value: " + direction.
getRawNames());
31 if (direction ==
"left")
35 else if (direction ==
"right")
41 mooseError(
"Unknown direction in PiecewiseConstant");
54 Real func_value = 0.0;
59 const Real toler = 1e-14;
65 func_value =
range(0);
71 func_value =
range(len - 1);
79 func_value =
range(i - 1);
84 func_value =
range(i);
108 for (
unsigned i = 0; i < len - 1; ++i)
static InputParameters validParams()
virtual Real functionSize() const
std::string getRawNames() const
Method for returning the raw name strings for this instance.
void mooseError(Args &&... args) const
virtual Real integral() const override
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
DirectionEnum getDirection(const std::string &direction)
static PetscErrorCode Vec x
int _axis
if _has_axis is true point component to use as function argument, otherwise use t
virtual Real range(const int i) const
registerMooseObject("MooseApp", PiecewiseConstant)
virtual Real timeDerivative(Real t, const Point &pt) const override
Get the time derivative of the function (based on time only)
virtual Real average() const override
PiecewiseConstant(const InputParameters ¶meters)
Function base which provides a piecewise approximation to a provided (x,y) point data set.
Function which provides a piecewise continuous constant interpolation of a provided (x,...
virtual Real domain(const int i) const
defineLegacyParams(PiecewiseConstant)
const DirectionEnum _direction
const Real _scale_factor
function value scale factor
static InputParameters validParams()
virtual Real value(Real t, const Point &pt) const override
Get the value of the function (based on time only)