An interface for accessing Moose::Functors for systems that do not care about automatic differentiation, e.g.
More...
#include <NonADFunctorInterface.h>
Public Member Functions | |
| NonADFunctorInterface (const MooseObject *moose_object) | |
| NonADFunctorInterface (const NonADFunctorInterface &object, const Moose::Kokkos::FunctorCopy &key) | |
| Special constructor used for Kokkos functor copy during parallel dispatch. | |
| template<> | |
| const Moose::Functor< Real > * | defaultFunctor (const std::string &name) |
| template<> | |
| const Moose::Functor< ADReal > * | defaultFunctor (const std::string &name) |
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. | |
Protected Member Functions | |
| std::string | deduceFunctorName (const std::string &name) const |
| Small helper to look up a functor name through the input parameter keys. | |
| template<typename T > | |
| const Moose::Functor< T > & | getFunctor (const std::string &name) |
| Retrieves a functor from the subproblem. | |
| template<typename T > | |
| const Moose::Functor< T > & | getFunctor (const std::string &name, THREAD_ID tid) |
| Retrieves a functor from the subproblem. | |
| template<typename T > | |
| const Moose::Functor< T > & | getFunctor (const std::string &name, SubProblem &subproblem) |
| Retrieves a functor from the passed-in subproblem. | |
| 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. | |
| bool | isFunctor (const std::string &name) const |
| Checks the subproblem for the given functor. | |
| bool | isFunctor (const std::string &name, const SubProblem &subproblem) const |
| Checks the passed-in subproblem for the given functor. | |
| 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. | |
| template<typename T > | |
| void | checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration) |
| Throws error if the functor does not support the requested side integration. | |
| template<typename T > | |
| const Moose::Functor< T > & | getFunctorByName (const std::string &name) |
| Retrieves a functor from the subproblem. | |
Private Member Functions | |
| virtual bool | isADObject () const override |
| Whether this interface is for an AD object. | |
| 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. | |
| template<typename T > | |
| const Moose::Functor< T > * | defaultFunctor (const std::string &name) |
| Helper function to parse default functor values. | |
| 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. | |
| const std::string | _fi_name |
| The name of the object that this interface belongs to. | |
| SubProblem *const | _fi_subproblem |
| Pointer to subproblem if the subproblem pointer parameter was set. | |
| const THREAD_ID | _fi_tid |
| Current threaded it. | |
| std::vector< std::unique_ptr< Moose::Functor< Real > > > | _default_real_functors |
| Storage vector for Moose::Functor<Real> default objects. | |
| std::vector< std::unique_ptr< Moose::Functor< ADReal > > > | _default_ad_real_functors |
| Storage vector for Moose::Functor<ADReal> default objects. | |
An interface for accessing Moose::Functors for systems that do not care about automatic differentiation, e.g.
auxiliary kernels
Definition at line 19 of file NonADFunctorInterface.h.
| NonADFunctorInterface::NonADFunctorInterface | ( | const MooseObject * | moose_object | ) |
Definition at line 18 of file NonADFunctorInterface.C.
| NonADFunctorInterface::NonADFunctorInterface | ( | const NonADFunctorInterface & | object, |
| const Moose::Kokkos::FunctorCopy & | key | ||
| ) |
Special constructor used for Kokkos functor copy during parallel dispatch.
Definition at line 24 of file NonADFunctorInterface.C.
|
protectedinherited |
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 261 of file FunctorInterface.h.
|
protectedinherited |
Small helper to look up a functor name through the input parameter keys.
Definition at line 71 of file FunctorInterface.C.
|
staticinherited |
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 39 of file FunctorInterface.C.
Referenced by FunctorInterface::checkFunctorSupportsSideIntegration(), FunctorInterface::deduceFunctorName(), FunctorInterface::getFunctor(), and FunctorInterface::isFunctor().
|
privateinherited |
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 254 of file FunctorInterface.h.
|
privateinherited |
|
privateinherited |
|
inherited |
Definition at line 78 of file FunctorInterface.C.
|
inherited |
Definition at line 97 of file FunctorInterface.C.
|
protectedinherited |
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, \emph not the actual name of the functor created in the input file |
Definition at line 217 of file FunctorInterface.h.
Referenced by GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), and ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl().
|
protectedinherited |
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, \emph not the actual name of the functor created in the input file |
| subproblem | The subproblem to query for the functor |
Definition at line 202 of file FunctorInterface.h.
|
protectedinherited |
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, \emph 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 193 of file FunctorInterface.h.
|
protectedinherited |
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, \emph 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 209 of file FunctorInterface.h.
|
protectedinherited |
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 actual name of the functor created in the input file |
Definition at line 225 of file FunctorInterface.h.
|
privateinherited |
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 233 of file FunctorInterface.h.
|
inlineoverrideprivatevirtual |
Whether this interface is for an AD object.
Implements FunctorInterface.
Definition at line 35 of file NonADFunctorInterface.h.
|
protectedinherited |
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, \emph not the actual name of the functor created in the input file |
Definition at line 124 of file FunctorInterface.C.
Referenced by FunctorInterface::isFunctor().
|
protectedinherited |
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, \emph not the actual name of the functor created in the input file |
| subproblem | The subproblem to query for the functor |
Definition at line 115 of file FunctorInterface.C.
|
protectedinherited |
Helper method to create an elemental argument for a functor that includes whether to perform skewness corrections.
Definition at line 131 of file FunctorInterface.C.
Referenced by LinearFVAdvectionDiffusionFunctorDirichletBC::computeBoundaryNormalGradient(), LinearFVReaction::computeMatrixContribution(), LinearFVTimeDerivative::computeMatrixContribution(), FVCoupledForce::computeQpResidual(), FVFunctorTimeKernel::computeQpResidual(), FVMassMatrix::computeQpResidual(), FVBoundedValueConstraint::computeQpResidual(), FVIntegralValueConstraint::computeQpResidual(), FVPointValueConstraint::computeQpResidual(), LinearFVSource::computeRightHandSideContribution(), FunctorAux::computeValue(), FunctorCoordinatesFunctionAux::computeValue(), SecondTimeDerivativeAux::computeValue(), TimeDerivativeAux::computeValue(), LinearFVAnisotropicDiffusion::faceDiffusionTensor(), FunctorTimes::initialize(), and LinearFVTimeDerivative::setCurrentElemInfo().
|
static |
Definition at line 13 of file NonADFunctorInterface.C.
Referenced by FunctorIC::validParams(), LinearFVBoundaryCondition::validParams(), LinearFVKernel::validParams(), FunctorExtremaPositions::validParams(), FunctorPositions::validParams(), ParsedDownSelectionPositions::validParams(), Postprocessor::validParams(), FunctorTimes::validParams(), MultiAppGeneralFieldFunctorTransfer::validParams(), SideIntegralFunctorUserObject::validParams(), and VectorPostprocessor::validParams().
|
privateinherited |
Storage vector for Moose::Functor<ADReal> default objects.
Definition at line 188 of file FunctorInterface.h.
Referenced by FunctorInterface::defaultFunctor().
|
privateinherited |
Storage vector for Moose::Functor<Real> default objects.
Definition at line 185 of file FunctorInterface.h.
Referenced by FunctorInterface::defaultFunctor().
|
privateinherited |
The name of the object that this interface belongs to.
Definition at line 176 of file FunctorInterface.h.
Referenced by FunctorInterface::getFunctorByName().
|
privateinherited |
Parameters of the object with this interface.
Definition at line 173 of file FunctorInterface.h.
Referenced by FunctorInterface::deduceFunctorName().
|
privateinherited |
Pointer to subproblem if the subproblem pointer parameter was set.
Definition at line 179 of file FunctorInterface.h.
Referenced by FunctorInterface::getFunctor(), FunctorInterface::getFunctor(), FunctorInterface::getFunctorByName(), and FunctorInterface::isFunctor().
|
privateinherited |
Current threaded it.
Definition at line 182 of file FunctorInterface.h.
Referenced by FunctorInterface::getFunctor(), FunctorInterface::getFunctor(), FunctorInterface::getFunctorByName(), and FunctorInterface::isFunctor().