20 : _fi_params(moose_object->parameters()),
21 _fi_name(moose_object->name()),
22 _fi_subproblem(_fi_params.get<
SubProblem *>(
"_subproblem")),
23 _fi_tid(_fi_params.get<
THREAD_ID>(
"_tid"))
27#ifdef MOOSE_KOKKOS_ENABLED
30 : _fi_params(object._fi_params),
31 _fi_name(object._fi_name),
32 _fi_subproblem(object._fi_subproblem),
33 _fi_tid(object._fi_tid)
44 return params.
get<MooseFunctorName>(name);
47 return params.
get<MaterialPropertyName>(name);
49 return params.
get<VariableName>(name);
52 const auto & var_names = params.
get<std::vector<VariableName>>(name);
53 if (var_names.size() != 1)
54 mooseError(
"We only support a single variable name for retrieving a functor");
58 return params.
get<NonlinearVariableName>(name);
60 return params.
get<FunctionName>(name);
62 return params.
get<PostprocessorName>(name);
64 mooseError(
"Invalid parameter type for retrieving a functor");
80 std::istringstream ss(name);
84 if (ss >> real_value && ss.eof())
89 return default_property.get();
99 std::istringstream ss(name);
103 if (ss >> real_value && ss.eof())
108 return default_property.get();
133 return {elem, correct_skewness};
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
An interface for accessing Moose::Functors.
const Moose::Functor< T > * defaultFunctor(const std::string &name)
Helper function to parse default functor values.
const THREAD_ID _fi_tid
Current threaded it.
static std::string deduceFunctorName(const std::string &name, const InputParameters ¶ms)
Helper to look up a functor name through the input parameter keys.
std::vector< std::unique_ptr< Moose::Functor< ADReal > > > _default_ad_real_functors
Storage vector for Moose::Functor<ADReal> default objects.
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Helper method to create an elemental argument for a functor that includes whether to perform skewness...
static InputParameters validParams()
const InputParameters & _fi_params
Parameters of the object with this interface.
SubProblem *const _fi_subproblem
Pointer to subproblem if the subproblem pointer parameter was set.
bool isFunctor(const std::string &name) const
Checks the subproblem for the given functor.
std::vector< std::unique_ptr< Moose::Functor< Real > > > _default_real_functors
Storage vector for Moose::Functor<Real> default objects.
FunctorInterface(const MooseObject *moose_object)
Every object that can be built by the factory should be derived from this class.
Class template for creating constant functors.
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
Generic class for solving transient nonlinear problems.
bool hasFunctor(const std::string &name, const THREAD_ID tid) const
checks whether we have a functor corresponding to name on the thread id tid
A structure that is used to evaluate Moose functors logically at an element/cell center.