22 params.
addRequiredParam<MooseFunctorName>(
"functor",
"The initial condition functor.");
24 params.
addClassDescription(
"An initial condition that uses a normal function of x, y, z to " 25 "produce values (and optionally gradients) for a field variable.");
26 params.
addParam<
Real>(
"scaling_factor", 1,
"Scaling factor to apply on the function");
34 _functor(getFunctor<
Real>(
"functor")),
35 _scaling(getParam<
Real>(
"scaling_factor"))
38 const auto & functor_name = getParam<MooseFunctorName>(
"functor");
43 "Initializing a variable with another variable is not supported at this time");
51 "Functor materials or postprocessors should not depend on variables if used in a " 61 const auto & functor_name = getParam<MooseFunctorName>(
"functor");
66 "Functor is a postprocessor and does not have 'force_preic' set to true");
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
bool parsesToReal(const std::string &input)
Check if the input string can be parsed into a Real.
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
static const std::set< SubdomainID > undefined_subdomain_connection
A static member that can be used when the connection of a node to subdomains is unknown.
This is a template class that implements the workhorse compute and computeNodal methods.
static InputParameters validParams()
const Moose::Functor< Real > & _functor
Function to evaluate to form the initial condition.
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted, this function returns all mesh subdomain ids.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
registerMooseObject("MooseApp", FunctorIC)
MooseVariableField< T > & _var
The variable that this initial condition is acting upon.
FunctorIC(const InputParameters ¶meters)
const Node * _current_node
The current node if the point we are evaluating at also happens to be a node.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
static InputParameters validParams()
bool hasPostprocessorValueByName(const PostprocessorName &name) const
Whether or not a Postprocessor value exists by a given name.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
virtual bool isNodalDefined() const =0
Is this variable defined at nodes.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const Elem *const & _current_elem
The current element we are on will retrieving values at specific points in the domain.
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.
FEProblemBase & _fe_problem
virtual RealGradient gradient(const Point &p) override
The value of the gradient at a point.
Defines an initial condition using a functor.
const Real _scaling
Scaling factor, to be able to use a functor with multiple ICs.
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)
virtual Real value(const Point &p) override
The value of the variable at a point.
void paramInfo(const std::string ¶m, Args... args) const
Emits an informational message prefixed with the file and line number of the given param (from the in...