An interface for accessing Moose::Functors
.
More...
#include <FunctorInterface.h>
Public Member Functions | |
FunctorInterface (const MooseObject *moose_object) | |
Static Public Member Functions | |
static InputParameters | validParams () |
static std::string | deduceFunctorName (const std::string &name, const InputParameters ¶ms) |
Helper to look up a functor name through the input parameter keys. More... | |
Protected Member Functions | |
template<typename T > | |
const Moose::Functor< T > & | getFunctor (const std::string &name) |
Retrieves a functor from the subproblem. More... | |
template<typename T > | |
const Moose::Functor< T > & | getFunctor (const std::string &name, THREAD_ID tid) |
Retrieves a functor from the subproblem. More... | |
template<typename T > | |
const Moose::Functor< T > & | getFunctor (const std::string &name, SubProblem &subproblem) |
Retrieves a functor from the passed-in subproblem. More... | |
template<typename T > | |
const Moose::Functor< T > & | getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid) |
Retrieves a functor from the passed-in subproblem. More... | |
bool | isFunctor (const std::string &name) const |
Checks the subproblem for the given functor. More... | |
bool | isFunctor (const std::string &name, const SubProblem &subproblem) const |
Checks the passed-in subproblem for the given functor. More... | |
std::string | deduceFunctorName (const std::string &name) const |
Small helper to look up a functor name through the input parameter keys. More... | |
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 corrections. More... | |
template<typename T > | |
void | checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration) |
Throws error if the functor does not support the requested side integration. More... | |
Private Member Functions | |
template<typename T > | |
const Moose::Functor< T > & | getFunctorByName (const std::string &name, SubProblem &subproblem, THREAD_ID tid) |
Retrieves a functor from the passed-in subproblem. More... | |
virtual bool | isADObject () const =0 |
Whether this interface is for an AD object. More... | |
template<typename T > | |
const Moose::Functor< T > * | defaultFunctor (const std::string &name) |
Helper function to parse default functor values. More... | |
template<> | |
const Moose::Functor< Real > * | defaultFunctor (const std::string &name) |
template<> | |
const Moose::Functor< ADReal > * | defaultFunctor (const std::string &name) |
Private Attributes | |
const InputParameters & | _fi_params |
Parameters of the object with this interface. More... | |
const std::string | _fi_name |
The name of the object that this interface belongs to. More... | |
SubProblem *const | _fi_subproblem |
Pointer to subproblem if the subproblem pointer parameter was set. More... | |
const THREAD_ID | _fi_tid |
Current threaded it. More... | |
std::vector< std::unique_ptr< Moose::Functor< Real > > > | _default_real_functors |
Storage vector for Moose::Functor<Real> default objects. More... | |
std::vector< std::unique_ptr< Moose::Functor< ADReal > > > | _default_ad_real_functors |
Storage vector for Moose::Functor<ADReal> default objects. More... | |
An interface for accessing Moose::Functors
.
Definition at line 28 of file FunctorInterface.h.
FunctorInterface::FunctorInterface | ( | const MooseObject * | moose_object | ) |
Definition at line 19 of file FunctorInterface.C.
|
protected |
Throws error if the functor does not support the requested side integration.
[in] | name | Name of functor or functor parameter |
[in] | qp_integration | True if performing qp integration, false if face info |
Definition at line 236 of file FunctorInterface.h.
|
static |
Helper to look up a functor name through the input parameter keys.
name | The input parameter name that we are trying to deduce the functor name for |
params | The input parameters object that we will be checking for parameters named name |
Definition at line 28 of file FunctorInterface.C.
Referenced by checkFunctorSupportsSideIntegration(), deduceFunctorName(), getFunctor(), and isFunctor().
|
protected |
Small helper to look up a functor name through the input parameter keys.
Definition at line 60 of file FunctorInterface.C.
|
private |
Helper function to parse default functor values.
This is implemented as a specialization for supported types and returns NULL in all other cases.
Definition at line 229 of file FunctorInterface.h.
|
private |
Definition at line 67 of file FunctorInterface.C.
|
private |
Definition at line 86 of file FunctorInterface.C.
|
protected |
Retrieves a functor from the subproblem.
This method also leverages the ability to create default functors if the user passed an integer or real in the input file
name | The name of the functor to retrieve. This should match the functor parameter name, not the actual name of the functor created in the input file |
Definition at line 200 of file FunctorInterface.h.
Referenced by MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl().
|
protected |
Retrieves a functor from the subproblem.
This method also leverages the ability to create default functors if the user passed an integer or real in the input file
name | The name of the functor to retrieve. This should match the functor parameter name, not the actual name of the functor created in the input file |
tid | The thread ID used to retrieve the functor from this interface's subproblem |
Definition at line 192 of file FunctorInterface.h.
|
protected |
Retrieves a functor from the passed-in subproblem.
This method also leverages the ability to create default functors if the user passed an integer or real in the input file
name | The name of the functor to retrieve. This should match the functor parameter name, not the actual name of the functor created in the input file |
subproblem | The subproblem to query for the functor |
Definition at line 185 of file FunctorInterface.h.
|
protected |
Retrieves a functor from the passed-in subproblem.
This method also leverages the ability to create default functors if the user passed an integer or real in the input file
name | The name of the functor to retrieve. This should match the functor parameter name, not the actual name of the functor created in the input file |
subproblem | The subproblem to query for the functor |
tid | The thread ID used to retrieve the functor from the subproblem |
Definition at line 176 of file FunctorInterface.h.
|
private |
Retrieves a functor from the passed-in subproblem.
This method also leverages the ability to create default functors if the user passed an integer or real in the input file
name | The actual name of the functor to retrieve instead of the parameter name |
subproblem | The subproblem to query for the functor |
tid | The thread ID used to retrieve the functor from the subproblem |
Definition at line 208 of file FunctorInterface.h.
|
privatepure virtual |
Whether this interface is for an AD object.
Implemented in ADFunctorInterface, and NonADFunctorInterface.
Referenced by getFunctorByName().
|
protected |
Checks the subproblem for the given functor.
This will not query default functors potentially stored in this object, e.g. this method will return false if the user passed an int or real to the functor param in the input file
name | The name of the functor to check. This should match the functor parameter name, not the actual name of the functor created in the input file |
Definition at line 113 of file FunctorInterface.C.
|
protected |
Checks the passed-in subproblem for the given functor.
This will not query default functors potentially stored in this object, e.g. this method will return false if the user passed an int or real to the functor param in the input file
name | The name of the functor to check. This should match the functor parameter name, not the actual name of the functor created in the input file |
subproblem | The subproblem to query for the functor |
Definition at line 104 of file FunctorInterface.C.
|
protected |
Helper method to create an elemental argument for a functor that includes whether to perform skewness corrections.
Definition at line 120 of file FunctorInterface.C.
Referenced by LinearFVAdvectionDiffusionFunctorDirichletBC::computeBoundaryNormalGradient(), LinearFVAdvectionDiffusionFunctorNeumannBC::computeBoundaryValue(), LinearFVReaction::computeMatrixContribution(), LinearFVTimeDerivative::computeMatrixContribution(), FVFunctorTimeKernel::computeQpResidual(), FVCoupledForce::computeQpResidual(), FVMassMatrix::computeQpResidual(), FVIntegralValueConstraint::computeQpResidual(), FVBoundedValueConstraint::computeQpResidual(), FVPointValueConstraint::computeQpResidual(), LinearFVSource::computeRightHandSideContribution(), SecondTimeDerivativeAux::computeValue(), TimeDerivativeAux::computeValue(), FunctorAux::computeValue(), FunctorCoordinatesFunctionAux::computeValue(), FunctorTimes::initialize(), and LinearFVTimeDerivative::setCurrentElemInfo().
|
static |
Definition at line 14 of file FunctorInterface.C.
Referenced by ADFunctorInterface::validParams(), NonADFunctorInterface::validParams(), and AuxKernelTempl< Real >::validParams().
|
private |
Storage vector for Moose::Functor<ADReal> default objects.
Definition at line 171 of file FunctorInterface.h.
Referenced by defaultFunctor().
|
private |
Storage vector for Moose::Functor<Real> default objects.
Definition at line 168 of file FunctorInterface.h.
Referenced by defaultFunctor().
|
private |
The name of the object that this interface belongs to.
Definition at line 159 of file FunctorInterface.h.
Referenced by getFunctorByName().
|
private |
Parameters of the object with this interface.
Definition at line 156 of file FunctorInterface.h.
Referenced by deduceFunctorName().
|
private |
Pointer to subproblem if the subproblem pointer parameter was set.
Definition at line 162 of file FunctorInterface.h.
Referenced by getFunctor(), and isFunctor().
|
private |
Current threaded it.
Definition at line 165 of file FunctorInterface.h.
Referenced by getFunctor(), and isFunctor().