https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Coupleable Class Reference

Interface for objects that needs coupling capabilities. More...

#include <Coupleable.h>

Inheritance diagram for Coupleable:
[legend]

Public Member Functions

 Coupleable (const MooseObject *moose_object, bool nodal, bool is_fv=false)
 Constructing the object.
 
 Coupleable (const Coupleable &object, const Moose::Kokkos::FunctorCopy &key)
 Special constructor used for Kokkos functor copy during parallel dispatch.
 
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > & getCoupledVars () const
 Get the list of coupled variables.
 
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars () const
 Get the list of all coupled variables.
 
const std::vector< MooseVariable * > & getCoupledStandardMooseVars () const
 Get the list of standard coupled variables.
 
const std::vector< VectorMooseVariable * > & getCoupledVectorMooseVars () const
 Get the list of vector coupled variables.
 
const std::vector< ArrayMooseVariable * > & getCoupledArrayMooseVars () const
 Get the list of array coupled variables.
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::set< TagID > & getFEVariableCoupleableVectorTags () const
 
const std::set< TagID > & getFEVariableCoupleableMatrixTags () const
 
auto & getWritableCoupledVariables () const
 returns a reference to the set of writable coupled variables
 
bool hasWritableCoupledVariables () const
 Checks whether the object has any writable coupled variables.
 
const ADVariableValue * getADDefaultValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default value for Automatic Differentiation for an uncoupled variable.
 
const ADVectorVariableValue * getADDefaultVectorValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default vector value for Automatic Differentiation for an uncoupled variable.
 
const ADVariableGradient & getADDefaultGradient () const
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled variable.
 
const ADVectorVariableGradient & getADDefaultVectorGradient () const
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled vector variable.
 
const ADVariableSecond & getADDefaultSecond () const
 Helper method to return (and insert if necessary) the default second derivatives for Automatic Differentiation for an uncoupled variable.
 
const ADVectorVariableCurl & getADDefaultCurl () const
 Helper method to return (and insert if necessary) the default curl value for Automatic Differentiation for an uncoupled variable.
 
const ADVectorVariableDivergence & getADDefaultDiv () const
 Helper method to return (and insert if necessary) the default divergence value for Automatic Differentiation for an uncoupled vector variable.
 
const ADArrayVariableValue * getADDefaultArrayValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default array value for Automatic Differentiation for an uncoupled array variable.
 
const ADArrayVariableGradient & getADDefaultArrayGradient (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled array variable.
 
const ADArrayVariableValue & getADDefaultArrayValueZero (const std::string &var_name) const
 Helper method to return (and insert if necessary) the zero default time derivative for Automatic Differentiation for an uncoupled array variable.
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValues (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradients (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValues (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValues (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDots (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalDots (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValues (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradients (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValues (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValues (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDots (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalDots (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradients (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDots (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDots (const std::string &var_name) const
 
Moose::Kokkos::Scalar< const Real > kokkosCoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosZeroValue () const
 
Moose::Kokkos::VariableGradient kokkosZeroGradient () const
 
Moose::Kokkos::VariableValue kokkosZeroNodalValue () const
 

Protected Member Functions

virtual void coupledCallback (const std::string &, bool) const
 A call-back function provided by the derived object for actions before coupling a variable with functions such as coupledValue.
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0) const
 Returns true if a variables has been coupled as name.
 
virtual bool isCoupledConstant (const std::string &var_name) const
 Returns true if a variable passed as a coupled value is really a constant.
 
unsigned int coupledComponents (const std::string &var_name) const
 Number of coupled components.
 
VariableName coupledName (const std::string &var_name, unsigned int comp=0) const
 Names of the variable in the Coupleable interface.
 
std::vector< VariableName > coupledNames (const std::string &var_name) const
 Names of the variables in the Coupleable interface.
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0) const
 Returns the index for a coupled variable by name.
 
std::vector< unsigned int > coupledIndices (const std::string &var_name) const
 Returns the indices for a coupled variable's components.
 
virtual const VariableValue & coupledValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable.
 
std::vector< const VariableValue * > coupledValues (const std::string &var_name) const
 Returns the values for all of a coupled variable components.
 
std::vector< const VectorVariableValue * > coupledVectorValues (const std::string &var_name) const
 Returns the values for all of a coupled vector variable's components.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & coupledGenericValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable for use in templated automatic differentiation classes.
 
template<bool is_ad>
const GenericVectorVariableValue< is_ad > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled vector variable for use in templated automatic differentiation classes.
 
template<bool is_ad>
std::vector< const GenericVariableValue< is_ad > * > coupledGenericValues (const std::string &var_name) const
 Returns the values for all of a coupled variable's components for use in templated automatic differentiation classes.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & coupledGenericDofValue (const std::string &var_name, unsigned int comp=0) const
 Returns DOF value of a coupled variable for use in templated automatic differentiation classes.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & coupledGenericDot (const std::string &var_name, unsigned int comp=0) const
 Returns time derivative of a coupled variable for use in templated automatic differentiation classes.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & coupledGenericDotDot (const std::string &var_name, unsigned int comp=0) const
 Returns the second time derivative of a coupled variable for use in templated automatic differentiation classes.
 
virtual const VariableValue & coupledValueLower (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled lower-dimensional variable.
 
const ADVariableValue & adCoupledValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable for use in Automatic Differentiation.
 
std::vector< const ADVariableValue * > adCoupledValues (const std::string &var_name) const
 Returns the values for all of a coupled variable's components for use in Automatic Differentiation.
 
const ADVariableValue & adCoupledLowerValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled lower-dimensional variable for use in Automatic Differentiation.
 
const ADVectorVariableValue & adCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled vector variable for use in Automatic Differentiation.
 
std::vector< const ADVectorVariableValue * > adCoupledVectorValues (const std::string &var_name) const
 Returns the values for all of a coupled vector variable's components for use in Automatic Differentiation.
 
virtual const VariableValue & coupledVectorTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled variable for a given tag.
 
virtual const VariableValue & coupledVectorTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue * > coupledVectorTagValues (const std::string &var_names, TagID tag) const
 Returns the values for all the coupled variables desired for a given tag.
 
std::vector< const VariableValue * > coupledVectorTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableValue & coupledVectorTagArrayValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled array variable for a given tag.
 
virtual const ArrayVariableValue & coupledVectorTagArrayValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableValue * > coupledVectorTagArrayValues (const std::string &var_names, TagID tag) const
 Returns the values for all the coupled variables desired for a given tag.
 
std::vector< const ArrayVariableValue * > coupledVectorTagArrayValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableGradient & coupledVectorTagGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns gradient of a coupled variable for a given tag.
 
virtual const VariableGradient & coupledVectorTagGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableGradient * > coupledVectorTagGradients (const std::string &var_names, TagID tag) const
 Returns gradients for all the coupled variables desired for a given tag.
 
std::vector< const VariableGradient * > coupledVectorTagGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableGradient & coupledVectorTagArrayGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns gradient of a coupled array variable for a given tag.
 
virtual const ArrayVariableGradient & coupledVectorTagArrayGradient (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const ArrayVariableGradient * > coupledVectorTagArrayGradients (const std::string &var_names, TagID tag) const
 Returns gradients for all the coupled variables desired for a given tag.
 
std::vector< const ArrayVariableGradient * > coupledVectorTagArrayGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValue & coupledVectorTagDofValue (const std::string &var_name, TagID tag, unsigned int index=0) const
 Returns dof value of a coupled variable for a given tag.
 
virtual const VariableValue & coupledVectorTagDofValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
const ArrayVariableValue & coupledVectorTagArrayDofValue (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 Returns evaluations of a tagged vector at the requested variable's degree of freedom indices.
 
std::vector< const VariableValue * > coupledVectorTagDofValues (const std::string &var_names, TagID tag) const
 Returns the dof values for all the coupled variables desired for a given tag.
 
std::vector< const VariableValue * > coupledVectorTagDofValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValue & coupledMatrixTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled variable for a given tag.
 
virtual const VariableValue & coupledMatrixTagValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
std::vector< const VariableValue * > coupledMatrixTagValues (const std::string &var_names, TagID tag) const
 Returns the diagonal matrix values for all the coupled variables desired for a given tag.
 
std::vector< const VariableValue * > coupledMatrixTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VectorVariableValue & coupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled vector variable.
 
virtual const ArrayVariableValue & coupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled array variable.
 
std::vector< const ArrayVariableValue * > coupledArrayValues (const std::string &var_name) const
 Returns the values for all of a coupled array variable's components.
 
const ADArrayVariableValue & adCoupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled array variable for use with Automatic Differentiation.
 
std::vector< const ADArrayVariableValue * > adCoupledArrayValues (const std::string &var_name) const
 Returns the values for all of a coupled array variable's components for use in Automatic Differentiation.
 
MooseWritableVariable & writableVariable (const std::string &var_name, unsigned int comp=0)
 Returns a writable MooseVariable object for a nodal or elemental variable.
 
virtual VariableValue & writableCoupledValue (const std::string &var_name, unsigned int comp=0)
 Returns a writable reference to a coupled variable for writing to multiple AuxVariables from a single AuxKernel or a UserObject.
 
void checkWritableVar (MooseWritableVariable *var)
 Checks that the passed in variable is only accessed writable by one object in a given subdomain.
 
virtual const VariableValue & coupledValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from previous time step of a coupled variable.
 
std::vector< const VariableValue * > coupledValuesOld (const std::string &var_name) const
 Returns the old values for all of a coupled variable's components.
 
std::vector< const VectorVariableValue * > coupledVectorValuesOld (const std::string &var_name) const
 Returns the old values for all of a coupled vector variable's components.
 
virtual const VariableValue & coupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from two time steps previous of a coupled variable.
 
std::vector< const VariableValue * > coupledValuesOlder (const std::string &var_name) const
 Returns the older values for all of a coupled variable's components.
 
virtual const VariableValue & coupledValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns value of previous Newton iterate of a coupled variable.
 
virtual const VectorVariableValue & coupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from previous time step of a coupled vector variable.
 
virtual const VectorVariableValue & coupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from two time steps previous of a coupled vector variable.
 
virtual const ArrayVariableValue & coupledArrayValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from previous time step of a coupled array variable.
 
virtual const ArrayVariableValue & coupledArrayValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from two time steps previous of a coupled array variable.
 
virtual const VariableGradient & coupledGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable.
 
std::vector< const VariableGradient * > coupledGradients (const std::string &var_name) const
 Returns the gradients for all of a coupled variable's components.
 
const ADVariableGradient & adCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for use in Automatic Differentiation.
 
const ADVariableGradient & adCoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable's time derivative for use in Automatic Differentiation.
 
std::vector< const ADVariableGradient * > adCoupledGradients (const std::string &var_name) const
 Returns the gradients for all of a coupled variable's components for use in Automatic Differentiation.
 
template<bool is_ad>
const GenericVariableGradient< is_ad > & coupledGenericGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for use in templated automatic differentiation.
 
template<bool is_ad>
std::vector< const GenericVariableGradient< is_ad > * > coupledGenericGradients (const std::string &var_name) const
 Returns the gradients for all of a coupled variable's components for use in templated automatic differentiation.
 
const ADVectorVariableGradient & adCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled vector variable for use in Automatic Differentiation.
 
const ADVariableSecond & adCoupledSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second derivatives of a coupled variable for use in Automatic Differentiation.
 
const ADVectorVariableSecond & adCoupledVectorSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second derivatives of a coupled vector variable for use in Automatic Differentiation.
 
virtual const VariableGradient & coupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from previous time step of a coupled variable.
 
std::vector< const VariableGradient * > coupledGradientsOld (const std::string &var_name) const
 Returns the old gradients for all of a coupled variable's components.
 
virtual const VariableGradient & coupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from two time steps previous of a coupled variable.
 
virtual const VariableGradient & coupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for previous Newton iterate.
 
virtual const VariableGradient & coupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of the gradient of a coupled variable.
 
virtual const VariableGradient & coupledGradientDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of the gradient of a coupled variable.
 
virtual const VectorVariableGradient & coupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled vector variable.
 
virtual const VectorVariableGradient & coupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from previous time step of a coupled vector variable.
 
virtual const VectorVariableGradient & coupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from two time steps previous of a coupled vector variable.
 
virtual const ArrayVariableGradient & coupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled array variable.
 
const ADArrayVariableGradient & adCoupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled array variable for use in Automatic Differentiation.
 
std::vector< const ADArrayVariableGradient * > adCoupledArrayGradients (const std::string &var_name) const
 Returns the gradients for all of a coupled array variable's components for use in Automatic Differentiation.
 
virtual const ArrayVariableGradient & coupledArrayGradientOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from previous time step of a coupled array variable.
 
virtual const ArrayVariableGradient & coupledArrayGradientOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from two time steps previous of a coupled array variable.
 
virtual const ArrayVariableGradient & coupledArrayGradientDot (const std::string &var_name, unsigned int comp=0) const
 Retun a gradient of a coupled array variable's time derivative.
 
virtual const VectorVariableCurl & coupledCurl (const std::string &var_name, unsigned int comp=0) const
 Returns curl of a coupled variable.
 
virtual const VectorVariableCurl & coupledCurlOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old curl from previous time step of a coupled variable.
 
virtual const VectorVariableCurl & coupledCurlOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old curl from two time steps previous of a coupled variable.
 
const ADVectorVariableCurl & adCoupledCurl (const std::string &var_name, unsigned int comp=0) const
 Returns curl of a coupled variable for use in objects utilizing Automatic Differentiation.
 
const ADVectorVariableDivergence & adCoupledDiv (const std::string &var_name, unsigned int comp=0) const
 Returns divergence of a coupled variable for use in objects utilizing Automatic Differentiation.
 
virtual const VectorVariableDivergence & coupledDiv (const std::string &var_name, unsigned int comp=0) const
 Returns divergence of a coupled variable.
 
virtual const VectorVariableDivergence & coupledDivOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old divergence from previous time step of a coupled variable.
 
virtual const VectorVariableDivergence & coupledDivOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old divergence from two time steps previous of a coupled variable.
 
virtual const VariableSecond & coupledSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second spatial derivatives of a coupled variable.
 
virtual const VariableSecond & coupledSecondOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old second spatial derivatives from previous time step of a coupled variable.
 
virtual const VariableSecond & coupledSecondOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old second derivative from two time steps previous of a coupled variable.
 
virtual const VariableSecond & coupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns second derivative of a coupled variable for the previous Newton iterate.
 
virtual const VariableValue & coupledDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable.
 
std::vector< const VariableValue * > coupledDots (const std::string &var_name) const
 Returns the time derivatives for all of a coupled variable's components.
 
virtual const VariableValue & coupledDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable.
 
virtual const VariableValue & coupledDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled variable.
 
virtual const VariableValue & coupledDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled variable.
 
const ADVariableValue & adCoupledDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable for ad simulations.
 
std::vector< const ADVariableValue * > adCoupledDots (const std::string &var_name) const
 Returns the time derivatives for all of a coupled variable's components for ad simulations.
 
const ADVariableValue & adCoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable for ad simulations.
 
const ADVectorVariableValue & adCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a vector coupled variable for ad simulations.
 
virtual const VectorVariableValue & coupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled vector variable.
 
virtual const VectorVariableValue & coupledVectorDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled vector variable.
 
virtual const VectorVariableValue & coupledVectorDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled vector variable.
 
virtual const VectorVariableValue & coupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled vector variable.
 
virtual const VariableValue & coupledVectorDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled vector variable with respect to the coefficients.
 
virtual const VariableValue & coupledVectorDotDotDu (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled vector variable with respect to the coefficients.
 
virtual const ArrayVariableValue & coupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled array variable.
 
virtual const ArrayVariableValue & coupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled array variable.
 
const ADArrayVariableValue & adCoupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled array variable for use in Automatic Differentiation.
 
const ADArrayVariableValue & adCoupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled array variable for use in Automatic Differentiation.
 
virtual const ArrayVariableValue & coupledArrayDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled array variable.
 
virtual const ArrayVariableValue & coupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled array variable.
 
virtual const VariableValue & coupledDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable with respect to the coefficients.
 
virtual const VariableValue & coupledDotDotDu (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable with respect to the coefficients.
 
const VariableValue & coupledArrayDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled array variable with respect to the coefficients.
 
template<typename T >
const T & coupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 Returns nodal values of a coupled variable.
 
template<typename T >
const Moose::ADType< T >::type & adCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 Returns AD nodal values of a coupled variable.
 
template<typename T >
const T & coupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old nodal value from previous time step of a coupled variable.
 
template<typename T >
const T & coupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old nodal value from two time steps previous of a coupled variable.
 
template<typename T >
const T & coupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns nodal values of a coupled variable for previous Newton iterate.
 
template<typename T >
const T & coupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 Nodal values of time derivative of a coupled variable.
 
virtual const VariableValue & coupledNodalDotDot (const std::string &var_name, unsigned int comp=0) const
 Nodal values of second time derivative of a coupled variable.
 
virtual const VariableValue & coupledNodalDotOld (const std::string &var_name, unsigned int comp=0) const
 Nodal values of old time derivative of a coupled variable.
 
virtual const VariableValue & coupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Nodal values of old second time derivative of a coupled variable.
 
virtual const VariableValue & coupledDofValues (const std::string &var_name, unsigned int comp=0) const
 Returns DoFs in the current solution vector of a coupled variable for the local element.
 
std::vector< const VariableValue * > coupledAllDofValues (const std::string &var_name) const
 Returns DoFs in the current solution vector of all of a coupled variable's components for the local element.
 
virtual const VariableValue & coupledDofValuesOld (const std::string &var_name, unsigned int comp=0) const
 Returns DoFs in the old solution vector of a coupled variable for the local element.
 
std::vector< const VariableValue * > coupledAllDofValuesOld (const std::string &var_name) const
 Returns DoFs in the old solution vector of all of a coupled variable's components for the local element.
 
virtual const VariableValue & coupledDofValuesOlder (const std::string &var_name, unsigned int comp=0) const
 Returns DoFs in the older solution vector of a coupled variable for the local element.
 
std::vector< const VariableValue * > coupledAllDofValuesOlder (const std::string &var_name) const
 Returns DoFs in the older solution vector of all of a coupled variable's components for the local element.
 
virtual const ArrayVariableValue & coupledArrayDofValues (const std::string &var_name, unsigned int comp=0) const
 Returns DoFs in the current solution vector of a coupled array variable for the local element.
 
virtual const ADVariableValue & adCoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 Returns DOF value of a coupled variable for use in Automatic Differentiation.
 
const ADVariableValue & adZeroValue () const
 method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects
 
const ADVariableGradient & adZeroGradient () const
 method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing objects
 
const ADVariableSecond & adZeroSecond () const
 Retrieve a zero second for automatic differentiation.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & genericZeroValue ()
 Returns zero value templated with automatic differentiation boolean.
 
template<bool is_ad>
const GenericVariableGradient< is_ad > & genericZeroGradient ()
 Returns zero gradient templated with automatic differentiation boolean.
 
template<bool is_ad>
const GenericVariableSecond< is_ad > & genericZeroSecond ()
 Returns zero second derivative templated with automatic differentiation boolean.
 
bool checkVar (const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
 Check that the right kind of variable is being coupled in.
 
virtual bool usesFaceCoupledValues () const
 Whether this object evaluates coupled variables on element faces, so that it must request coupled AD gradients through the face accessors.
 
const MooseVariableFieldBase * getFEVar (const std::string &var_name, unsigned int comp) const
 Deprecated method.
 
const MooseVariableFieldBase * getFieldVar (const std::string &var_name, unsigned int comp) const
 
MooseVariableFieldBase * getFieldVar (const std::string &var_name, unsigned int comp)
 
std::vector< const MooseVariableFieldBase * > getFieldVars (const std::string &var_name) const
 
template<typename T >
const T * getVarHelper (const std::string &var_name, unsigned int comp) const
 Helper that that be used to retrieve a variable of arbitrary type T.
 
template<typename T >
T * getVarHelper (const std::string &var_name, unsigned int comp)
 Helper that can be used to retrieve a variable of arbitrary type T.
 
template<typename T >
std::vector< const T * > getVarsHelper (const std::string &var_name) const
 Helper that can be used to retrieve all the component variables of a variable of arbitrary type T.
 
MooseVariable * getVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled variable.
 
VectorMooseVariable * getVectorVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled vector variable.
 
ArrayMooseVariable * getArrayVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled array variable.
 
const MooseVariable * getVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled variable.
 
const VectorMooseVariable * getVectorVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled vector variable.
 
const ArrayMooseVariable * getArrayVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled array variable.
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in.
 
template<typename T , typename Func >
std::vector< T > coupledVectorHelper (const std::string &var_name, const Func &func) const
 
template<>
const GenericVariableValue< false > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableValue< true > & coupledGenericValue (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVectorVariableValue< false > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVectorVariableValue< true > & coupledGenericVectorValue (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableValue< false > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableValue< true > & coupledGenericDofValue (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableValue< false > & coupledGenericDotDot (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableValue< true > & coupledGenericDotDot (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableValue< false > & genericZeroValue ()
 
template<>
const GenericVariableValue< true > & genericZeroValue ()
 
template<>
const GenericVariableGradient< false > & genericZeroGradient ()
 
template<>
const GenericVariableGradient< true > & genericZeroGradient ()
 
template<>
const GenericVariableSecond< false > & genericZeroSecond ()
 
template<>
const GenericVariableSecond< true > & genericZeroSecond ()
 
template<>
const GenericVariableGradient< false > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableGradient< true > & coupledGenericGradient (const std::string &var_name, unsigned int comp) const
 
template<>
std::vector< const GenericVariableValue< false > * > coupledGenericValues (const std::string &var_name) const
 
template<>
std::vector< const GenericVariableValue< true > * > coupledGenericValues (const std::string &var_name) const
 
template<>
std::vector< const GenericVariableGradient< false > * > coupledGenericGradients (const std::string &var_name) const
 
template<>
std::vector< const GenericVariableGradient< true > * > coupledGenericGradients (const std::string &var_name) const
 
template<>
const GenericVariableValue< false > & coupledGenericDot (const std::string &var_name, unsigned int comp) const
 
template<>
const GenericVariableValue< true > & coupledGenericDot (const std::string &var_name, unsigned int comp) const
 

Protected Attributes

const InputParameters & _c_parameters
 
const std::string & _c_name
 The name of the object this interface is part of.
 
const std::string & _c_type
 The type of the object this interface is part of.
 
FEProblemBase & _c_fe_problem
 
const SystemBase *const _c_sys
 Pointer to the system object if the moose object this is an interface for has one.
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
 Coupled vars whose values we provide.
 
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
 Vector of all coupled variables.
 
std::vector< MooseVariable * > _coupled_standard_moose_vars
 Vector of standard coupled variables.
 
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
 Vector of vector coupled variables.
 
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
 Vector of array coupled variables.
 
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
 Vector of all finite volume coupled variables.
 
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
 map from new to deprecated variable names
 
bool _c_nodal
 True if we provide coupling to nodal values.
 
bool _c_is_implicit
 True if implicit value is required.
 
const bool _c_allow_element_to_nodal_coupling
 
THREAD_ID _c_tid
 Thread ID of the thread using this object.
 
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
 Will hold the default value for optional coupled variables.
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADReal > > > _ad_default_value
 Will hold the default value for optional coupled variables for automatic differentiation.
 
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
 Will hold the default value for optional vector coupled variables.
 
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
 Will hold the default value for optional array coupled variables.
 
std::unordered_map< std::string, std::unique_ptr< ADArrayVariableValue > > _ad_default_array_value
 Will hold the default value for optional array coupled variables for automatic differentiation.
 
std::unordered_map< std::string, std::unique_ptr< ADArrayVariableGradient > > _ad_default_array_gradient
 Will hold the zero default gradient for optional array coupled variables for automatic differentiation.
 
std::unordered_map< std::string, std::unique_ptr< ADArrayVariableValue > > _ad_default_array_value_zero
 Will hold the zero default time derivative for optional array coupled variables for automatic differentiation.
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
 Will hold the default value for optional vector coupled variables for automatic differentiation.
 
VariableValue _default_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info.
 
VariableGradient _default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant.
 
MooseArray< ADRealVectorValue > _ad_default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant.
 
MooseArray< ADRealTensorValue > _ad_default_vector_gradient
 This will always be zero because the default values for optionally coupled vector variables is always constant.
 
VariableSecond _default_second
 This will always be zero because the default values for optionally coupled variables is always constant.
 
MooseArray< ADRealTensorValue > _ad_default_second
 This will always be zero because the default values for optionally coupled variables is always constant.
 
MooseArray< ADRealVectorValue > _ad_default_curl
 This will always be zero because the default values for optionally coupled vector variables is always constant.
 
MooseArray< ADReal > _ad_default_div
 Will hold the default value for optional vector coupled variable divergences for automatic differentiation.
 
const VariableValue & _zero
 Zero value of a variable.
 
const VariablePhiValue & _phi_zero
 
const MooseArray< ADReal > & _ad_zero
 
const VariableGradient & _grad_zero
 Zero gradient of a variable.
 
const MooseArray< ADRealVectorValue > & _ad_grad_zero
 
const VariablePhiGradient & _grad_phi_zero
 Zero gradient of trial function.
 
const VariableSecond & _second_zero
 Zero second derivative of a variable.
 
const MooseArray< ADRealTensorValue > & _ad_second_zero
 
const VariablePhiSecond & _second_phi_zero
 Zero second derivative of a test function.
 
const VectorVariableValue & _vector_zero
 Zero value of a vector variable.
 
const VectorVariableCurl & _vector_curl_zero
 Zero value of the curl of a vector variable.
 
VectorVariableValue _default_vector_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info.
 
VectorVariableGradient _default_vector_gradient
 This will always be zero because the default values for optionally coupled variables is always constant.
 
VectorVariableCurl _default_vector_curl
 This will always be zero because the default values for optionally coupled variables is always constant.
 
VectorVariableDivergence _default_div
 This will always be zero because the default values for optionally coupled variables is always constant.
 
ArrayVariableValue _default_array_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info.
 
ArrayVariableGradient _default_array_gradient
 This will always be zero because the default values for optionally coupled variables is always constant.
 
bool _coupleable_neighbor
 Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor values.
 

Private Types

enum class  FuncAge { Curr , Old , Older }
 
enum class  VarType {
  Ignore , Gradient , Second , GradientDot ,
  Dot
}
 

Private Member Functions

template<typename T >
const OutputTools< T >::VariableValue & vectorTagValueHelper (const std::string &var_names, TagID tag, unsigned int index=0) const
 Generic helper method to get vector tag values based on tag ID.
 
template<typename T >
const OutputTools< T >::VariableValue & vectorTagValueHelper (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 Generic helper method to get vector tag values based on tag name.
 
template<typename T >
const OutputTools< T >::VariableValue & vectorTagDofValueHelper (const std::string &var_name, TagID tag, unsigned int comp=0) const
 Generic helper method to get vector tag degree of freedom values based on tag ID.
 
template<typename T >
const OutputTools< T >::VariableValue & vectorTagDofValueHelper (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 Generic helper method to get vector tag degree of freedom values based on tag name.
 
template<typename T >
void requestStates (const std::string &var_name, const TagName &tag_name, const unsigned int comp)
 Method that may request additional solution states from the variable's system depending on the value of tag_name.
 
void checkFuncType (const std::string var_name, VarType t, FuncAge age) const
 
const VariableValue * getDefaultValue (const std::string &var_name, unsigned int comp) const
 Helper method to return (and insert if necessary) the default value for an uncoupled variable.
 
const VectorVariableValue * getDefaultVectorValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default value for an uncoupled vector variable.
 
const ArrayVariableValue * getDefaultArrayValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default value for an uncoupled array variable.
 
template<typename T >
const T & getDefaultNodalValue (const std::string &var_name, unsigned int comp=0) const
 Get nodal default value.
 
template<typename T >
const Moose::Functor< T > & getDefaultFunctor (const std::string &var_name) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVariable (const std::string &var_name, const std::string &tag_name, unsigned int comp) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVariables (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVectorVariable (const std::string &var_name, const std::string &tag_name, unsigned int comp) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVectorVariables (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::Variable kokkosZeroVariable () const
 
template<>
const RealVectorValue & getDefaultNodalValue (const std::string &var_name, unsigned int) const
 
template<>
const RealEigenVector & getDefaultNodalValue (const std::string &var_name, unsigned int) const
 

Private Attributes

unsigned int _coupleable_max_qps
 Maximum qps for any element in this system.
 
std::unordered_map< std::string, std::vector< unsigned int > > _optional_var_index
 Unique indices for optionally coupled vars that weren't provided.
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
 Scalar variables coupled into this object (for error checking)
 
std::set< TagID > _fe_coupleable_vector_tags
 
std::set< TagID > _fe_coupleable_matrix_tags
 
const bool _is_fv
 Whether the MooseObject is a finite volume object.
 
const MooseObject *const _obj
 
const std::set< std::string > _older_state_tags
 vector tag names for which we need to request older solution states from the system
 
std::vector< std::set< MooseWritableVariable * > > _writable_coupled_variables
 keep a set of allocated writable variable references to make sure only one object can obtain them per thread
 
const Real _kokkos_default_value_zero = 0
 kokkos-related variables and methods
 

Detailed Description

Interface for objects that needs coupling capabilities.

Definition at line 52 of file Coupleable.h.

Member Enumeration Documentation

◆ FuncAge

enum class Coupleable::FuncAge
strongprivate
Enumerator
Curr 
Old 
Older 

Definition at line 1679 of file Coupleable.h.

1680 {
1681 Curr,
1682 Old,
1683 Older,
1684 };

◆ VarType

enum class Coupleable::VarType
strongprivate
Enumerator
Ignore 
Gradient 
Second 
GradientDot 
Dot 

Definition at line 1686 of file Coupleable.h.

Constructor & Destructor Documentation

◆ Coupleable() [1/2]

Coupleable::Coupleable ( const MooseObject *  moose_object,
bool  nodal,
bool  is_fv = false 
)

Constructing the object.

Parameters
parametersParameters that come from constructing the object
nodaltrue if we need to couple with nodal values, otherwise false
is_fvWhether the MooseObject is a finite volume object

Definition at line 28 of file Coupleable.C.

29 : _c_parameters(moose_object->parameters()),
30 _c_name(moose_object->name()),
31 _c_type(moose_object->type()),
33 _c_sys(_c_parameters.isParamValid("_sys") ? _c_parameters.get<SystemBase *>("_sys") : nullptr),
34 _new_to_deprecated_coupled_vars(_c_parameters.getNewToDeprecatedVarMap()),
35 _c_nodal(nodal),
36 _c_is_implicit(_c_parameters.have_parameter<bool>("implicit")
37 ? _c_parameters.get<bool>("implicit")
38 : true),
40 _c_parameters.have_parameter<bool>("_allow_nodal_to_elemental_coupling")
41 ? _c_parameters.get<bool>("_allow_nodal_to_elemental_coupling")
42 : false),
55 _coupleable_neighbor(_c_parameters.have_parameter<bool>("_neighbor")
56 ? _c_parameters.get<bool>("_neighbor")
57 : false),
59 _is_fv(is_fv),
60 _obj(moose_object),
62{
63 SubProblem & problem = *_c_parameters.getCheckedPointerParam<SubProblem *>("_subproblem");
65
66 unsigned int optional_var_index_counter = 0;
67
68 // Coupling
69 for (auto iter = _c_parameters.coupledVarsBegin(); iter != _c_parameters.coupledVarsEnd(); ++iter)
70 {
71 std::string name = *iter;
72
73 std::vector<std::string> vars = _c_parameters.getVecMooseType(name);
74 if (vars.size() > 0)
75 {
76 for (const auto & coupled_var_name : vars)
77 {
78 if (problem.hasVariable(coupled_var_name))
79 {
80 MooseVariableFieldBase * moose_var =
81 &problem.getVariable(_c_tid,
82 coupled_var_name,
85 _coupled_vars[name].push_back(moose_var);
86 _coupled_moose_vars.push_back(moose_var);
87 if (auto * tmp_var = dynamic_cast<MooseVariable *>(moose_var))
88 _coupled_standard_moose_vars.push_back(tmp_var);
89 else if (auto * tmp_var = dynamic_cast<VectorMooseVariable *>(moose_var))
90 _coupled_vector_moose_vars.push_back(tmp_var);
91 else if (auto * tmp_var = dynamic_cast<ArrayMooseVariable *>(moose_var))
92 _coupled_array_moose_vars.push_back(tmp_var);
93 else if (auto * tmp_var = dynamic_cast<MooseVariableFV<Real> *>(moose_var))
94 _coupled_fv_moose_vars.push_back(tmp_var);
95 else if (auto * tmp_var = dynamic_cast<MooseLinearVariableFV<Real> *>(moose_var))
96 _coupled_fv_moose_vars.push_back(tmp_var);
97 else
98 _obj->paramError(name, "provided c++ type for variable parameter is not supported");
99 }
100 else if (problem.hasScalarVariable(coupled_var_name))
101 {
102 MooseVariableScalar * moose_scalar_var =
103 &problem.getScalarVariable(_c_tid, coupled_var_name);
104 _c_coupled_scalar_vars[name].push_back(moose_scalar_var);
105 }
106 else
107 _obj->paramError(name, "coupled variable '", coupled_var_name, "' was not found");
108 }
109 }
110 else // This means it was optional coupling. Let's assign a unique id to this variable
111 {
113 for (unsigned int j = 0; j < _optional_var_index[name].size(); ++j)
114 _optional_var_index[name][j] =
115 std::numeric_limits<unsigned int>::max() - optional_var_index_counter;
116 ++optional_var_index_counter;
117 }
118 }
119}
unsigned int THREAD_ID
Definition MooseTypes.h:237
char ** vars
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
Scalar variables coupled into this object (for error checking)
bool _c_is_implicit
True if implicit value is required.
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
std::unordered_map< std::string, std::vector< unsigned int > > _optional_var_index
Unique indices for optionally coupled vars that weren't provided.
const VariableValue & _zero
Zero value of a variable.
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
const VariableGradient & _grad_zero
Zero gradient of a variable.
const MooseObject *const _obj
bool _c_nodal
True if we provide coupling to nodal values.
const MooseArray< ADRealTensorValue > & _ad_second_zero
const VectorVariableCurl & _vector_curl_zero
Zero value of the curl of a vector variable.
const std::string & _c_name
The name of the object this interface is part of.
const VariablePhiGradient & _grad_phi_zero
Zero gradient of trial function.
FEProblemBase & _c_fe_problem
THREAD_ID _c_tid
Thread ID of the thread using this object.
const VariableSecond & _second_zero
Zero second derivative of a variable.
const InputParameters & _c_parameters
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
const bool _c_allow_element_to_nodal_coupling
const SystemBase *const _c_sys
Pointer to the system object if the moose object this is an interface for has one.
const MooseArray< ADRealVectorValue > & _ad_grad_zero
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
const VectorVariableValue & _vector_zero
Zero value of a vector variable.
const VariablePhiSecond & _second_phi_zero
Zero second derivative of a test function.
const VariablePhiValue & _phi_zero
std::vector< std::set< MooseWritableVariable * > > _writable_coupled_variables
keep a set of allocated writable variable references to make sure only one object can obtain them per...
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
map from new to deprecated variable names
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor v...
const std::string & _c_type
The type of the object this interface is part of.
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
const MooseArray< ADReal > & _ad_zero
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
Vector of all finite volume coupled variables.
const bool _is_fv
Whether the MooseObject is a finite volume object.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::vector< std::string > getVecMooseType(const std::string &name) const
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
std::set< std::string >::const_iterator coupledVarsEnd() const
std::set< std::string >::const_iterator coupledVarsBegin() const
Methods returning iterators to the coupled variables names stored in this InputParameters object.
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...
void registerInterfaceObject(T &interface)
Registers an interface object for accessing with getInterfaceObjects.
Definition MooseApp.h:1782
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & type() const
Get the type of this class.
Definition MooseBase.h:93
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:457
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition MooseBase.h:87
This class provides variable solution interface for linear finite volume problems.
This class provides variable solution values for other classes/objects to bind to when looping over f...
This class provides an interface for common operations on field variables of both FE and FV types wit...
Class for scalar variables (they are different).
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const =0
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual bool hasScalarVariable(const std::string &var_name) const =0
Returns a Boolean indicating whether any system contains a variable with the name provided.
virtual bool hasVariable(const std::string &var_name) const =0
Whether or not this problem has the variable.
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the scalar variable reference from whichever system contains it.
Base class for a system (of equations)
Definition SystemBase.h:87
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
@ VAR_FIELD_ANY
Definition MooseTypes.h:785
constexpr std::size_t constMaxQpsPerElem
This is used for places where we initialize some qp-sized data structures that would end up being siz...
Definition MooseTypes.h:258
@ VAR_ANY
Definition MooseTypes.h:776
std::string name(const ElemQuality q)
const Elem & get(const ElemType type_in)

◆ Coupleable() [2/2]

Coupleable::Coupleable ( const Coupleable &  object,
const Moose::Kokkos::FunctorCopy &  key 
)

Special constructor used for Kokkos functor copy during parallel dispatch.

Definition at line 122 of file Coupleable.C.

Member Function Documentation

◆ adCoupledArrayDot()

const ADArrayVariableValue & Coupleable::adCoupledArrayDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Time derivative of a coupled array variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ADArrayVariableValue containing the time derivative of the coupled variable

Definition at line 1455 of file Coupleable.C.

1456{
1457 const auto * var = getArrayVar(var_name, comp);
1458 if (!var)
1459 return getADDefaultArrayValueZero(var_name);
1461
1462 if (_c_nodal)
1463 mooseError("Not implemented");
1464
1466 return var->adUDot();
1467 return var->adUDotNeighbor();
1468}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition Coupleable.C:217
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition Coupleable.C:337
const ADArrayVariableValue & getADDefaultArrayValueZero(const std::string &var_name) const
Helper method to return (and insert if necessary) the zero default time derivative for Automatic Diff...

◆ adCoupledArrayDotDot()

const ADArrayVariableValue & Coupleable::adCoupledArrayDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Second time derivative of a coupled array variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ADArrayVariableValue containing the second time derivative of the coupled variable

Definition at line 1471 of file Coupleable.C.

1472{
1473 const auto * var = getArrayVar(var_name, comp);
1474 if (!var)
1475 return getADDefaultArrayValueZero(var_name);
1477
1478 if (_c_nodal)
1479 mooseError("Not implemented");
1480
1482 return var->adUDotDot();
1483 return var->adUDotDotNeighbor();
1484}

◆ adCoupledArrayGradient()

const ADArrayVariableGradient & Coupleable::adCoupledArrayGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns gradient of a coupled array variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ADArrayVariableGradient containing the gradient of the coupled array variable
See also
ADArrayKernel::_grad_u

Definition at line 1764 of file Coupleable.C.

1765{
1766 const auto * var = getArrayVar(var_name, comp);
1767 if (!var)
1768 return getADDefaultArrayGradient(var_name);
1770
1771 if (!_c_is_implicit)
1772 mooseError("Not implemented");
1773
1775 return usesFaceCoupledValues() ? var->adGradSlnFace() : var->adGradSln();
1776 return var->adGradSlnNeighbor();
1777}
virtual bool usesFaceCoupledValues() const
Whether this object evaluates coupled variables on element faces, so that it must request coupled AD ...
const ADArrayVariableGradient & getADDefaultArrayGradient(const std::string &var_name) const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...

Referenced by adCoupledArrayGradients().

◆ adCoupledArrayGradients()

std::vector< const ADArrayVariableGradient * > Coupleable::adCoupledArrayGradients ( const std::string &  var_name) const
protected

Returns the gradients for all of a coupled array variable's components for use in Automatic Differentiation.

Parameters
var_nameName of coupled array variable
Returns
Vector of ADArrayVariableGradient pointers for each component of var_name

Definition at line 1780 of file Coupleable.C.

1781{
1782 auto func = [this, &var_name](unsigned int comp)
1783 { return &adCoupledArrayGradient(var_name, comp); };
1784 return coupledVectorHelper<const ADArrayVariableGradient *>(var_name, func);
1785}
const ADArrayVariableGradient & adCoupledArrayGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled array variable for use in Automatic Differentiation.

◆ adCoupledArrayValue()

const ADArrayVariableValue & Coupleable::adCoupledArrayValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns value of a coupled array variable for use with Automatic Differentiation.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ADArrayVariableValue for the coupled array variable
See also
ADArrayKernel::_u

Definition at line 909 of file Coupleable.C.

910{
911 const auto * var = getArrayVar(var_name, comp);
912 if (!var)
913 return *getADDefaultArrayValue(var_name);
915
916 if (_c_nodal)
917 mooseError("Not implemented");
918 if (!_c_is_implicit)
919 mooseError("Not implemented");
920
922 return var->adSln();
923 return var->adSlnNeighbor();
924}
const ADArrayVariableValue * getADDefaultArrayValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default array value for Automatic Differentiati...

Referenced by adCoupledArrayValues().

◆ adCoupledArrayValues()

std::vector< const ADArrayVariableValue * > Coupleable::adCoupledArrayValues ( const std::string &  var_name) const
protected

Returns the values for all of a coupled array variable's components for use in Automatic Differentiation.

Parameters
var_nameName of coupled array variable
Returns
Vector of ADArrayVariableValue pointers for each component of var_name

Definition at line 927 of file Coupleable.C.

928{
929 auto func = [this, &var_name](unsigned int comp) { return &adCoupledArrayValue(var_name, comp); };
930 return coupledVectorHelper<const ADArrayVariableValue *>(var_name, func);
931}
const ADArrayVariableValue & adCoupledArrayValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled array variable for use with Automatic Differentiation.
Definition Coupleable.C:909

◆ adCoupledCurl()

const ADVectorVariableCurl & Coupleable::adCoupledCurl ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns curl of a coupled variable for use in objects utilizing Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to an ADVectorVariableCurl containing the curl of the coupled variable
See also
Kernel::_curl_u

Definition at line 1875 of file Coupleable.C.

1876{
1877 const auto * var = getVectorVar(var_name, comp);
1878
1879 if (!var)
1880 return getADDefaultCurl();
1882
1883 if (!_c_is_implicit)
1884 mooseError("Not implemented");
1885
1887 return var->adCurlSln();
1888 return var->adCurlSlnNeighbor();
1889}
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition Coupleable.C:325
const ADVectorVariableCurl & getADDefaultCurl() const
Helper method to return (and insert if necessary) the default curl value for Automatic Differentiatio...

◆ adCoupledDiv()

const ADVectorVariableDivergence & Coupleable::adCoupledDiv ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns divergence of a coupled variable for use in objects utilizing Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to an ADVectorVariableDivergence containing the divergence of the coupled variable
See also
Kernel::_div_u

Definition at line 1892 of file Coupleable.C.

1893{
1894 const auto * var = getVectorVar(var_name, comp);
1895
1896 if (!var)
1897 return getADDefaultDiv();
1899
1900 if (!_c_is_implicit)
1901 mooseError("Not implemented");
1902
1904 return var->adDivSln();
1905 return var->adDivSlnNeighbor();
1906}
const ADVectorVariableDivergence & getADDefaultDiv() const
Helper method to return (and insert if necessary) the default divergence value for Automatic Differen...

◆ adCoupledDofValues()

const ADVariableValue & Coupleable::adCoupledDofValues ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns DOF value of a coupled variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to an ADVariableValue for the DoFs of the coupled variable

Definition at line 2236 of file Coupleable.C.

2237{
2238 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2239
2240 if (!var)
2241 return *getADDefaultValue(var_name);
2243
2244 if (!_c_is_implicit)
2245 mooseError("Not implemented");
2246
2248 return var->adDofValues();
2249 return var->adDofValuesNeighbor();
2250}
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...

Referenced by coupledGenericDofValue().

◆ adCoupledDot()

const ADVariableValue & Coupleable::adCoupledDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Time derivative of a coupled variable for ad simulations.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the time derivative of the coupled variable
See also
Kernel::dot

Definition at line 2388 of file Coupleable.C.

2389{
2390 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2391
2392 if (!var)
2393 return *getADDefaultValue(var_name);
2395
2397 {
2398 if (_c_nodal)
2399 return var->adDofValuesDot();
2400 return var->adUDot();
2401 }
2402 else
2403 {
2404 if (_c_nodal)
2405 mooseError("AD neighbor nodal dof dot not implemented");
2406 return var->adUDotNeighbor();
2407 }
2408}

Referenced by adCoupledDots(), and coupledGenericDot().

◆ adCoupledDotDot()

const ADVariableValue & Coupleable::adCoupledDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Second time derivative of a coupled variable for ad simulations.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to an ADVariableValue containing the second time derivative of the coupled variable

Definition at line 2411 of file Coupleable.C.

2412{
2413 const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2414
2415 if (!var)
2416 return *getADDefaultValue(var_name);
2418
2419 if (_c_nodal)
2420 mooseError("Not implemented");
2421
2423 return var->adUDotDot();
2424 return var->adUDotDotNeighbor();
2425}

Referenced by coupledGenericDotDot().

◆ adCoupledDots()

std::vector< const ADVariableValue * > Coupleable::adCoupledDots ( const std::string &  var_name) const
protected

Returns the time derivatives for all of a coupled variable's components for ad simulations.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each component of var_name

Definition at line 2949 of file Coupleable.C.

2950{
2951 auto func = [this, &var_name](unsigned int comp) { return &adCoupledDot(var_name, comp); };
2952 return coupledVectorHelper<const ADVariableValue *>(var_name, func);
2953}
const ADVariableValue & adCoupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable for ad simulations.

◆ adCoupledGradient()

const ADVariableGradient & Coupleable::adCoupledGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns gradient of a coupled variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to an ADVariableGradient containing the gradient of the coupled variable
See also
Kernel::gradient

Definition at line 2327 of file Coupleable.C.

2328{
2329 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2330
2331 if (!var)
2332 return getADDefaultGradient();
2334
2335 if (!_c_is_implicit)
2336 mooseError("Not implemented");
2337
2339 return usesFaceCoupledValues() ? var->adGradSlnFace() : var->adGradSln();
2340 return var->adGradSlnNeighbor();
2341}
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...

Referenced by adCoupledGradients(), and coupledGenericGradient().

◆ adCoupledGradientDot()

const ADVariableGradient & Coupleable::adCoupledGradientDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns gradient of a coupled variable's time derivative for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to an ADVariableGradient containing the gradient of the coupled variable's time derivative

Definition at line 2344 of file Coupleable.C.

2345{
2346 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2347
2348 if (!var)
2349 return getADDefaultGradient();
2351
2352 if (!_c_is_implicit)
2353 mooseError("Not implemented");
2354 mooseAssert(!usesFaceCoupledValues(),
2355 "The AD gradient time derivative is not computed on element faces");
2356
2358 return var->adGradSlnDot();
2359 return var->adGradSlnNeighborDot();
2360}

◆ adCoupledGradients()

std::vector< const ADVariableGradient * > Coupleable::adCoupledGradients ( const std::string &  var_name) const
protected

Returns the gradients for all of a coupled variable's components for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
Returns
Vector of ADVariableGradient pointers for each component of var_name

Definition at line 2928 of file Coupleable.C.

2929{
2930 auto func = [this, &var_name](unsigned int comp) { return &adCoupledGradient(var_name, comp); };
2931 return coupledVectorHelper<const ADVariableGradient *>(var_name, func);
2932}
const ADVariableGradient & adCoupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for use in Automatic Differentiation.

◆ adCoupledLowerValue()

const ADVariableValue & Coupleable::adCoupledLowerValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns value of a coupled lower-dimensional variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a ADVariableValue for the coupled variable

Definition at line 2309 of file Coupleable.C.

2310{
2311 auto var = getVarHelper<MooseVariableFE<Real>>(var_name, comp);
2312
2313 if (!var)
2314 return *getADDefaultValue(var_name);
2316
2317 if (!_c_is_implicit)
2318 mooseError("adCoupledLowerValue cannot be called in a coupleable neighbor object");
2319
2320 if (_c_nodal)
2321 return var->adDofValues();
2322 else
2323 return var->adSlnLower();
2324}

◆ adCoupledNodalValue()

template<typename T >
template const ADRealVectorValue & Coupleable::adCoupledNodalValue< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns AD nodal values of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable

Definition at line 2267 of file Coupleable.C.

2268{
2269 static const typename Moose::ADType<T>::type zero = 0;
2270 if (!isCoupled(var_name))
2271 return zero;
2272
2273 if (!_c_nodal)
2274 mooseError("The adCoupledNodalValue method should only be called for nodal computing objects");
2276 mooseError(
2277 "The adCoupledNodalValue method shouldn't be called for neighbor computing objects. I "
2278 "don't even know what that would mean, although maybe someone could explain it to me.");
2279 if (!_c_is_implicit)
2280 mooseError("If you're going to use an explicit scheme, then use coupledNodalValue instead of "
2281 "adCoupledNodalValue");
2282
2283 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2284
2285 return var->adNodalValue();
2286}
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled as name.
Definition Coupleable.C:154
const Number zero

◆ adCoupledSecond()

const ADVariableSecond & Coupleable::adCoupledSecond ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns second derivatives of a coupled variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the second derivatives of the coupled variable

Definition at line 2363 of file Coupleable.C.

2364{
2365 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2366
2367 if (!var)
2368 return getADDefaultSecond();
2370
2371 if (!_c_is_implicit)
2372 mooseError("Not implemented");
2373
2375 return var->adSecondSln();
2376 else
2377 return var->adSecondSlnNeighbor();
2378}
const ADVariableSecond & getADDefaultSecond() const
Helper method to return (and insert if necessary) the default second derivatives for Automatic Differ...

◆ adCoupledValue()

const ADVariableValue & Coupleable::adCoupledValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns value of a coupled variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a ADVariableValue for the coupled variable

Definition at line 2289 of file Coupleable.C.

2290{
2291 const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2292
2293 if (!var)
2294 return *getADDefaultValue(var_name);
2296
2297 if (!_c_is_implicit)
2298 mooseError("Not implemented");
2299
2300 if (_c_nodal)
2301 return var->adDofValues();
2302
2304 return var->adSln();
2305 return var->adSlnNeighbor();
2306}

Referenced by adCoupledValues(), and coupledGenericValue().

◆ adCoupledValues()

std::vector< const ADVariableValue * > Coupleable::adCoupledValues ( const std::string &  var_name) const
protected

Returns the values for all of a coupled variable's components for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
Returns
Vector of ADVariableValue pointers for each component of var_name

Definition at line 2731 of file Coupleable.C.

2732{
2733 auto func = [this, &var_name](unsigned int comp) { return &adCoupledValue(var_name, comp); };
2734 return coupledVectorHelper<const ADVariableValue *>(var_name, func);
2735}
const ADVariableValue & adCoupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable for use in Automatic Differentiation.

◆ adCoupledVectorDot()

const ADVectorVariableValue & Coupleable::adCoupledVectorDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Time derivative of a vector coupled variable for ad simulations.

Parameters
var_nameName of vector coupled variable
compComponent number
Returns
Reference to a VectorVariableValue containing the time derivative of the coupled variable
See also
Kernel::dot

Definition at line 2428 of file Coupleable.C.

2429{
2430 const auto * var = getVectorVar(var_name, comp);
2431 if (!var)
2432 return *getADDefaultVectorValue(var_name);
2434
2435 if (_c_nodal)
2436 mooseError("Not implemented");
2437
2439 return var->adUDot();
2440 return var->adUDotNeighbor();
2441}
const ADVectorVariableValue * getADDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default vector value for Automatic Differentiat...

◆ adCoupledVectorGradient()

const ADVectorVariableGradient & Coupleable::adCoupledVectorGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns gradient of a coupled vector variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableGradient containing the gradient of the coupled variable
See also
Kernel::gradient

Definition at line 2462 of file Coupleable.C.

2463{
2464 const auto * var = getVectorVar(var_name, comp);
2465 if (!var)
2468
2469 if (!_c_is_implicit)
2470 mooseError("Not implemented");
2471
2473 return usesFaceCoupledValues() ? var->adGradSlnFace() : var->adGradSln();
2474 return var->adGradSlnNeighbor();
2475}
const ADVectorVariableGradient & getADDefaultVectorGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...

◆ adCoupledVectorSecond()

const ADVectorVariableSecond & Coupleable::adCoupledVectorSecond ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns second derivatives of a coupled vector variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableSecond containing the second derivatives of the coupled variable

◆ adCoupledVectorValue()

const ADVectorVariableValue & Coupleable::adCoupledVectorValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns value of a coupled vector variable for use in Automatic Differentiation.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable
See also
Kernel::value

Definition at line 2444 of file Coupleable.C.

2445{
2446 const auto * var = getVectorVar(var_name, comp);
2447 if (!var)
2448 return *getADDefaultVectorValue(var_name);
2450
2451 if (_c_nodal)
2452 mooseError("Not implemented");
2453 if (!_c_is_implicit)
2454 mooseError("Not implemented");
2455
2457 return var->adSln();
2458 return var->adSlnNeighbor();
2459}

Referenced by adCoupledVectorValues(), and coupledGenericVectorValue().

◆ adCoupledVectorValues()

std::vector< const ADVectorVariableValue * > Coupleable::adCoupledVectorValues ( const std::string &  var_name) const
protected

Returns the values for all of a coupled vector variable's components for use in Automatic Differentiation.

Parameters
var_nameName of coupled variable
Returns
Vector of ADVariableValue pointers for each component of var_name

Definition at line 2738 of file Coupleable.C.

2739{
2740 auto func = [this, &var_name](unsigned int comp)
2741 { return &adCoupledVectorValue(var_name, comp); };
2742 return coupledVectorHelper<const ADVectorVariableValue *>(var_name, func);
2743}
const ADVectorVariableValue & adCoupledVectorValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled vector variable for use in Automatic Differentiation.

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inline

Definition at line 118 of file Coupleable.h.

118{ _fe_coupleable_matrix_tags.insert(tag); }
std::set< TagID > _fe_coupleable_matrix_tags

Referenced by coupledMatrixTagValue().

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inline

Definition at line 116 of file Coupleable.h.

116{ _fe_coupleable_vector_tags.insert(tag); }
std::set< TagID > _fe_coupleable_vector_tags

Referenced by coupledVectorTagArrayGradient(), coupledVectorTagGradient(), vectorTagDofValueHelper(), and vectorTagValueHelper().

◆ adZeroGradient()

const ADVariableGradient & Coupleable::adZeroGradient ( ) const
protected

method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing objects

Definition at line 2602 of file Coupleable.C.

2603{
2604 mooseDeprecated("Method adZeroGradient() is deprecated. Use '_ad_grad_zero' instead.");
2605 return _ad_grad_zero;
2606}
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition MooseError.h:363

◆ adZeroSecond()

const ADVariableSecond & Coupleable::adZeroSecond ( ) const
protected

Retrieve a zero second for automatic differentiation.

Definition at line 2609 of file Coupleable.C.

2610{
2611 mooseDeprecated("Method adZeroSecond() is deprecated. Use '_ad_second_zero' instead.");
2612 return _ad_second_zero;
2613}

◆ adZeroValue()

const ADVariableValue & Coupleable::adZeroValue ( ) const
protected

method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects

Definition at line 2595 of file Coupleable.C.

2596{
2597 mooseDeprecated("Method adZeroValue() is deprecated. Use '_ad_zero' instead.");
2598 return _ad_zero;
2599}

◆ checkFuncType()

void Coupleable::checkFuncType ( const std::string  var_name,
VarType  t,
FuncAge  age 
) const
private

Definition at line 217 of file Coupleable.C.

218{
219 if (t == VarType::Gradient && _c_nodal)
220 mooseError(_c_name, ": nodal variables do not have gradients at nodes");
221
222 if (age == FuncAge::Old || age == FuncAge::Older || t == VarType::GradientDot ||
223 t == VarType::Dot)
224 validateExecutionerType(var_name, "coupled[Vector][Gradient/Dot]Old[er]");
225 if (age == FuncAge::Older && !_c_is_implicit)
226 mooseError("object '",
227 _c_name,
228 "' uses older variable values that are unavailable with explicit schemes");
229
230 coupledCallback(var_name, age == FuncAge::Old || age == FuncAge::Older);
231}
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
virtual void coupledCallback(const std::string &, bool) const
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition Coupleable.h:149

Referenced by adCoupledArrayDot(), adCoupledArrayDotDot(), adCoupledArrayGradient(), adCoupledArrayValue(), adCoupledCurl(), adCoupledDiv(), adCoupledDofValues(), adCoupledDot(), adCoupledDotDot(), adCoupledGradient(), adCoupledGradientDot(), adCoupledLowerValue(), adCoupledSecond(), adCoupledValue(), adCoupledVectorDot(), adCoupledVectorGradient(), adCoupledVectorValue(), coupled(), coupledAllDofValues(), coupledArrayDofValues(), coupledArrayDot(), coupledArrayDotDot(), coupledArrayDotDotOld(), coupledArrayDotDu(), coupledArrayDotOld(), coupledArrayGradient(), coupledArrayGradientDot(), coupledArrayGradientOld(), coupledArrayGradientOlder(), coupledArrayValue(), coupledArrayValueOld(), coupledArrayValueOlder(), coupledCurl(), coupledCurlOld(), coupledCurlOlder(), coupledDiv(), coupledDivOld(), coupledDivOlder(), coupledDofValues(), coupledDofValuesOld(), coupledDofValuesOlder(), coupledDot(), coupledDotDot(), coupledDotDotDu(), coupledDotDotOld(), coupledDotDu(), coupledDotOld(), coupledGradient(), coupledGradientDot(), coupledGradientDotDot(), coupledGradientOld(), coupledGradientOlder(), coupledGradientPreviousNL(), coupledMatrixTagValue(), coupledNodalDot(), coupledNodalDotDot(), coupledNodalDotDotOld(), coupledNodalDotOld(), coupledNodalValue(), coupledNodalValueOld(), coupledNodalValueOlder(), coupledNodalValuePreviousNL(), coupledSecond(), coupledSecondOld(), coupledSecondOlder(), coupledSecondPreviousNL(), coupledValue(), coupledValueLower(), coupledValueOld(), coupledValueOlder(), coupledValuePreviousNL(), coupledVectorDot(), coupledVectorDotDot(), coupledVectorDotDotDu(), coupledVectorDotDotOld(), coupledVectorDotDu(), coupledVectorDotOld(), coupledVectorGradient(), coupledVectorGradientOld(), coupledVectorGradientOlder(), coupledVectorTagArrayGradient(), coupledVectorTagGradient(), coupledVectorValue(), coupledVectorValueOld(), coupledVectorValueOlder(), vectorTagDofValueHelper(), and vectorTagValueHelper().

◆ checkVar()

bool Coupleable::checkVar ( const std::string &  var_name,
unsigned int  comp = 0,
unsigned int  comp_bound = 0 
) const
protected

Check that the right kind of variable is being coupled in.

Parameters
var_nameThe name of the coupled variable

Definition at line 234 of file Coupleable.C.

237{
238 const auto & var_name = _c_parameters.checkForRename(var_name_in);
239 auto it = _c_coupled_scalar_vars.find(var_name);
240 if (it != _c_coupled_scalar_vars.end())
241 {
242 std::string cvars;
243 for (auto jt : it->second)
244 cvars += " " + jt->name();
245
246 _obj->paramError(var_name,
247 "cannot couple '",
248 var_name,
249 "' to a scalar variable (",
250 cvars,
251 ") where field variable is expected");
252 }
253
254 if (!isCoupled(var_name, comp))
255 return false; // return false since variable is *not* coupled
256
257 auto vars_vector_it = _coupled_vars.find(var_name);
258 if (vars_vector_it == _coupled_vars.end())
259 mooseError(_c_name, ": Trying to get a coupled var ", var_name, " that doesn't exist");
260
261 const auto & vars_vector = vars_vector_it->second;
262
263 auto bound = comp_bound ? comp_bound : vars_vector.size();
264 checkComponent(_obj, comp, bound, var_name);
265
266 // We should know we have a variable now
267 const auto * var = vars_vector[comp];
268 if (!var)
270 _c_name,
271 ": We did all our checks for the existence of a var, yet we still don't have a var!?");
272
273 // Only perform the following checks for objects that feed into residuals/Jacobians, e.g. objects
274 // that inherit from the TaggingInterface
275 if (_c_parameters.have_parameter<MultiMooseEnum>("vector_tags"))
276 {
277 // Are we attempting to couple to a non-FV var in an FV object?
278 if (!var->isFV() && _is_fv)
279 mooseError("Attempting to couple non-FV variable ",
280 var->name(),
281 " into an FV object ",
282 _c_name,
283 ". This is not currently supported");
284 }
285
286 if (!(vars_vector[comp])->isNodal() && _c_nodal && !_c_allow_element_to_nodal_coupling)
287 mooseError(_c_name, ": cannot couple elemental variables into nodal objects");
288
289 return true;
290}
void checkComponent(const MooseObject *obj, unsigned int comp, unsigned int bound, const std::string &var_name)
Definition Coupleable.C:203
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
const std::string & checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.

Referenced by getVarHelper().

◆ checkWritableVar()

void Coupleable::checkWritableVar ( MooseWritableVariable *  var)
protected

Checks that the passed in variable is only accessed writable by one object in a given subdomain.

Definition at line 1009 of file Coupleable.C.

1010{
1011 // check domain restrictions for compatibility
1012 const auto * br = dynamic_cast<const BlockRestrictable *>(this);
1013 const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
1014 const auto * mat = dynamic_cast<const Material *>(this);
1015
1016 if (br && !var->hasBlocks(br->blockIDs()))
1017 mooseError("The variable '",
1018 var->name(),
1019 "' must be defined on all blocks '",
1020 _obj->name(),
1021 "' is defined on.");
1022
1023 if (nfc && !var->hasBlocks(nfc->getSecondaryConnectedBlocks()))
1024 mooseError("The variable '",
1025 var->name(),
1026 " must be defined on all blocks '",
1027 _obj->name(),
1028 "'s secondary surface is defined on.");
1029
1030 // make sure only one object can access a variable
1031 for (const auto & ci : _obj->getMooseApp().getInterfaceObjects<Coupleable>())
1032 if (ci != this && ci->_writable_coupled_variables[_c_tid].count(var))
1033 {
1034 // if both this and ci are block restrictable then we check if the block restrictions
1035 // are not overlapping. If they don't we permit the call.
1036 const auto * br_other = dynamic_cast<const BlockRestrictable *>(ci);
1037 if (br && br_other && br->blockRestricted() && br_other->blockRestricted() &&
1038 !MooseUtils::setsIntersect(br->blockIDs(), br_other->blockIDs()))
1039 continue;
1040 else if (nfc)
1041 continue;
1042 // three materials per material declared
1043 else if (mat)
1044 continue;
1045
1046 mooseError("'",
1047 ci->_obj->name(),
1048 "' already obtained a writable reference to '",
1049 var->name(),
1050 "'. Only one object can obtain such a reference per variable and subdomain in a "
1051 "simulation.");
1052 }
1053
1054 // var is unique across threads, so we could forego having a separate set per thread, but we
1055 // need quick access to the list of all variables that need to be inserted into the solution
1056 // vector by a given thread.
1057
1059}
unsigned int count
Definition MortarUtils.C:53
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
An interface that restricts an object to subdomains via the 'blocks' input parameter.
Interface for objects that needs coupling capabilities.
Definition Coupleable.h:53
Materials compute MaterialProperties.
Definition Material.h:36
bool hasBlocks(const SubdomainID id) const override
Returns whether the functor is defined on this block.
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh.

Referenced by writableCoupledValue(), and writableVariable().

◆ coupled()

unsigned int Coupleable::coupled ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns the index for a coupled variable by name.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Index of coupled variable, if this is an optionally coupled variable that wasn't provided this will return a unique "invalid" index.

Reimplemented in ShapeUserObject< ElementUserObject >, and ShapeUserObject< SideUserObject >.

Definition at line 473 of file Coupleable.C.

474{
475 const auto * var = getFieldVar(var_name, comp);
476 if (!var)
477 {
478 mooseAssert(_optional_var_index.find(var_name) != _optional_var_index.end(),
479 "optional var index for " << var_name << " does not exist!");
480 // make sure we don't try to access default var ids that were not provided
481 checkComponent(_obj, comp, _optional_var_index.at(var_name).size(), var_name);
482 return _optional_var_index.at(var_name)[comp];
483 }
485
486 if (var->kind() == Moose::VAR_SOLVER &&
487 // are we not an object that feeds into the nonlinear system?
489 // are we an object that impacts the nonlinear system and this variable is within our
490 // nonlinear system?
491 var->sys().number() == _c_sys->number()))
492 return var->number();
493 else
494 // Avoid registering coupling to variables outside of our system (e.g. avoid potentially
495 // creating bad Jacobians)
496 return std::numeric_limits<unsigned int>::max() - var->number();
497}
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
Definition Coupleable.C:307
unsigned int number() const
Gets the number of this system.
Moose::VarKindType varKind() const
Definition SystemBase.h:957
@ VAR_SOLVER
Definition MooseTypes.h:774

Referenced by coupledIndices(), KernelBase::KernelBase(), and MatReactionTempl< is_ad >::MatReactionTempl().

◆ coupledAllDofValues()

std::vector< const VariableValue * > Coupleable::coupledAllDofValues ( const std::string &  var_name) const
protected

Returns DoFs in the current solution vector of all of a coupled variable's components for the local element.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each component of the coupled variable

Definition at line 2174 of file Coupleable.C.

2175{
2176 auto func = [this, &var_name](unsigned int comp) { return &coupledDofValues(var_name, comp); };
2178 return coupledVectorHelper<const VariableValue *>(var_name, func);
2179}
virtual const VariableValue & coupledDofValues(const std::string &var_name, unsigned int comp=0) const
Returns DoFs in the current solution vector of a coupled variable for the local element.

◆ coupledAllDofValuesOld()

std::vector< const VariableValue * > Coupleable::coupledAllDofValuesOld ( const std::string &  var_name) const
protected

Returns DoFs in the old solution vector of all of a coupled variable's components for the local element.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each compontnet of the coupled variable

Definition at line 2195 of file Coupleable.C.

2196{
2197 auto func = [this, &var_name](unsigned int comp) { return &coupledDofValuesOld(var_name, comp); };
2198 return coupledVectorHelper<const VariableValue *>(var_name, func);
2199}
virtual const VariableValue & coupledDofValuesOld(const std::string &var_name, unsigned int comp=0) const
Returns DoFs in the old solution vector of a coupled variable for the local element.

◆ coupledAllDofValuesOlder()

std::vector< const VariableValue * > Coupleable::coupledAllDofValuesOlder ( const std::string &  var_name) const
protected

Returns DoFs in the older solution vector of all of a coupled variable's components for the local element.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each component of the coupled variable

Definition at line 2215 of file Coupleable.C.

2216{
2217 auto func = [this, &var_name](unsigned int comp)
2218 { return &coupledDofValuesOlder(var_name, comp); };
2219 return coupledVectorHelper<const VariableValue *>(var_name, func);
2220}
virtual const VariableValue & coupledDofValuesOlder(const std::string &var_name, unsigned int comp=0) const
Returns DoFs in the older solution vector of a coupled variable for the local element.

◆ coupledArrayDofValues()

const ArrayVariableValue & Coupleable::coupledArrayDofValues ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns DoFs in the current solution vector of a coupled array variable for the local element.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a VariableValue for the DoFs of the coupled variable

Definition at line 2223 of file Coupleable.C.

2224{
2225 const auto * var = getArrayVar(var_name, comp);
2226 if (!var)
2227 return *getDefaultArrayValue(var_name);
2229
2231 return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2232 return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2233}
const ArrayVariableValue * getDefaultArrayValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled array variable.
Definition Coupleable.C:428

◆ coupledArrayDot()

const ArrayVariableValue & Coupleable::coupledArrayDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Time derivative of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue containing the time derivative of the coupled variable

Definition at line 1411 of file Coupleable.C.

1412{
1413 const auto * var = getArrayVar(var_name, comp);
1414 if (!var)
1417
1419 {
1420 if (_c_nodal)
1421 return var->dofValuesDot();
1422 return var->uDot();
1423 }
1424 else
1425 {
1426 if (_c_nodal)
1427 return var->dofValuesDotNeighbor();
1428 return var->uDotNeighbor();
1429 }
1430}
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledArrayDotDot()

const ArrayVariableValue & Coupleable::coupledArrayDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Second time derivative of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue containing the time derivative of the coupled variable

Definition at line 1433 of file Coupleable.C.

1434{
1435 const auto * var = getArrayVar(var_name, comp);
1436 if (!var)
1439
1441 {
1442 if (_c_nodal)
1443 return var->dofValuesDotDot();
1444 return var->uDotDot();
1445 }
1446 else
1447 {
1448 if (_c_nodal)
1449 return var->dofValuesDotDotNeighbor();
1450 return var->uDotDotNeighbor();
1451 }
1452}

◆ coupledArrayDotDotOld()

const ArrayVariableValue & Coupleable::coupledArrayDotDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Old second time derivative of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue containing the time derivative of the coupled variable

Definition at line 1509 of file Coupleable.C.

1510{
1511 const auto * var = getArrayVar(var_name, comp);
1512 if (!var)
1515
1517 {
1518 if (_c_nodal)
1519 return var->dofValuesDotDotOld();
1520 return var->uDotDotOld();
1521 }
1522 else
1523 {
1524 if (_c_nodal)
1525 return var->dofValuesDotDotOldNeighbor();
1526 return var->uDotDotOldNeighbor();
1527 }
1528}

◆ coupledArrayDotDu()

const VariableValue & Coupleable::coupledArrayDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Time derivative of a coupled array variable with respect to the coefficients.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue containing the time derivative of the coupled variable

Definition at line 1581 of file Coupleable.C.

1582{
1583 const auto * const var = getArrayVar(var_name, comp);
1584 if (!var)
1585 {
1587 return _default_value_zero;
1588 }
1590
1592 {
1593 if (_c_nodal)
1594 return var->dofValuesDuDotDu();
1595 return var->duDotDu();
1596 }
1597 else
1598 {
1599 if (_c_nodal)
1600 return var->dofValuesDuDotDuNeighbor();
1601 return var->duDotDuNeighbor();
1602 }
1603}
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledArrayDotOld()

const ArrayVariableValue & Coupleable::coupledArrayDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Old time derivative of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue containing the time derivative of the coupled variable

Definition at line 1487 of file Coupleable.C.

1488{
1489 const auto * var = getArrayVar(var_name, comp);
1490 if (!var)
1493
1495 {
1496 if (_c_nodal)
1497 return var->dofValuesDotOld();
1498 return var->uDotOld();
1499 }
1500 else
1501 {
1502 if (_c_nodal)
1503 return var->dofValuesDotOldNeighbor();
1504 return var->uDotOldNeighbor();
1505 }
1506}

◆ coupledArrayGradient()

const ArrayVariableGradient & Coupleable::coupledArrayGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns gradient of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a VectorVariableGradient containing the gradient of the coupled array variable

Definition at line 1751 of file Coupleable.C.

1752{
1753 const auto * var = getArrayVar(var_name, comp);
1754 if (!var)
1757
1759 return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1760 return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1761}
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledArrayGradientDot()

const ArrayVariableGradient & Coupleable::coupledArrayGradientDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Retun a gradient of a coupled array variable's time derivative.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableGradient containing the gradient of the time derivative the coupled array variable

Definition at line 1814 of file Coupleable.C.

1815{
1816 const auto * const var = getArrayVar(var_name, comp);
1817 if (!var)
1820
1822 return var->gradSlnDot();
1823 return var->gradSlnNeighborDot();
1824}

◆ coupledArrayGradientOld()

const ArrayVariableGradient & Coupleable::coupledArrayGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old gradient from previous time step of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a VectorVariableGradient containing the old gradient of the coupled array variable

Definition at line 1788 of file Coupleable.C.

1789{
1790 const auto * var = getArrayVar(var_name, comp);
1791 if (!var)
1794
1796 return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1797 return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1798}

◆ coupledArrayGradientOlder()

const ArrayVariableGradient & Coupleable::coupledArrayGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old gradient from two time steps previous of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableGradient containing the older gradient of the coupled array variable

Definition at line 1801 of file Coupleable.C.

1802{
1803 const auto * var = getArrayVar(var_name, comp);
1804 if (!var)
1807
1809 return var->gradSlnOlder();
1810 return var->gradSlnOlderNeighbor();
1811}

◆ coupledArrayValue()

const ArrayVariableValue & Coupleable::coupledArrayValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns value of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue for the coupled vector variable
See also
ArrayKernel::_u

Definition at line 880 of file Coupleable.C.

881{
882 const auto * var = getArrayVar(var_name, comp);
883 if (!var)
884 return *getDefaultArrayValue(var_name);
886
888 {
889 if (_c_nodal)
890 return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
891 return (_c_is_implicit) ? var->sln() : var->slnOld();
892 }
893 else
894 {
895 if (_c_nodal)
896 return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
897 return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
898 }
899}

Referenced by coupledArrayValues().

◆ coupledArrayValueOld()

const ArrayVariableValue & Coupleable::coupledArrayValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old value from previous time step of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue containing the old value of the coupled variable
See also
ArrayKernel::_u_old

Definition at line 1157 of file Coupleable.C.

1158{
1159 const auto * var = getArrayVar(var_name, comp);
1160 if (!var)
1161 return *getDefaultArrayValue(var_name);
1163
1165 {
1166 if (_c_nodal)
1167 return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1168 return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1169 }
1170 else
1171 {
1172 if (_c_nodal)
1173 return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1174 return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1175 }
1176}

◆ coupledArrayValueOlder()

const ArrayVariableValue & Coupleable::coupledArrayValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old value from two time steps previous of a coupled array variable.

Parameters
var_nameName of coupled array variable
compComponent number for vector of coupled array variables
Returns
Reference to a ArrayVariableValue containing the older value of the coupled variable
See also
ArrayKernel::_u_older

Definition at line 1179 of file Coupleable.C.

1180{
1181 const auto * var = getArrayVar(var_name, comp);
1182 if (!var)
1183 return *getDefaultArrayValue(var_name);
1185
1187 {
1188 if (_c_nodal)
1189 return var->dofValuesOlder();
1190 return var->slnOlder();
1191 }
1192 else
1193 {
1194 if (_c_nodal)
1195 return var->dofValuesOlderNeighbor();
1196 return var->slnOlderNeighbor();
1197 }
1198}

◆ coupledArrayValues()

std::vector< const ArrayVariableValue * > Coupleable::coupledArrayValues ( const std::string &  var_name) const
protected

Returns the values for all of a coupled array variable's components.

Parameters
var_nameName of coupled array variable
Returns
Vector of ArrayVariableValue pointers for each component of var_name

Definition at line 902 of file Coupleable.C.

903{
904 auto func = [this, &var_name](unsigned int comp) { return &coupledArrayValue(var_name, comp); };
905 return coupledVectorHelper<const ArrayVariableValue *>(var_name, func);
906}
virtual const ArrayVariableValue & coupledArrayValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled array variable.
Definition Coupleable.C:880

◆ coupledCallback()

virtual void Coupleable::coupledCallback ( const std::string &  ,
bool   
) const
inlineprotectedvirtual

A call-back function provided by the derived object for actions before coupling a variable with functions such as coupledValue.

Reimplemented in AuxKernelBase.

Definition at line 149 of file Coupleable.h.

149{}

Referenced by checkFuncType().

◆ coupledComponents()

unsigned int Coupleable::coupledComponents ( const std::string &  var_name) const
protected

Number of coupled components.

Parameters
var_nameName of the variable
Returns
number of components this variable has (usually 1)

Definition at line 183 of file Coupleable.C.

184{
185 const auto & var_name = _c_parameters.checkForRename(var_name_in);
186
187 if (isCoupled(var_name))
188 {
189 mooseAssert(_coupled_vars.find(var_name) != _coupled_vars.end(),
190 var_name << " must not actually be coupled!");
191 return _coupled_vars.at(var_name).size();
192 }
193 else
194 {
197 else
198 return 0;
199 }
200}
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.

Referenced by ArrayVariableValueVolumeHistogram::ArrayVariableValueVolumeHistogram(), coupledVectorHelper(), getVarsHelper(), KernelBase::KernelBase(), SpatialAverageBase::SpatialAverageBase(), and VariableValueVolumeHistogram::VariableValueVolumeHistogram().

◆ coupledCurl()

const VectorVariableCurl & Coupleable::coupledCurl ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns curl of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableCurl containing the curl of the coupled variable
See also
Kernel::_curl_u

Definition at line 1827 of file Coupleable.C.

1828{
1829 const auto * var = getVectorVar(var_name, comp);
1830 if (!var)
1831 {
1833 return _default_vector_curl;
1834 }
1836
1838 return (_c_is_implicit) ? var->curlSln() : var->curlSlnOld();
1839 return (_c_is_implicit) ? var->curlSlnNeighbor() : var->curlSlnOldNeighbor();
1840}
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledCurlOld()

const VectorVariableCurl & Coupleable::coupledCurlOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old curl from previous time step of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableCurl containing the old curl of the coupled variable
See also
Kernel::_curl_u_old

Definition at line 1843 of file Coupleable.C.

1844{
1845 const auto * var = getVectorVar(var_name, comp);
1846 if (!var)
1847 {
1849 return _default_vector_curl;
1850 }
1852
1854 return (_c_is_implicit) ? var->curlSlnOld() : var->curlSlnOlder();
1855 return (_c_is_implicit) ? var->curlSlnOldNeighbor() : var->curlSlnOlderNeighbor();
1856}

◆ coupledCurlOlder()

const VectorVariableCurl & Coupleable::coupledCurlOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old curl from two time steps previous of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableCurl containing the older curl of the coupled variable
See also
Kernel::_curl_u_older

Definition at line 1859 of file Coupleable.C.

1860{
1861 const auto * var = getVectorVar(var_name, comp);
1862 if (!var)
1863 {
1865 return _default_vector_curl;
1866 }
1868
1870 return var->curlSlnOlder();
1871 return var->curlSlnOlderNeighbor();
1872}

◆ coupledDiv()

const VectorVariableDivergence & Coupleable::coupledDiv ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns divergence of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableDivergence containing the divergence of the coupled variable
See also
Kernel::_div_u

Definition at line 1909 of file Coupleable.C.

1910{
1911 const auto * var = getVectorVar(var_name, comp);
1912 if (!var)
1913 {
1915 return _default_div;
1916 }
1918
1920 return (_c_is_implicit) ? var->divSln() : var->divSlnOld();
1921 return (_c_is_implicit) ? var->divSlnNeighbor() : var->divSlnOldNeighbor();
1922}
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledDivOld()

const VectorVariableDivergence & Coupleable::coupledDivOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old divergence from previous time step of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableDivergence containing the old divergence of the coupled variable
See also
Kernel::_div_u_old

Definition at line 1925 of file Coupleable.C.

1926{
1927 const auto * var = getVectorVar(var_name, comp);
1928 if (!var)
1929 {
1931 return _default_div;
1932 }
1934
1936 return (_c_is_implicit) ? var->divSlnOld() : var->divSlnOlder();
1937 return (_c_is_implicit) ? var->divSlnOldNeighbor() : var->divSlnOlderNeighbor();
1938}

◆ coupledDivOlder()

const VectorVariableDivergence & Coupleable::coupledDivOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old divergence from two time steps previous of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableDivergence containing the older divergence of the coupled variable
See also
Kernel::_div_u_older

Definition at line 1941 of file Coupleable.C.

1942{
1943 const auto * var = getVectorVar(var_name, comp);
1944 if (!var)
1945 {
1947 return _default_div;
1948 }
1950
1952 return var->divSlnOlder();
1953 return var->divSlnOlderNeighbor();
1954}

◆ coupledDofValues()

const VariableValue & Coupleable::coupledDofValues ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns DoFs in the current solution vector of a coupled variable for the local element.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the DoFs of the coupled variable

Definition at line 2161 of file Coupleable.C.

2162{
2163 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2164 if (!var)
2165 return *getDefaultValue(var_name, comp);
2167
2169 return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2170 return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2171}
const VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable.
Definition Coupleable.C:366

Referenced by coupledAllDofValues(), and coupledGenericDofValue().

◆ coupledDofValuesOld()

const VariableValue & Coupleable::coupledDofValuesOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns DoFs in the old solution vector of a coupled variable for the local element.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the old DoFs of the coupled variable

Definition at line 2182 of file Coupleable.C.

2183{
2184 const auto * var = getVar(var_name, comp);
2185 if (!var)
2186 return *getDefaultValue(var_name, comp);
2188
2190 return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
2191 return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
2192}
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition Coupleable.C:319

Referenced by coupledAllDofValuesOld().

◆ coupledDofValuesOlder()

const VariableValue & Coupleable::coupledDofValuesOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns DoFs in the older solution vector of a coupled variable for the local element.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the older DoFs of the coupled variable

Definition at line 2202 of file Coupleable.C.

2203{
2204 const auto * var = getVar(var_name, comp);
2205 if (!var)
2206 return *getDefaultValue(var_name, comp);
2208
2210 return var->dofValuesOlder();
2211 return var->dofValuesOlderNeighbor();
2212}

Referenced by coupledAllDofValuesOlder().

◆ coupledDot()

const VariableValue & Coupleable::coupledDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the time derivative of the coupled variable

Reimplemented in AuxKernelTempl< ComputeValueType >, AuxKernelTempl< Real >, and AuxKernelTempl< RealVectorValue >.

Definition at line 1201 of file Coupleable.C.

1202{
1203 const auto * var = getVar(var_name, comp);
1204 if (!var)
1205 {
1207 return _default_value_zero;
1208 }
1210
1212 {
1213 if (_c_nodal)
1214 return var->dofValuesDot();
1215 return var->uDot();
1216 }
1217 else
1218 {
1219 if (_c_nodal)
1220 return var->dofValuesDotNeighbor();
1221 return var->uDotNeighbor();
1222 }
1223}

Referenced by coupledDots(), and coupledGenericDot().

◆ coupledDotDot()

const VariableValue & Coupleable::coupledDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Second time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the second time derivative of the coupled variable

Definition at line 1226 of file Coupleable.C.

1227{
1228 const auto * var = getVar(var_name, comp);
1229 if (!var)
1230 {
1232 return _default_value_zero;
1233 }
1235
1237 {
1238 if (_c_nodal)
1239 return var->dofValuesDotDot();
1240 return var->uDotDot();
1241 }
1242 else
1243 {
1244 if (_c_nodal)
1245 return var->dofValuesDotDotNeighbor();
1246 return var->uDotDotNeighbor();
1247 }
1248}

Referenced by coupledGenericDotDot().

◆ coupledDotDotDu()

const VariableValue & Coupleable::coupledDotDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Second time derivative of a coupled variable with respect to the coefficients.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the time derivative of the coupled variable with respect to the coefficients

Definition at line 1556 of file Coupleable.C.

1557{
1558 const auto * var = getVar(var_name, comp);
1559 if (!var)
1560 {
1562 return _default_value_zero;
1563 }
1565
1567 {
1568 if (_c_nodal)
1569 return var->dofValuesDuDotDotDu();
1570 return var->duDotDotDu();
1571 }
1572 else
1573 {
1574 if (_c_nodal)
1575 return var->dofValuesDuDotDotDuNeighbor();
1576 return var->duDotDotDuNeighbor();
1577 }
1578}

◆ coupledDotDotOld()

const VariableValue & Coupleable::coupledDotDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Old second time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the old second time derivative of the coupled variable

Definition at line 1290 of file Coupleable.C.

1291{
1292 const auto * var = getVar(var_name, comp);
1293 if (!var)
1294 {
1296 return _default_value_zero;
1297 }
1299
1301 {
1302 if (_c_nodal)
1303 return var->dofValuesDotDotOld();
1304 return var->uDotDotOld();
1305 }
1306 else
1307 {
1308 if (_c_nodal)
1309 return var->dofValuesDotDotOldNeighbor();
1310 return var->uDotDotOldNeighbor();
1311 }
1312}

◆ coupledDotDu()

const VariableValue & Coupleable::coupledDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Time derivative of a coupled variable with respect to the coefficients.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the time derivative of the coupled variable with respect to the coefficients

Reimplemented in AuxKernelTempl< ComputeValueType >, AuxKernelTempl< Real >, and AuxKernelTempl< RealVectorValue >.

Definition at line 1531 of file Coupleable.C.

1532{
1533 const auto * var = getVar(var_name, comp);
1534 if (!var)
1535 {
1537 return _default_value_zero;
1538 }
1540
1542 {
1543 if (_c_nodal)
1544 return var->dofValuesDuDotDu();
1545 return var->duDotDu();
1546 }
1547 else
1548 {
1549 if (_c_nodal)
1550 return var->dofValuesDuDotDuNeighbor();
1551 return var->duDotDuNeighbor();
1552 }
1553}

◆ coupledDotOld()

const VariableValue & Coupleable::coupledDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Old time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the old time derivative of the coupled variable

Definition at line 1265 of file Coupleable.C.

1266{
1267 const auto * var = getVar(var_name, comp);
1268 if (!var)
1269 {
1271 return _default_value_zero;
1272 }
1274
1276 {
1277 if (_c_nodal)
1278 return var->dofValuesDotOld();
1279 return var->uDotOld();
1280 }
1281 else
1282 {
1283 if (_c_nodal)
1284 return var->dofValuesDotOldNeighbor();
1285 return var->uDotOldNeighbor();
1286 }
1287}

◆ coupledDots()

std::vector< const VariableValue * > Coupleable::coupledDots ( const std::string &  var_name) const
protected

Returns the time derivatives for all of a coupled variable's components.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each component of var_name

Definition at line 2942 of file Coupleable.C.

2943{
2944 auto func = [this, &var_name](unsigned int comp) { return &coupledDot(var_name, comp); };
2945 return coupledVectorHelper<const VariableValue *>(var_name, func);
2946}
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable.

◆ coupledGenericDofValue() [1/3]

template<>
const GenericVariableValue< false > & Coupleable::coupledGenericDofValue ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 619 of file Coupleable.C.

621{
622 return coupledDofValues(var_name, comp);
623}

◆ coupledGenericDofValue() [2/3]

template<>
const GenericVariableValue< true > & Coupleable::coupledGenericDofValue ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 626 of file Coupleable.C.

628{
629 return adCoupledDofValues(var_name, comp);
630}
virtual const ADVariableValue & adCoupledDofValues(const std::string &var_name, unsigned int comp=0) const
Returns DOF value of a coupled variable for use in Automatic Differentiation.

◆ coupledGenericDofValue() [3/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::coupledGenericDofValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns DOF value of a coupled variable for use in templated automatic differentiation classes.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a GenericVariableValue for the coupled variable

◆ coupledGenericDot() [1/3]

template<>
const GenericVariableValue< false > & Coupleable::coupledGenericDot ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 2956 of file Coupleable.C.

2958{
2959 return coupledDot(var_name, comp);
2960}

◆ coupledGenericDot() [2/3]

template<>
const GenericVariableValue< true > & Coupleable::coupledGenericDot ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 2963 of file Coupleable.C.

2965{
2966 return adCoupledDot(var_name, comp);
2967}

◆ coupledGenericDot() [3/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::coupledGenericDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns time derivative of a coupled variable for use in templated automatic differentiation classes.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a GenericVariableValue for the coupled variable time derivative

◆ coupledGenericDotDot() [1/3]

template<>
const GenericVariableValue< false > & Coupleable::coupledGenericDotDot ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 1251 of file Coupleable.C.

1253{
1254 return coupledDotDot(var_name, comp);
1255}
virtual const VariableValue & coupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable.

◆ coupledGenericDotDot() [2/3]

template<>
const GenericVariableValue< true > & Coupleable::coupledGenericDotDot ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 1258 of file Coupleable.C.

1260{
1261 return adCoupledDotDot(var_name, comp);
1262}
const ADVariableValue & adCoupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable for ad simulations.

◆ coupledGenericDotDot() [3/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::coupledGenericDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns the second time derivative of a coupled variable for use in templated automatic differentiation classes.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a GenericVariableValue for the coupled variable second time derivative

◆ coupledGenericGradient() [1/3]

template<>
const GenericVariableGradient< false > & Coupleable::coupledGenericGradient ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 2658 of file Coupleable.C.

2660{
2661 return coupledGradient(var_name, comp);
2662}
virtual const VariableGradient & coupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable.

◆ coupledGenericGradient() [2/3]

template<>
const GenericVariableGradient< true > & Coupleable::coupledGenericGradient ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 2665 of file Coupleable.C.

2667{
2668 return adCoupledGradient(var_name, comp);
2669}

◆ coupledGenericGradient() [3/3]

template<bool is_ad>
const GenericVariableGradient< is_ad > & Coupleable::coupledGenericGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns gradient of a coupled variable for use in templated automatic differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the gradient of the coupled variable
See also
Kernel::gradient

◆ coupledGenericGradients() [1/3]

template<bool is_ad>
std::vector< const GenericVariableGradient< is_ad > * > Coupleable::coupledGenericGradients ( const std::string &  var_name) const
protected

Returns the gradients for all of a coupled variable's components for use in templated automatic differentiation.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableGradient pointers for each component of var_name

◆ coupledGenericGradients() [2/3]

template<>
std::vector< const GenericVariableGradient< true > * > Coupleable::coupledGenericGradients ( const std::string &  var_name) const
protected

Definition at line 2906 of file Coupleable.C.

2922{
2923 auto func = [this, &var_name](unsigned int comp) { return &adCoupledGradient(var_name, comp); };
2924 return coupledVectorHelper<const GenericVariableGradient<true> *>(var_name, func);
2925}

◆ coupledGenericGradients() [3/3]

template<>
std::vector< const GenericVariableGradient< false > * > Coupleable::coupledGenericGradients ( const std::string &  var_name) const
protected

Definition at line 2906 of file Coupleable.C.

2915{
2916 return coupledGradients(var_name);
2917}
std::vector< const VariableGradient * > coupledGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable's components.

◆ coupledGenericValue() [1/3]

template<>
const GenericVariableValue< false > & Coupleable::coupledGenericValue ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 500 of file Coupleable.C.

502{
503 return coupledValue(var_name, comp);
504}
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable.
Definition Coupleable.C:528

◆ coupledGenericValue() [2/3]

template<>
const GenericVariableValue< true > & Coupleable::coupledGenericValue ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 507 of file Coupleable.C.

509{
510 return adCoupledValue(var_name, comp);
511}

◆ coupledGenericValue() [3/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::coupledGenericValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns value of a coupled variable for use in templated automatic differentiation classes.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a GenericVariableValue for the coupled variable

◆ coupledGenericValues() [1/3]

template<bool is_ad>
std::vector< const GenericVariableValue< is_ad > * > Coupleable::coupledGenericValues ( const std::string &  var_name) const
protected

Returns the values for all of a coupled variable's components for use in templated automatic differentiation classes.

Parameters
var_nameName of coupled variable
Returns
Vector of GenericVariableValue pointers for each component of var_name

◆ coupledGenericValues() [2/3]

template<>
std::vector< const GenericVariableValue< false > * > Coupleable::coupledGenericValues ( const std::string &  var_name) const
protected

Definition at line 2710 of file Coupleable.C.

2719{
2720 return coupledValues(var_name);
2721}
std::vector< const VariableValue * > coupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable components.

◆ coupledGenericValues() [3/3]

template<>
std::vector< const GenericVariableValue< true > * > Coupleable::coupledGenericValues ( const std::string &  var_name) const
protected

Definition at line 2710 of file Coupleable.C.

2726{
2727 return adCoupledValues(var_name);
2728}
std::vector< const ADVariableValue * > adCoupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable's components for use in Automatic Differentiation.

◆ coupledGenericVectorValue() [1/3]

template<>
const GenericVectorVariableValue< false > & Coupleable::coupledGenericVectorValue ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 514 of file Coupleable.C.

516{
517 return coupledVectorValue(var_name, comp);
518}
virtual const VectorVariableValue & coupledVectorValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled vector variable.
Definition Coupleable.C:855

◆ coupledGenericVectorValue() [2/3]

template<>
const GenericVectorVariableValue< true > & Coupleable::coupledGenericVectorValue ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Definition at line 521 of file Coupleable.C.

523{
524 return adCoupledVectorValue(var_name, comp);
525}

◆ coupledGenericVectorValue() [3/3]

template<bool is_ad>
const GenericVectorVariableValue< is_ad > & Coupleable::coupledGenericVectorValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns value of a coupled vector variable for use in templated automatic differentiation classes.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a GenericVariableVectorValue for the coupled variable

◆ coupledGradient()

const VariableGradient & Coupleable::coupledGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns gradient of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the gradient of the coupled variable
See also
Kernel::gradient

Definition at line 1606 of file Coupleable.C.

1607{
1608 const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
1609 if (!var)
1610 {
1612 return _default_gradient;
1613 }
1615
1617 return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1618 return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1619}
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...

Referenced by coupledGenericGradient(), coupledGenericGradients(), and NodeFaceConstraint::coupledSecondaryGradient().

◆ coupledGradientDot()

const VariableGradient & Coupleable::coupledGradientDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Time derivative of the gradient of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the time derivative of the gradient of a coupled variable

Definition at line 1671 of file Coupleable.C.

1672{
1673 const auto * var = getVar(var_name, comp);
1674 if (!var)
1675 {
1677 return _default_gradient;
1678 }
1680
1682 return var->gradSlnDot();
1683 return var->gradSlnNeighborDot();
1684}

◆ coupledGradientDotDot()

const VariableGradient & Coupleable::coupledGradientDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Second time derivative of the gradient of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the time derivative of the gradient of a coupled variable

Definition at line 1687 of file Coupleable.C.

1688{
1689 const auto * var = getVar(var_name, comp);
1690 if (!var)
1691 {
1693 return _default_gradient;
1694 }
1696
1698 return var->gradSlnDotDot();
1699 return var->gradSlnNeighborDotDot();
1700}

◆ coupledGradientOld()

const VariableGradient & Coupleable::coupledGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old gradient from previous time step of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the old gradient of the coupled variable
See also
Kernel::gradientOld

Definition at line 1622 of file Coupleable.C.

1623{
1624 const auto * var = getVar(var_name, comp);
1625 if (!var)
1626 {
1628 return _default_gradient;
1629 }
1631
1633 return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1634 return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1635}

Referenced by coupledGradientsOld(), and NodeFaceConstraint::coupledSecondaryGradientOld().

◆ coupledGradientOlder()

const VariableGradient & Coupleable::coupledGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old gradient from two time steps previous of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the older gradient of the coupled variable
See also
Kernel::gradientOlder

Definition at line 1638 of file Coupleable.C.

1639{
1640 const auto * var = getVar(var_name, comp);
1641 if (!var)
1642 {
1644 return _default_gradient;
1645 }
1647
1649 return var->gradSlnOlder();
1650 return var->gradSlnOlderNeighbor();
1651}

Referenced by NodeFaceConstraint::coupledSecondaryGradientOlder().

◆ coupledGradientPreviousNL()

const VariableGradient & Coupleable::coupledGradientPreviousNL ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns gradient of a coupled variable for previous Newton iterate.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the gradient of the coupled variable

Definition at line 1654 of file Coupleable.C.

1655{
1656 const auto * var = getVar(var_name, comp);
1658 if (!var)
1659 {
1661 return _default_gradient;
1662 }
1664
1666 return var->gradSlnPreviousNL();
1667 return var->gradSlnPreviousNLNeighbor();
1668}
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.

◆ coupledGradients()

std::vector< const VariableGradient * > Coupleable::coupledGradients ( const std::string &  var_name) const
protected

Returns the gradients for all of a coupled variable's components.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableGradient pointers for each component of var_name

Definition at line 2906 of file Coupleable.C.

2907{
2908 auto func = [this, &var_name](unsigned int comp) { return &coupledGradient(var_name, comp); };
2909 return coupledVectorHelper<const VariableGradient *>(var_name, func);
2910}

◆ coupledGradientsOld()

std::vector< const VariableGradient * > Coupleable::coupledGradientsOld ( const std::string &  var_name) const
protected

Returns the old gradients for all of a coupled variable's components.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableGradient pointers for each component of var_name

Definition at line 2935 of file Coupleable.C.

2936{
2937 auto func = [this, &var_name](unsigned int comp) { return &coupledGradientOld(var_name, comp); };
2938 return coupledVectorHelper<const VariableGradient *>(var_name, func);
2939}
virtual const VariableGradient & coupledGradientOld(const std::string &var_name, unsigned int comp=0) const
Returns an old gradient from previous time step of a coupled variable.

◆ coupledIndices()

std::vector< unsigned int > Coupleable::coupledIndices ( const std::string &  var_name) const
protected

Returns the indices for a coupled variable's components.

Parameters
var_nameName of coupled variable
Returns
Vector of the indices for all components of the coupled variable var_name.

Definition at line 2672 of file Coupleable.C.

2673{
2674 auto func = [this, &var_name](unsigned int comp) { return coupled(var_name, comp); };
2675 return coupledVectorHelper<unsigned int>(var_name, func);
2676}
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
Returns the index for a coupled variable by name.
Definition Coupleable.C:473

◆ coupledMatrixTagValue() [1/2]

const VariableValue & Coupleable::coupledMatrixTagValue ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
protectedvirtual

Definition at line 839 of file Coupleable.C.

842{
843 if (!_c_parameters.isParamValid(tag_name))
844 mooseError("Tag name parameter '", tag_name, "' is invalid");
845
846 TagName tagname = _c_parameters.get<TagName>(tag_name);
847 if (!_c_fe_problem.matrixTagExists(tagname))
848 mooseError("Matrix tag name '", tagname, "' does not exist");
849
850 TagID tag = _c_fe_problem.getMatrixTagID(tagname);
851 return coupledMatrixTagValue(var_names, tag, index);
852}
unsigned int TagID
Definition MooseTypes.h:238
virtual const VariableValue & coupledMatrixTagValue(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns value of a coupled variable for a given tag.
Definition Coupleable.C:822
virtual TagID getMatrixTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition SubProblem.C:334
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition SubProblem.C:320

◆ coupledMatrixTagValue() [2/2]

const VariableValue & Coupleable::coupledMatrixTagValue ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
protectedvirtual

Returns value of a coupled variable for a given tag.

This couples the diag vector of matrix

Parameters
var_namesName(s) of coupled variable(s)
tagmatrix tag ID
indexIndex of the desired variable in the vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable
See also
Kernel::_u

Definition at line 822 of file Coupleable.C.

825{
826 const auto * var = getVarHelper<MooseVariableField<Real>>(var_names, index);
827 if (!var)
828 mooseError(var_names, ": invalid variable name for coupledMatrixTagValue");
830
831 const_cast<Coupleable *>(this)->addFEVariableCoupleableMatrixTag(tag);
832
833 if (_c_nodal)
834 return var->nodalMatrixTagValue(tag);
835 return var->matrixTagValue(tag);
836}
void addFEVariableCoupleableMatrixTag(TagID tag)
Definition Coupleable.h:118

Referenced by coupledMatrixTagValue(), and coupledMatrixTagValues().

◆ coupledMatrixTagValues() [1/2]

std::vector< const VariableValue * > Coupleable::coupledMatrixTagValues ( const std::string &  var_names,
const std::string &  tag_name 
) const
protected

Definition at line 2869 of file Coupleable.C.

2871{
2872 if (!_c_parameters.isParamValid(tag_name))
2873 mooseError("Tag name parameter '", tag_name, "' is invalid");
2874
2875 TagName tagname = _c_parameters.get<TagName>(tag_name);
2876 if (!_c_fe_problem.matrixTagExists(tagname))
2877 mooseError("Matrix tag name '", tagname, "' does not exist");
2878
2879 TagID tag = _c_fe_problem.getMatrixTagID(tagname);
2880 return coupledMatrixTagValues(var_names, tag);
2881}
std::vector< const VariableValue * > coupledMatrixTagValues(const std::string &var_names, TagID tag) const
Returns the diagonal matrix values for all the coupled variables desired for a given tag.

◆ coupledMatrixTagValues() [2/2]

std::vector< const VariableValue * > Coupleable::coupledMatrixTagValues ( const std::string &  var_names,
TagID  tag 
) const
protected

Returns the diagonal matrix values for all the coupled variables desired for a given tag.

Parameters
var_namesName(s) of coupled variable(s)
tagmatrix tag ID
Returns
Vector of VariableValue pointers for each variable in var_name

Definition at line 2861 of file Coupleable.C.

2862{
2863 auto func = [this, &var_names, &tag](unsigned int comp)
2864 { return &coupledMatrixTagValue(var_names, tag, comp); };
2865 return coupledVectorHelper<const VariableValue *>(var_names, func);
2866}

Referenced by coupledMatrixTagValues().

◆ coupledName()

VariableName Coupleable::coupledName ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Names of the variable in the Coupleable interface.

Parameters
var_nameName of the variable
compthe component of the variable
Returns
name the variable has been coupled as. For constants, returns the constant

Definition at line 2679 of file Coupleable.C.

2680{
2681 if (getFieldVar(var_name, comp))
2682 return getFieldVar(var_name, comp)->name();
2683 // Detect if we are in the case where a constant was passed in lieu of a variable
2684 else if (isCoupledConstant(var_name))
2686 ": a variable name was queried but a constant was passed for parameter '",
2687 var_name,
2688 "Either pass a true variable or contact a developer to shield the call to "
2689 "'coupledName' with 'isCoupledConstant'");
2690 else
2691 mooseError(
2692 _c_name, ": Variable '", var_name, "' does not exist, yet its coupled name is requested");
2693}
virtual bool isCoupledConstant(const std::string &var_name) const
Returns true if a variable passed as a coupled value is really a constant.
Definition Coupleable.C:177

Referenced by coupledNames(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), and SpatialAverageBase::SpatialAverageBase().

◆ coupledNames()

std::vector< VariableName > Coupleable::coupledNames ( const std::string &  var_name) const
protected

Names of the variables in the Coupleable interface.

Parameters
var_nameNames of the variables
Returns
names the variables have been coupled as

Definition at line 2696 of file Coupleable.C.

2697{
2698 auto func = [this, &var_name](unsigned int comp) { return coupledName(var_name, comp); };
2699 return coupledVectorHelper<VariableName>(var_name, func);
2700}
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
Names of the variable in the Coupleable interface.

◆ coupledNodalDot()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalDot< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Nodal values of time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the nodal values of time derivative of the coupled variable

Definition at line 2099 of file Coupleable.C.

2100{
2101 static const T zero = 0;
2102 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2103 if (!var)
2104 return zero;
2106
2108 return var->nodalValueDot();
2109 mooseError("Neighbor version not implemented");
2110}

◆ coupledNodalDotDot()

const VariableValue & Coupleable::coupledNodalDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Nodal values of second time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the nodal values of second time derivative of the coupled variable

Definition at line 2113 of file Coupleable.C.

2114{
2115 const auto * var = getVar(var_name, comp);
2116 if (!var)
2117 {
2119 return _default_value_zero;
2120 }
2122
2124 return var->dofValuesDotDot();
2125 return var->dofValuesDotDotNeighbor();
2126}

◆ coupledNodalDotDotOld()

const VariableValue & Coupleable::coupledNodalDotDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Nodal values of old second time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the nodal values of second time derivative of the coupled variable

Definition at line 2145 of file Coupleable.C.

2146{
2147 const auto * var = getVar(var_name, comp);
2148 if (!var)
2149 {
2151 return _default_value_zero;
2152 }
2154
2156 return var->dofValuesDotDotOld();
2157 return var->dofValuesDotDotOldNeighbor();
2158}

◆ coupledNodalDotOld()

const VariableValue & Coupleable::coupledNodalDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Nodal values of old time derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the nodal values of time derivative of the coupled variable

Definition at line 2129 of file Coupleable.C.

2130{
2131 const auto * var = getVar(var_name, comp);
2132 if (!var)
2133 {
2135 return _default_value_zero;
2136 }
2138
2140 return var->dofValuesDotOld();
2141 return var->dofValuesDotOldNeighbor();
2142}

◆ coupledNodalValue()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValue< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns nodal values of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable

Definition at line 2023 of file Coupleable.C.

2024{
2025 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2026 if (!var)
2027 return getDefaultNodalValue<T>(var_name, comp);
2029
2030 if (!var->isNodal())
2032 ": Trying to get nodal values of variable '",
2033 var->name(),
2034 "', but it is not nodal.");
2035
2037 return (_c_is_implicit) ? var->nodalValue() : var->nodalValueOld();
2038 return (_c_is_implicit) ? var->nodalValueNeighbor() : var->nodalValueOldNeighbor();
2039}

◆ coupledNodalValueOld()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValueOld< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns an old nodal value from previous time step of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the old value of the coupled variable

Definition at line 2043 of file Coupleable.C.

2044{
2045 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2046 if (!var)
2047 return getDefaultNodalValue<T>(var_name, comp);
2049
2050 if (!var->isNodal())
2052 ": Trying to get old nodal values of variable '",
2053 var->name(),
2054 "', but it is not nodal.");
2055
2057 return (_c_is_implicit) ? var->nodalValueOld() : var->nodalValueOlder();
2058 return (_c_is_implicit) ? var->nodalValueOldNeighbor() : var->nodalValueOlderNeighbor();
2059}

◆ coupledNodalValueOlder()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValueOlder< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns an old nodal value from two time steps previous of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the older value of the coupled variable

Definition at line 2063 of file Coupleable.C.

2064{
2065 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2066 if (!var)
2067 return getDefaultNodalValue<T>(var_name, comp);
2069
2070 if (!var->isNodal())
2072 ": Trying to get older nodal values of variable '",
2073 var->name(),
2074 "', but it is not nodal.");
2075
2077 return var->nodalValueOlder();
2078 return var->nodalValueOlderNeighbor();
2079}

◆ coupledNodalValuePreviousNL()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValuePreviousNL< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protected

Returns nodal values of a coupled variable for previous Newton iterate.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable

Definition at line 2083 of file Coupleable.C.

2084{
2085 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2086 if (!var)
2087 return getDefaultNodalValue<T>(var_name, comp);
2089
2091
2093 return var->nodalValuePreviousNL();
2094 return var->nodalValuePreviousNLNeighbor();
2095}

◆ coupledSecond()

const VariableSecond & Coupleable::coupledSecond ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns second spatial derivatives of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the second derivative of the coupled variable
See also
Kernel::second

Definition at line 1957 of file Coupleable.C.

1958{
1959 const auto * var = getVar(var_name, comp);
1960 if (!var)
1961 {
1963 return _default_second;
1964 }
1966
1968 return (_c_is_implicit) ? var->secondSln() : var->secondSlnOlder();
1969 return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOlderNeighbor();
1970}
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...

Referenced by NodeFaceConstraint::coupledSecondarySecond().

◆ coupledSecondOld()

const VariableSecond & Coupleable::coupledSecondOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old second spatial derivatives from previous time step of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the old second derivative of the coupled variable
See also
Kernel::secondOld

Definition at line 1973 of file Coupleable.C.

1974{
1975 const auto * var = getVar(var_name, comp);
1976 if (!var)
1977 {
1979 return _default_second;
1980 }
1982
1984 return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
1985 return (_c_is_implicit) ? var->secondSlnOldNeighbor() : var->secondSlnOlderNeighbor();
1986}

◆ coupledSecondOlder()

const VariableSecond & Coupleable::coupledSecondOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old second derivative from two time steps previous of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the older second derivative of the coupled variable
See also
Kernel::secondOlder

Definition at line 1989 of file Coupleable.C.

1990{
1991 const auto * var = getVar(var_name, comp);
1992 if (!var)
1993 {
1995 return _default_second;
1996 }
1998
2000 return var->secondSlnOlder();
2001 return var->secondSlnOlderNeighbor();
2002}

◆ coupledSecondPreviousNL()

const VariableSecond & Coupleable::coupledSecondPreviousNL ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns second derivative of a coupled variable for the previous Newton iterate.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the second derivative of the coupled variable

Definition at line 2005 of file Coupleable.C.

2006{
2007 const auto * var = getVar(var_name, comp);
2009 if (!var)
2010 {
2012 return _default_second;
2013 }
2015
2017 return var->secondSlnPreviousNL();
2018 return var->secondSlnPreviousNLNeighbor();
2019}

◆ coupledValue()

const VariableValue & Coupleable::coupledValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns value of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable
See also
Kernel::_u

Definition at line 528 of file Coupleable.C.

529{
530 const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
531 if (!var)
532 return *getDefaultValue(var_name, comp);
534
536 {
537 if (_c_nodal)
538 return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
539 else
540 return (_c_is_implicit) ? var->sln() : var->slnOld();
541 }
542 else
543 {
544 if (_c_nodal)
545 return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
546 else
547 return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
548 }
549}

Referenced by coupledGenericValue(), NodeFaceConstraint::coupledSecondaryValue(), coupledValues(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), and writableCoupledValue().

◆ coupledValueLower()

const VariableValue & Coupleable::coupledValueLower ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns value of a coupled lower-dimensional variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable

Definition at line 633 of file Coupleable.C.

634{
635 const auto * var = getVar(var_name, comp);
636 if (!var)
637 return *getDefaultValue(var_name, comp);
639
641 mooseError(_c_name, ":coupledValueLower cannot be called in a coupleable neighbor object");
642
643 if (_c_nodal)
644 return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
645 else
646 return (_c_is_implicit) ? var->slnLower() : var->slnLowerOld();
647}

◆ coupledValueOld()

const VariableValue & Coupleable::coupledValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old value from previous time step of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the old value of the coupled variable
See also
Kernel::valueOld

Definition at line 1062 of file Coupleable.C.

1063{
1064 const auto * var = getVar(var_name, comp);
1065 if (!var)
1066 return *getDefaultValue(var_name, comp);
1068
1070 {
1071 if (_c_nodal)
1072 return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1073 return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1074 }
1075 else
1076 {
1077 if (_c_nodal)
1078 return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1079 return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1080 }
1081}

Referenced by NodeFaceConstraint::coupledSecondaryValueOld(), coupledValuesOld(), and VariableTimeIntegrationAux::VariableTimeIntegrationAux().

◆ coupledValueOlder()

const VariableValue & Coupleable::coupledValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old value from two time steps previous of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the older value of the coupled variable
See also
Kernel::valueOlder

Definition at line 1084 of file Coupleable.C.

1085{
1086 const auto * var = getVar(var_name, comp);
1087 if (!var)
1088 return *getDefaultValue(var_name, comp);
1090
1092 {
1093 if (_c_nodal)
1094 return var->dofValuesOlder();
1095 return var->slnOlder();
1096 }
1097 else
1098 {
1099 if (_c_nodal)
1100 return var->dofValuesOlderNeighbor();
1101 return var->slnOlderNeighbor();
1102 }
1103}

Referenced by NodeFaceConstraint::coupledSecondaryValueOlder(), coupledValuesOlder(), and VariableTimeIntegrationAux::VariableTimeIntegrationAux().

◆ coupledValuePreviousNL()

const VariableValue & Coupleable::coupledValuePreviousNL ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns value of previous Newton iterate of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue containing the older value of the coupled variable

Definition at line 1106 of file Coupleable.C.

1107{
1108 const auto * var = getVar(var_name, comp);
1109 if (!var)
1110 return *getDefaultValue(var_name, comp);
1112
1115 {
1116 if (_c_nodal)
1117 return var->dofValuesPreviousNL();
1118 return var->slnPreviousNL();
1119 }
1120 else
1121 {
1122 if (_c_nodal)
1123 return var->dofValuesPreviousNLNeighbor();
1124 return var->slnPreviousNLNeighbor();
1125 }
1126}

◆ coupledValues()

std::vector< const VariableValue * > Coupleable::coupledValues ( const std::string &  var_name) const
protected

Returns the values for all of a coupled variable components.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each component of var_name

Definition at line 2703 of file Coupleable.C.

2704{
2705 auto func = [this, &var_name](unsigned int comp) { return &coupledValue(var_name, comp); };
2706 return coupledVectorHelper<const VariableValue *>(var_name, func);
2707}

◆ coupledValuesOld()

std::vector< const VariableValue * > Coupleable::coupledValuesOld ( const std::string &  var_name) const
protected

Returns the old values for all of a coupled variable's components.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each component of var_name

Definition at line 2884 of file Coupleable.C.

2885{
2886 auto func = [this, &var_name](unsigned int comp) { return &coupledValueOld(var_name, comp); };
2887 return coupledVectorHelper<const VariableValue *>(var_name, func);
2888}
virtual const VariableValue & coupledValueOld(const std::string &var_name, unsigned int comp=0) const
Returns an old value from previous time step of a coupled variable.

◆ coupledValuesOlder()

std::vector< const VariableValue * > Coupleable::coupledValuesOlder ( const std::string &  var_name) const
protected

Returns the older values for all of a coupled variable's components.

Parameters
var_nameName of coupled variable
Returns
Vector of VariableValue pointers for each component of var_name

Definition at line 2891 of file Coupleable.C.

2892{
2893 auto func = [this, &var_name](unsigned int comp) { return &coupledValueOlder(var_name, comp); };
2894 return coupledVectorHelper<const VariableValue *>(var_name, func);
2895}
virtual const VariableValue & coupledValueOlder(const std::string &var_name, unsigned int comp=0) const
Returns an old value from two time steps previous of a coupled variable.

◆ coupledVectorDot()

const VectorVariableValue & Coupleable::coupledVectorDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Time derivative of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableValue containing the time derivative of the coupled variable

Definition at line 1315 of file Coupleable.C.

1316{
1317 const auto * var = getVectorVar(var_name, comp);
1318 if (!var)
1319 {
1322 }
1324
1326 return var->uDot();
1327 return var->uDotNeighbor();
1328}
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledVectorDotDot()

const VectorVariableValue & Coupleable::coupledVectorDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Second time derivative of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableValue containing the time derivative of the coupled variable

Definition at line 1331 of file Coupleable.C.

1332{
1333 const auto * var = getVectorVar(var_name, comp);
1334 if (!var)
1335 {
1338 }
1340
1342 return var->uDotDot();
1343 return var->uDotDotNeighbor();
1344}

◆ coupledVectorDotDotDu()

const VariableValue & Coupleable::coupledVectorDotDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Second time derivative of a coupled vector variable with respect to the coefficients.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VariableValue containing the time derivative of the coupled vector variable with respect to the coefficients

Definition at line 1395 of file Coupleable.C.

1396{
1397 const auto * var = getVectorVar(var_name, comp);
1398 if (!var)
1399 {
1401 return _default_value_zero;
1402 }
1404
1406 return var->duDotDotDu();
1407 return var->duDotDotDuNeighbor();
1408}

◆ coupledVectorDotDotOld()

const VectorVariableValue & Coupleable::coupledVectorDotDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Old second time derivative of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableValue containing the time derivative of the coupled variable

Definition at line 1363 of file Coupleable.C.

1364{
1365 const auto * var = getVectorVar(var_name, comp);
1366 if (!var)
1367 {
1370 }
1372
1374 return var->uDotDotOld();
1375 return var->uDotDotOldNeighbor();
1376}

◆ coupledVectorDotDu()

const VariableValue & Coupleable::coupledVectorDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Time derivative of a coupled vector variable with respect to the coefficients.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VariableValue containing the time derivative of the coupled vector variable with respect to the coefficients

Definition at line 1379 of file Coupleable.C.

1380{
1381 const auto * var = getVectorVar(var_name, comp);
1382 if (!var)
1383 {
1385 return _default_value_zero;
1386 }
1388
1390 return var->duDotDu();
1391 return var->duDotDuNeighbor();
1392}

◆ coupledVectorDotOld()

const VectorVariableValue & Coupleable::coupledVectorDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Old time derivative of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableValue containing the time derivative of the coupled variable

Definition at line 1347 of file Coupleable.C.

1348{
1349 const auto * var = getVectorVar(var_name, comp);
1350 if (!var)
1351 {
1354 }
1356
1358 return var->uDotOld();
1359 return var->uDotOldNeighbor();
1360}

◆ coupledVectorGradient()

const VectorVariableGradient & Coupleable::coupledVectorGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns gradient of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableGradient containing the gradient of the coupled vector variable

Definition at line 1703 of file Coupleable.C.

1704{
1705 const auto * var = getVectorVar(var_name, comp);
1706 if (!var)
1707 {
1710 }
1712
1714 return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1715 return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1716}
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledVectorGradientOld()

const VectorVariableGradient & Coupleable::coupledVectorGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old gradient from previous time step of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableGradient containing the old gradient of the coupled vector variable

Definition at line 1719 of file Coupleable.C.

1720{
1721 const auto * var = getVectorVar(var_name, comp);
1722 if (!var)
1723 {
1726 }
1728
1730 return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1731 return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1732}

◆ coupledVectorGradientOlder()

const VectorVariableGradient & Coupleable::coupledVectorGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old gradient from two time steps previous of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableGradient containing the older gradient of the coupled vector variable

Definition at line 1735 of file Coupleable.C.

1736{
1737 const auto * var = getVectorVar(var_name, comp);
1738 if (!var)
1739 {
1742 }
1744
1746 return var->gradSlnOlder();
1747 return var->gradSlnOlderNeighbor();
1748}

◆ coupledVectorHelper()

template<typename T , typename Func >
std::vector< T > Coupleable::coupledVectorHelper ( const std::string &  var_name,
const Func &  func 
) const
inlineprotected

Definition at line 1817 of file Coupleable.h.

1818 {
1819 const auto components = coupledComponents(var_name);
1820 std::vector<T> vals(components);
1821 for (MooseIndex(components) comp = 0; comp < components; ++comp)
1822 vals[comp] = func(comp);
1823 return vals;
1824 }
unsigned int coupledComponents(const std::string &var_name) const
Number of coupled components.
Definition Coupleable.C:183

◆ coupledVectorTagArrayDofValue()

const ArrayVariableValue & Coupleable::coupledVectorTagArrayDofValue ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const
protected

Returns evaluations of a tagged vector at the requested variable's degree of freedom indices.

Parameters
var_nameName of coupled variable
tag_namevector tag name
Returns
Reference to a ArrayVariableValue for the coupled variable

Definition at line 814 of file Coupleable.C.

817{
818 return vectorTagDofValueHelper<RealEigenVector>(var_name, tag_name, comp);
819}

◆ coupledVectorTagArrayGradient() [1/2]

const ArrayVariableGradient & Coupleable::coupledVectorTagArrayGradient ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
protectedvirtual

Definition at line 742 of file Coupleable.C.

745{
746 if (!_c_parameters.isParamValid(tag_name))
747 mooseError("Tag name parameter '", tag_name, "' is invalid");
748
749 TagName tagname = _c_parameters.get<TagName>(tag_name);
750 if (!_c_fe_problem.vectorTagExists(tagname))
751 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
752
753 TagID tag = _c_fe_problem.getVectorTagID(tagname);
754 return coupledVectorTagArrayGradient(var_names, tag, index);
755}
virtual const ArrayVariableGradient & coupledVectorTagArrayGradient(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns gradient of a coupled array variable for a given tag.
Definition Coupleable.C:720
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition SubProblem.C:195
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition SubProblem.h:204

◆ coupledVectorTagArrayGradient() [2/2]

const ArrayVariableGradient & Coupleable::coupledVectorTagArrayGradient ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
protectedvirtual

Returns gradient of a coupled array variable for a given tag.

Parameters
var_namesName(s) of coupled array variable(s)
tagvector tag ID
indexIndex of the desired variable in the vector of coupled variables
Returns
Reference to a ArrayVariableGradient containing the gradient of the coupled array variable
See also
Kernel::gradient

Definition at line 720 of file Coupleable.C.

723{
724 const auto * var = getArrayVar(var_names, index);
725 if (!var)
726 mooseError(var_names, ": invalid variable name for coupledVectorTagArrayGradient");
728
730 mooseError("Attempting to couple to vector tag with ID ",
731 tag,
732 "in ",
733 _c_name,
734 ", but a vector tag with that ID does not exist");
735
736 const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
737
738 return var->vectorTagGradient(tag);
739}
void addFEVariableCoupleableVectorTag(TagID tag)
Definition Coupleable.h:116

Referenced by coupledVectorTagArrayGradient(), and coupledVectorTagArrayGradients().

◆ coupledVectorTagArrayGradients() [1/2]

std::vector< const ArrayVariableGradient * > Coupleable::coupledVectorTagArrayGradients ( const std::string &  var_names,
const std::string &  tag_name 
) const
protected

Definition at line 2823 of file Coupleable.C.

2825{
2826 if (!_c_parameters.isParamValid(tag_name))
2827 mooseError("Tag name parameter '", tag_name, "' is invalid");
2828
2829 TagName tagname = _c_parameters.get<TagName>(tag_name);
2830 if (!_c_fe_problem.vectorTagExists(tagname))
2831 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2832
2833 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2834 return coupledVectorTagArrayGradients(var_names, tag);
2835}
std::vector< const ArrayVariableGradient * > coupledVectorTagArrayGradients(const std::string &var_names, TagID tag) const
Returns gradients for all the coupled variables desired for a given tag.

◆ coupledVectorTagArrayGradients() [2/2]

std::vector< const ArrayVariableGradient * > Coupleable::coupledVectorTagArrayGradients ( const std::string &  var_names,
TagID  tag 
) const
protected

Returns gradients for all the coupled variables desired for a given tag.

Parameters
var_namesName(s) of coupled array variable(s)
tagvector tag ID
Returns
Vector of ArrayVariableGradient pointers for each variable in var_name

Definition at line 2815 of file Coupleable.C.

2816{
2817 auto func = [this, &var_names, &tag](unsigned int index)
2818 { return &coupledVectorTagArrayGradient(var_names, tag, index); };
2819 return coupledVectorHelper<const ArrayVariableGradient *>(var_names, func);
2820}

Referenced by coupledVectorTagArrayGradients().

◆ coupledVectorTagArrayValue() [1/2]

const ArrayVariableValue & Coupleable::coupledVectorTagArrayValue ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
protectedvirtual

Definition at line 674 of file Coupleable.C.

677{
678 return vectorTagValueHelper<RealEigenVector>(var_names, tag_name, index);
679}

◆ coupledVectorTagArrayValue() [2/2]

const ArrayVariableValue & Coupleable::coupledVectorTagArrayValue ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
protectedvirtual

Returns value of a coupled array variable for a given tag.

Parameters
var_namesName(s) of coupled array variable(s)
tagvector tag ID
indexIndex of the desired variable in the vector of coupled variables
Returns
Reference to a VariableValue for the coupled array variable
See also
Kernel::_u

Definition at line 666 of file Coupleable.C.

669{
670 return vectorTagValueHelper<RealEigenVector>(var_names, tag, index);
671}

Referenced by coupledVectorTagArrayValues().

◆ coupledVectorTagArrayValues() [1/2]

std::vector< const ArrayVariableValue * > Coupleable::coupledVectorTagArrayValues ( const std::string &  var_names,
const std::string &  tag_name 
) const
protected

Definition at line 2777 of file Coupleable.C.

2779{
2780 if (!_c_parameters.isParamValid(tag_name))
2781 mooseError("Tag name parameter '", tag_name, "' is invalid");
2782
2783 TagName tagname = _c_parameters.get<TagName>(tag_name);
2784 if (!_c_fe_problem.vectorTagExists(tagname))
2785 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2786
2787 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2788 return coupledVectorTagArrayValues(var_names, tag);
2789}
std::vector< const ArrayVariableValue * > coupledVectorTagArrayValues(const std::string &var_names, TagID tag) const
Returns the values for all the coupled variables desired for a given tag.

◆ coupledVectorTagArrayValues() [2/2]

std::vector< const ArrayVariableValue * > Coupleable::coupledVectorTagArrayValues ( const std::string &  var_names,
TagID  tag 
) const
protected

Returns the values for all the coupled variables desired for a given tag.

Parameters
var_nameName of array coupled variable
tagvector tag ID
Returns
Vector of ArrayVariableValue pointers for each variable in var_names

Definition at line 2769 of file Coupleable.C.

2770{
2771 auto func = [this, &var_names, &tag](unsigned int index)
2772 { return &coupledVectorTagArrayValue(var_names, tag, index); };
2773 return coupledVectorHelper<const ArrayVariableValue *>(var_names, func);
2774}
virtual const ArrayVariableValue & coupledVectorTagArrayValue(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns value of a coupled array variable for a given tag.
Definition Coupleable.C:666

Referenced by coupledVectorTagArrayValues().

◆ coupledVectorTagDofValue() [1/2]

const VariableValue & Coupleable::coupledVectorTagDofValue ( const std::string &  var_name,
TagID  tag,
unsigned int  index = 0 
) const
protectedvirtual

Returns dof value of a coupled variable for a given tag.

Parameters
var_namesName(s) of coupled variable(s)
tagvector tag ID
indexIndex of the desired variable in the vector of coupled variables
Returns
Reference to a DofValue for the coupled variable

Definition at line 798 of file Coupleable.C.

801{
802 return vectorTagDofValueHelper<Real>(var_name, tag, comp);
803}

Referenced by coupledVectorTagDofValues().

◆ coupledVectorTagDofValue() [2/2]

const VariableValue & Coupleable::coupledVectorTagDofValue ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
protectedvirtual

Definition at line 806 of file Coupleable.C.

809{
810 return vectorTagDofValueHelper<Real>(var_name, tag_name, comp);
811}

◆ coupledVectorTagDofValues() [1/2]

std::vector< const VariableValue * > Coupleable::coupledVectorTagDofValues ( const std::string &  var_names,
const std::string &  tag_name 
) const
protected

Definition at line 2846 of file Coupleable.C.

2848{
2849 if (!_c_parameters.isParamValid(tag_name))
2850 mooseError("Tag name parameter '", tag_name, "' is invalid");
2851
2852 TagName tagname = _c_parameters.get<TagName>(tag_name);
2853 if (!_c_fe_problem.vectorTagExists(tagname))
2854 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2855
2856 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2857 return coupledVectorTagDofValues(var_names, tag);
2858}
std::vector< const VariableValue * > coupledVectorTagDofValues(const std::string &var_names, TagID tag) const
Returns the dof values for all the coupled variables desired for a given tag.

◆ coupledVectorTagDofValues() [2/2]

std::vector< const VariableValue * > Coupleable::coupledVectorTagDofValues ( const std::string &  var_names,
TagID  tag 
) const
protected

Returns the dof values for all the coupled variables desired for a given tag.

Parameters
var_namesName(s) of coupled variable(s)
tagvector tag ID
Returns
Vector of VariableValue pointers for each variable in var_name

Definition at line 2838 of file Coupleable.C.

2839{
2840 auto func = [this, &var_names, &tag](unsigned int comp)
2841 { return &coupledVectorTagDofValue(var_names, tag, comp); };
2842 return coupledVectorHelper<const VariableValue *>(var_names, func);
2843}
virtual const VariableValue & coupledVectorTagDofValue(const std::string &var_name, TagID tag, unsigned int index=0) const
Returns dof value of a coupled variable for a given tag.
Definition Coupleable.C:798

Referenced by coupledVectorTagDofValues().

◆ coupledVectorTagGradient() [1/2]

const VariableGradient & Coupleable::coupledVectorTagGradient ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
protectedvirtual

Definition at line 704 of file Coupleable.C.

707{
708 if (!_c_parameters.isParamValid(tag_name))
709 mooseError("Tag name parameter '", tag_name, "' is invalid");
710
711 TagName tagname = _c_parameters.get<TagName>(tag_name);
712 if (!_c_fe_problem.vectorTagExists(tagname))
713 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
714
715 TagID tag = _c_fe_problem.getVectorTagID(tagname);
716 return coupledVectorTagGradient(var_names, tag, index);
717}
virtual const VariableGradient & coupledVectorTagGradient(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns gradient of a coupled variable for a given tag.
Definition Coupleable.C:682

◆ coupledVectorTagGradient() [2/2]

const VariableGradient & Coupleable::coupledVectorTagGradient ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
protectedvirtual

Returns gradient of a coupled variable for a given tag.

Parameters
var_namesName(s) of coupled variable(s)
tagvector tag ID
indexIndex of the desired variable in the vector of coupled variables
Returns
Reference to a VariableGradient containing the gradient of the coupled variable
See also
Kernel::gradient

Definition at line 682 of file Coupleable.C.

685{
686 const auto * var = getVar(var_names, index);
687 if (!var)
688 mooseError(var_names, ": invalid variable name for coupledVectorTagGradient");
690
692 mooseError("Attempting to couple to vector tag with ID ",
693 tag,
694 "in ",
695 _c_name,
696 ", but a vector tag with that ID does not exist");
697
698 const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
699
700 return var->vectorTagGradient(tag);
701}

Referenced by coupledVectorTagGradient(), and coupledVectorTagGradients().

◆ coupledVectorTagGradients() [1/2]

std::vector< const VariableGradient * > Coupleable::coupledVectorTagGradients ( const std::string &  var_names,
const std::string &  tag_name 
) const
protected

Definition at line 2800 of file Coupleable.C.

2802{
2803 if (!_c_parameters.isParamValid(tag_name))
2804 mooseError("Tag name parameter '", tag_name, "' is invalid");
2805
2806 TagName tagname = _c_parameters.get<TagName>(tag_name);
2807 if (!_c_fe_problem.vectorTagExists(tagname))
2808 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2809
2810 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2811 return coupledVectorTagGradients(var_names, tag);
2812}
std::vector< const VariableGradient * > coupledVectorTagGradients(const std::string &var_names, TagID tag) const
Returns gradients for all the coupled variables desired for a given tag.

◆ coupledVectorTagGradients() [2/2]

std::vector< const VariableGradient * > Coupleable::coupledVectorTagGradients ( const std::string &  var_names,
TagID  tag 
) const
protected

Returns gradients for all the coupled variables desired for a given tag.

Parameters
var_namesName(s) of coupled array variable(s)
tagvector tag ID
Returns
Vector of VariableGradient pointers for each variables in var_name

Definition at line 2792 of file Coupleable.C.

2793{
2794 auto func = [this, &var_names, &tag](unsigned int index)
2795 { return &coupledVectorTagGradient(var_names, tag, index); };
2796 return coupledVectorHelper<const VariableGradient *>(var_names, func);
2797}

Referenced by coupledVectorTagGradients().

◆ coupledVectorTagValue() [1/2]

const VariableValue & Coupleable::coupledVectorTagValue ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
protectedvirtual

Definition at line 658 of file Coupleable.C.

661{
662 return vectorTagValueHelper<Real>(var_names, tag_name, index);
663}

◆ coupledVectorTagValue() [2/2]

const VariableValue & Coupleable::coupledVectorTagValue ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
protectedvirtual

Returns value of a coupled variable for a given tag.

Parameters
var_namesName(s) of coupled variable(s)
tagvector tag ID
indexIndex of the desired variable in the vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable
See also
Kernel::_u

Definition at line 650 of file Coupleable.C.

653{
654 return vectorTagValueHelper<Real>(var_names, tag, index);
655}

Referenced by coupledVectorTagValues().

◆ coupledVectorTagValues() [1/2]

std::vector< const VariableValue * > Coupleable::coupledVectorTagValues ( const std::string &  var_names,
const std::string &  tag_name 
) const
protected

Definition at line 2754 of file Coupleable.C.

2756{
2757 if (!_c_parameters.isParamValid(tag_name))
2758 mooseError("Tag name parameter '", tag_name, "' is invalid");
2759
2760 TagName tagname = _c_parameters.get<TagName>(tag_name);
2761 if (!_c_fe_problem.vectorTagExists(tagname))
2762 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2763
2764 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2765 return coupledVectorTagValues(var_names, tag);
2766}
std::vector< const VariableValue * > coupledVectorTagValues(const std::string &var_names, TagID tag) const
Returns the values for all the coupled variables desired for a given tag.

◆ coupledVectorTagValues() [2/2]

std::vector< const VariableValue * > Coupleable::coupledVectorTagValues ( const std::string &  var_names,
TagID  tag 
) const
protected

Returns the values for all the coupled variables desired for a given tag.

Parameters
var_namesName(s) of coupled variable(s)
tagvector tag ID
Returns
Vector of VariableValue pointers for each variable in var_names

Definition at line 2746 of file Coupleable.C.

2747{
2748 auto func = [this, &var_names, &tag](unsigned int comp)
2749 { return &coupledVectorTagValue(var_names, tag, comp); };
2750 return coupledVectorHelper<const VariableValue *>(var_names, func);
2751}
virtual const VariableValue & coupledVectorTagValue(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns value of a coupled variable for a given tag.
Definition Coupleable.C:650

Referenced by coupledVectorTagValues().

◆ coupledVectorValue()

const VectorVariableValue & Coupleable::coupledVectorValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns value of a coupled vector variable.

Parameters
var_nameName of coupled vector variable
compComponent number for vector of coupled vector variables
Returns
Reference to a VectorVariableValue for the coupled vector variable
See also
VectorKernel::_u

Definition at line 855 of file Coupleable.C.

856{
857 const auto * var = getVectorVar(var_name, comp);
858 if (!var)
859 return *getDefaultVectorValue(var_name);
861
863 {
864 if (_c_nodal)
865 return _c_is_implicit ? var->nodalValueArray() : var->nodalValueOldArray();
866 else
867 return _c_is_implicit ? var->sln() : var->slnOld();
868 }
869 else
870 {
871 if (_c_nodal)
872 // Since this is at a node, I don't feel like there should be any "neighbor" logic
873 return _c_is_implicit ? var->nodalValueArray() : var->nodalValueOldArray();
874 else
875 return _c_is_implicit ? var->slnNeighbor() : var->slnOldNeighbor();
876 }
877}
const VectorVariableValue * getDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled vector variable.
Definition Coupleable.C:393

Referenced by coupledGenericValues(), and coupledGenericVectorValue().

◆ coupledVectorValueOld()

const VectorVariableValue & Coupleable::coupledVectorValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old value from previous time step of a coupled vector variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableValue containing the old value of the coupled variable
See also
VectorKernel::_u_old

Definition at line 1129 of file Coupleable.C.

1130{
1131 const auto * var = getVectorVar(var_name, comp);
1132 if (!var)
1133 return *getDefaultVectorValue(var_name);
1135
1136 if (_c_nodal)
1137 return (_c_is_implicit) ? var->nodalValueOldArray() : var->nodalValueOlderArray();
1139 return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1140 return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1141}

Referenced by coupledVectorValuesOld().

◆ coupledVectorValueOlder()

const VectorVariableValue & Coupleable::coupledVectorValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedvirtual

Returns an old value from two time steps previous of a coupled vector variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableValue containing the older value of the coupled variable
See also
VectorKernel::_u_older

Definition at line 1144 of file Coupleable.C.

1145{
1146 const auto * var = getVectorVar(var_name, comp);
1147 if (!var)
1148 return *getDefaultVectorValue(var_name);
1150
1152 return var->slnOlder();
1153 return var->slnOlderNeighbor();
1154}

◆ coupledVectorValues()

std::vector< const VectorVariableValue * > Coupleable::coupledVectorValues ( const std::string &  var_name) const
protected

Returns the values for all of a coupled vector variable's components.

Parameters
var_nameName of coupled variable
Returns
Vector of VectorVariableValue pointers for each component of var_name

Definition at line 2710 of file Coupleable.C.

2711{
2712 auto func = [this, &var_name](unsigned int comp) { return &coupledVectorValue(var_name, comp); };
2713 return coupledVectorHelper<const VectorVariableValue *>(var_name, func);
2714}

◆ coupledVectorValuesOld()

std::vector< const VectorVariableValue * > Coupleable::coupledVectorValuesOld ( const std::string &  var_name) const
protected

Returns the old values for all of a coupled vector variable's components.

Parameters
var_nameName of coupled vector variable
Returns
Vector of VectorVariableValue pointers for each component of var_name

Definition at line 2898 of file Coupleable.C.

2899{
2900 auto func = [this, &var_name](unsigned int comp)
2901 { return &coupledVectorValueOld(var_name, comp); };
2902 return coupledVectorHelper<const VectorVariableValue *>(var_name, func);
2903}
virtual const VectorVariableValue & coupledVectorValueOld(const std::string &var_name, unsigned int comp=0) const
Returns an old value from previous time step of a coupled vector variable.

◆ genericZeroGradient() [1/3]

template<bool is_ad>
const GenericVariableGradient< is_ad > & Coupleable::genericZeroGradient ( )
protected

Returns zero gradient templated with automatic differentiation boolean.

Returns
Reference to a const GenericVariableValue

◆ genericZeroGradient() [2/3]

template<>
const GenericVariableGradient< false > & Coupleable::genericZeroGradient ( )
protected

Definition at line 2630 of file Coupleable.C.

2632{
2633 return _grad_zero;
2634}

◆ genericZeroGradient() [3/3]

template<>
const GenericVariableGradient< true > & Coupleable::genericZeroGradient ( )
protected

Definition at line 2637 of file Coupleable.C.

2639{
2640 return _ad_grad_zero;
2641}

◆ genericZeroSecond() [1/3]

template<bool is_ad>
const GenericVariableSecond< is_ad > & Coupleable::genericZeroSecond ( )
protected

Returns zero second derivative templated with automatic differentiation boolean.

Returns
Reference to a const GenericVariableValue

◆ genericZeroSecond() [2/3]

template<>
const GenericVariableSecond< false > & Coupleable::genericZeroSecond ( )
protected

Definition at line 2644 of file Coupleable.C.

2646{
2647 return _second_zero;
2648}

◆ genericZeroSecond() [3/3]

template<>
const GenericVariableSecond< true > & Coupleable::genericZeroSecond ( )
protected

Definition at line 2651 of file Coupleable.C.

2653{
2654 return _ad_second_zero;
2655}

◆ genericZeroValue() [1/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::genericZeroValue ( )
protected

Returns zero value templated with automatic differentiation boolean.

Returns
Reference to a const GenericVariableValue

◆ genericZeroValue() [2/3]

template<>
const GenericVariableValue< false > & Coupleable::genericZeroValue ( )
protected

Definition at line 2616 of file Coupleable.C.

2618{
2619 return _zero;
2620}

◆ genericZeroValue() [3/3]

template<>
const GenericVariableValue< true > & Coupleable::genericZeroValue ( )
protected

Definition at line 2623 of file Coupleable.C.

2625{
2626 return _ad_zero;
2627}

◆ getADDefaultArrayGradient()

const ADArrayVariableGradient & Coupleable::getADDefaultArrayGradient ( const std::string &  var_name) const

Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled array variable.

Parameters
var_namethe name of the array variable for which to retrieve a default gradient
Returns
Reference to a ADArrayVariableGradient containing zero entries for the default values

Definition at line 2527 of file Coupleable.C.

2528{
2529 auto default_gradient_it = _ad_default_array_gradient.find(var_name);
2530 if (default_gradient_it == _ad_default_array_gradient.end())
2531 {
2532 const auto n = _c_parameters.numberDefaultCoupledValues(var_name);
2534 ADArrayVariableGradient::value_type::Zero(n, Moose::dim);
2535 auto gradient = std::make_unique<ADArrayVariableGradient>(_coupleable_max_qps, zero);
2536 default_gradient_it =
2537 _ad_default_array_gradient.insert(std::make_pair(var_name, std::move(gradient))).first;
2538 }
2539
2540 return *default_gradient_it->second;
2541}
std::unordered_map< std::string, std::unique_ptr< ADArrayVariableGradient > > _ad_default_array_gradient
Will hold the zero default gradient for optional array coupled variables for automatic differentiatio...
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition Moose.h:175

Referenced by adCoupledArrayGradient().

◆ getADDefaultArrayValue()

const ADArrayVariableValue * Coupleable::getADDefaultArrayValue ( const std::string &  var_name) const

Helper method to return (and insert if necessary) the default array value for Automatic Differentiation for an uncoupled array variable.

Parameters
var_namethe name of the array variable for which to retrieve a default value
Returns
Pointer to the ADArrayVariableValue holding the default values

Definition at line 2509 of file Coupleable.C.

2510{
2511 auto default_value_it = _ad_default_array_value.find(var_name);
2512 if (default_value_it == _ad_default_array_value.end())
2513 {
2514 const auto n = _c_parameters.numberDefaultCoupledValues(var_name);
2515 ADRealEigenVector default_array(n);
2516 for (const auto i : make_range(n))
2517 default_array(i) = _c_parameters.defaultCoupledValue(var_name, i);
2518 auto value = std::make_unique<ADArrayVariableValue>(_coupleable_max_qps, default_array);
2519 default_value_it =
2520 _ad_default_array_value.insert(std::make_pair(var_name, std::move(value))).first;
2521 }
2522
2523 return default_value_it->second.get();
2524}
std::unordered_map< std::string, std::unique_ptr< ADArrayVariableValue > > _ad_default_array_value
Will hold the default value for optional array coupled variables for automatic differentiation.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Eigen::Matrix< ADReal, Eigen::Dynamic, 1 > ADRealEigenVector
Definition MooseTypes.h:148
IntRange< T > make_range(T beg, T end)

Referenced by adCoupledArrayValue().

◆ getADDefaultArrayValueZero()

const ADArrayVariableValue & Coupleable::getADDefaultArrayValueZero ( const std::string &  var_name) const

Helper method to return (and insert if necessary) the zero default time derivative for Automatic Differentiation for an uncoupled array variable.

Parameters
var_namethe name of the array variable for which to retrieve a default
Returns
Reference to a ADArrayVariableValue containing zero entries

Definition at line 2544 of file Coupleable.C.

2545{
2546 auto default_value_it = _ad_default_array_value_zero.find(var_name);
2547 if (default_value_it == _ad_default_array_value_zero.end())
2548 {
2549 const auto n = _c_parameters.numberDefaultCoupledValues(var_name);
2550 const ADRealEigenVector zero = ADRealEigenVector::Zero(n);
2551 auto value = std::make_unique<ADArrayVariableValue>(_coupleable_max_qps, zero);
2552 default_value_it =
2553 _ad_default_array_value_zero.insert(std::make_pair(var_name, std::move(value))).first;
2554 }
2555
2556 return *default_value_it->second;
2557}
std::unordered_map< std::string, std::unique_ptr< ADArrayVariableValue > > _ad_default_array_value_zero
Will hold the zero default time derivative for optional array coupled variables for automatic differe...

Referenced by adCoupledArrayDot(), and adCoupledArrayDotDot().

◆ getADDefaultCurl()

const ADVectorVariableCurl & Coupleable::getADDefaultCurl ( ) const

Helper method to return (and insert if necessary) the default curl value for Automatic Differentiation for an uncoupled variable.

Parameters
var_namethe name of the vector variable for which to retrieve a default value
Returns
Reference to a ADVectorVariableCurl containing zero entries for the default values

Definition at line 2581 of file Coupleable.C.

2582{
2584 return _ad_default_curl;
2585}
MooseArray< ADRealVectorValue > _ad_default_curl
This will always be zero because the default values for optionally coupled vector variables is always...

Referenced by adCoupledCurl().

◆ getADDefaultDiv()

const ADVectorVariableDivergence & Coupleable::getADDefaultDiv ( ) const

Helper method to return (and insert if necessary) the default divergence value for Automatic Differentiation for an uncoupled vector variable.

Returns
the default divergence value for the vector variable

Definition at line 2588 of file Coupleable.C.

2589{
2591 return _ad_default_div;
2592}
MooseArray< ADReal > _ad_default_div
Will hold the default value for optional vector coupled variable divergences for automatic differenti...
void resize(unsigned int size)
Change the number of elements the array can store.
Definition MooseArray.h:216

Referenced by adCoupledDiv().

◆ getADDefaultGradient()

const ADVariableGradient & Coupleable::getADDefaultGradient ( ) const

Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled variable.

Parameters
var_namethe name of the variable for which to retrieve a default gradient
Returns
Reference to a ADVariableGradient containing zero entries for the default values

Definition at line 2560 of file Coupleable.C.

2561{
2563 return _ad_default_gradient;
2564}
MooseArray< ADRealVectorValue > _ad_default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...

Referenced by adCoupledGradient(), and adCoupledGradientDot().

◆ getADDefaultSecond()

const ADVariableSecond & Coupleable::getADDefaultSecond ( ) const

Helper method to return (and insert if necessary) the default second derivatives for Automatic Differentiation for an uncoupled variable.

Parameters
var_namethe name of the variable for which to retrieve a default second derivative
Returns
Reference to a ADVariableSecond containing zero entries for the default values

Definition at line 2574 of file Coupleable.C.

2575{
2577 return _ad_default_second;
2578}
MooseArray< ADRealTensorValue > _ad_default_second
This will always be zero because the default values for optionally coupled variables is always consta...

Referenced by adCoupledSecond().

◆ getADDefaultValue()

const ADVariableValue * Coupleable::getADDefaultValue ( const std::string &  var_name) const

Helper method to return (and insert if necessary) the default value for Automatic Differentiation for an uncoupled variable.

Parameters
var_namethe name of the variable for which to retrieve a default value
Returns
VariableValue * a pointer to the associated VariableValue.

Definition at line 2478 of file Coupleable.C.

2479{
2480 auto default_value_it = _ad_default_value.find(var_name);
2481 if (default_value_it == _ad_default_value.end())
2482 {
2483 auto value = std::make_unique<ADVariableValue>(_coupleable_max_qps,
2485 default_value_it = _ad_default_value.insert(std::make_pair(var_name, std::move(value))).first;
2486 }
2487
2488 return default_value_it->second.get();
2489}
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADReal > > > _ad_default_value
Will hold the default value for optional coupled variables for automatic differentiation.
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.

Referenced by adCoupledDofValues(), adCoupledDot(), adCoupledDotDot(), adCoupledLowerValue(), NeighborCoupleable::adCoupledNeighborValue(), and adCoupledValue().

◆ getADDefaultVectorGradient()

const ADVectorVariableGradient & Coupleable::getADDefaultVectorGradient ( ) const

Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled vector variable.

Parameters
var_namethe name of the vector variable for which to retrieve a default gradient
Returns
Reference to a ADVectorVariableGradient containing zero entries for the default values

Definition at line 2567 of file Coupleable.C.

2568{
2571}
MooseArray< ADRealTensorValue > _ad_default_vector_gradient
This will always be zero because the default values for optionally coupled vector variables is always...

Referenced by adCoupledVectorGradient().

◆ getADDefaultVectorValue()

const ADVectorVariableValue * Coupleable::getADDefaultVectorValue ( const std::string &  var_name) const

Helper method to return (and insert if necessary) the default vector value for Automatic Differentiation for an uncoupled variable.

Parameters
var_namethe name of the vector variable for which to retrieve a default value
Returns
VectorVariableValue * a pointer to the associated VectorVariableValue.

Definition at line 2492 of file Coupleable.C.

2493{
2494 auto default_value_it = _ad_default_vector_value.find(var_name);
2495 if (default_value_it == _ad_default_vector_value.end())
2496 {
2497 RealVectorValue default_vec;
2498 for (unsigned int i = 0; i < _c_parameters.numberDefaultCoupledValues(var_name); ++i)
2499 default_vec(i) = _c_parameters.defaultCoupledValue(var_name, i);
2500 auto value = std::make_unique<ADVectorVariableValue>(_coupleable_max_qps, default_vec);
2501 default_value_it =
2502 _ad_default_vector_value.insert(std::make_pair(var_name, std::move(value))).first;
2503 }
2504
2505 return default_value_it->second.get();
2506}
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
Will hold the default value for optional vector coupled variables for automatic differentiation.
VectorValue< Real > RealVectorValue
Definition SubProblem.h:34

Referenced by adCoupledVectorDot(), NeighborCoupleable::adCoupledVectorNeighborValue(), and adCoupledVectorValue().

◆ getArrayVar() [1/2]

ArrayMooseVariable * Coupleable::getArrayVar ( const std::string &  var_name,
unsigned int  comp 
)
protected

◆ getArrayVar() [2/2]

const ArrayMooseVariable * Coupleable::getArrayVar ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Extract pointer to a coupled array variable.

Parameters
var_nameName of parameter desired
compComponent number of multiple coupled variables
Returns
Pointer to the desired variable

Definition at line 360 of file Coupleable.C.

361{
362 return getVarHelper<ArrayMooseVariable>(var_name, comp);
363}

◆ getCoupledArrayMooseVars()

const std::vector< ArrayMooseVariable * > & Coupleable::getCoupledArrayMooseVars ( ) const
inline

Get the list of array coupled variables.

Returns
The list of array coupled variables

Definition at line 111 of file Coupleable.h.

112 {
114 }

◆ getCoupledMooseVars()

const std::vector< MooseVariableFieldBase * > & Coupleable::getCoupledMooseVars ( ) const
inline

◆ getCoupledStandardMooseVars()

const std::vector< MooseVariable * > & Coupleable::getCoupledStandardMooseVars ( ) const
inline

Get the list of standard coupled variables.

Returns
The list of standard coupled variables

Definition at line 93 of file Coupleable.h.

94 {
96 }

◆ getCoupledVars()

const std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > & Coupleable::getCoupledVars ( ) const
inline

Get the list of coupled variables.

Returns
The list of coupled variables

Definition at line 75 of file Coupleable.h.

76 {
77 return _coupled_vars;
78 }

Referenced by InitialConditionBase::InitialConditionBase().

◆ getCoupledVectorMooseVars()

const std::vector< VectorMooseVariable * > & Coupleable::getCoupledVectorMooseVars ( ) const
inline

Get the list of vector coupled variables.

Returns
The list of vector coupled variables

Definition at line 102 of file Coupleable.h.

103 {
105 }

◆ getDefaultArrayValue()

const ArrayVariableValue * Coupleable::getDefaultArrayValue ( const std::string &  var_name) const
private

Helper method to return (and insert if necessary) the default value for an uncoupled array variable.

Parameters
var_namethe name of the vector variable for which to retrieve a default value
Returns
a pointer to the associated VectorVariableValue.

Definition at line 428 of file Coupleable.C.

429{
430 auto default_value_it = _default_array_value.find(var_name);
431 if (default_value_it == _default_array_value.end())
432 {
433 auto value = std::make_unique<ArrayVariableValue>(_coupleable_max_qps);
434 for (unsigned int qp = 0; qp < _coupleable_max_qps; ++qp)
435 {
436 auto n = _c_parameters.numberDefaultCoupledValues(var_name);
437 (*value)[qp].resize(n);
438 for (unsigned int i = 0; i < n; ++i)
439 (*value)[qp](i) = _c_parameters.defaultCoupledValue(var_name, i);
440 }
441 default_value_it =
442 _default_array_value.insert(std::make_pair(var_name, std::move(value))).first;
443 }
444
445 return default_value_it->second.get();
446}
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
Will hold the default value for optional array coupled variables.

Referenced by coupledArrayDofValues(), coupledArrayValue(), coupledArrayValueOld(), coupledArrayValueOlder(), and getDefaultNodalValue().

◆ getDefaultFunctor()

template<typename T >
const Moose::Functor< T > & Coupleable::getDefaultFunctor ( const std::string &  var_name) const
private

◆ getDefaultNodalValue() [1/3]

template<typename T >
template const Real & Coupleable::getDefaultNodalValue< Real > ( const std::string &  var_name,
unsigned int  comp = 0 
) const
private

Get nodal default value.

Definition at line 450 of file Coupleable.C.

451{
452 auto && default_variable_value = getDefaultValue(var_name, comp);
453 return *default_variable_value->data();
454}

◆ getDefaultNodalValue() [2/3]

template<>
const RealVectorValue & Coupleable::getDefaultNodalValue ( const std::string &  var_name,
unsigned int   
) const
private

Definition at line 457 of file Coupleable.C.

459{
460 auto && default_variable_value = getDefaultVectorValue(var_name);
461 return *default_variable_value->data();
462}

◆ getDefaultNodalValue() [3/3]

template<>
const RealEigenVector & Coupleable::getDefaultNodalValue ( const std::string &  var_name,
unsigned int   
) const
private

Definition at line 465 of file Coupleable.C.

467{
468 auto && default_variable_value = getDefaultArrayValue(var_name);
469 return *default_variable_value->data();
470}

◆ getDefaultValue()

const VariableValue * Coupleable::getDefaultValue ( const std::string &  var_name,
unsigned int  comp 
) const
private

Helper method to return (and insert if necessary) the default value for an uncoupled variable.

Parameters
var_namethe name of the variable for which to retrieve a default value
Returns
a pointer to the associated VariableValue.

Definition at line 366 of file Coupleable.C.

367{
368 // make sure we don't access values that were not provided
370
371 auto default_value_it = _default_value.find(var_name);
372 if (default_value_it == _default_value.end())
373 {
374 _default_value[var_name].emplace_back(std::make_unique<VariableValue>(
376 for (unsigned int j = 1; j < _c_parameters.numberDefaultCoupledValues(var_name); ++j)
377 _default_value[var_name].emplace_back(std::make_unique<VariableValue>(
379 default_value_it = _default_value.find(var_name);
380 }
381
382 const auto & default_value_vec = default_value_it->second;
383 const auto n_default_vals = default_value_vec.size();
384 if (comp >= n_default_vals)
385 mooseError("Requested comp ",
386 comp,
387 " is equal to or greater than the number of default values ",
388 n_default_vals);
389 return default_value_vec[comp].get();
390}
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
Will hold the default value for optional coupled variables.

Referenced by coupledDofValues(), coupledDofValuesOld(), coupledDofValuesOlder(), coupledValue(), coupledValueLower(), coupledValueOld(), coupledValueOlder(), coupledValuePreviousNL(), and getDefaultNodalValue().

◆ getDefaultVectorValue()

const VectorVariableValue * Coupleable::getDefaultVectorValue ( const std::string &  var_name) const
private

Helper method to return (and insert if necessary) the default value for an uncoupled vector variable.

Parameters
var_namethe name of the vector variable for which to retrieve a default value
Returns
a pointer to the associated VectorVariableValue.

Definition at line 393 of file Coupleable.C.

394{
395 auto default_value_it = _default_vector_value.find(var_name);
396 if (default_value_it == _default_vector_value.end())
397 {
398 auto value = std::make_unique<VectorVariableValue>(_coupleable_max_qps, 0);
399 bool already_warned = false;
400 for (unsigned int qp = 0; qp < _coupleable_max_qps; ++qp)
401 for (const auto i : make_range(Moose::dim))
402 {
403 try
404 {
405 (*value)[qp](i) = _c_parameters.defaultCoupledValue(var_name, i);
406 }
407 catch (const std::out_of_range &)
408 {
409 if (!already_warned)
411 "You supplied less than 3 arguments for the default vector value for variable ",
412 var_name,
413 ". Did you accidently leave something off? We are going to assign 0s, assuming "
414 "this "
415 "was intentional.");
416 already_warned = true;
417 (*value)[qp](i) = 0;
418 }
419 }
420 default_value_it =
421 _default_vector_value.insert(std::make_pair(var_name, std::move(value))).first;
422 }
423
424 return default_value_it->second.get();
425}
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition MooseError.h:345
unsigned int dim
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
Will hold the default value for optional vector coupled variables.

Referenced by coupledVectorValue(), coupledVectorValueOld(), coupledVectorValueOlder(), and getDefaultNodalValue().

◆ getFEVar()

const MooseVariableFieldBase * Coupleable::getFEVar ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Deprecated method.

Use getFieldVar instead Extract pointer to a base coupled field variable. Could be either a finite volume or finite element variable

Parameters
var_nameName of parameter desired
compComponent number of multiple coupled variables
Returns
Pointer to the desired variable

Definition at line 293 of file Coupleable.C.

294{
295 mooseDeprecated("Coupleable::getFEVar is deprecated. Please use Coupleable::getFieldVar instead. "
296 "Note that this method could potentially return a finite volume variable");
297 return getFieldVar(var_name, comp);
298}

◆ getFEVariableCoupleableMatrixTags() [1/2]

std::set< TagID > & Coupleable::getFEVariableCoupleableMatrixTags ( )
inline

Definition at line 122 of file Coupleable.h.

◆ getFEVariableCoupleableMatrixTags() [2/2]

const std::set< TagID > & Coupleable::getFEVariableCoupleableMatrixTags ( ) const
inline

Definition at line 129 of file Coupleable.h.

130 {
132 }

◆ getFEVariableCoupleableVectorTags() [1/2]

std::set< TagID > & Coupleable::getFEVariableCoupleableVectorTags ( )
inline

◆ getFEVariableCoupleableVectorTags() [2/2]

const std::set< TagID > & Coupleable::getFEVariableCoupleableVectorTags ( ) const
inline

Definition at line 124 of file Coupleable.h.

125 {
127 }

◆ getFieldVar() [1/2]

MooseVariableFieldBase * Coupleable::getFieldVar ( const std::string &  var_name,
unsigned int  comp 
)
protected

Definition at line 301 of file Coupleable.C.

302{
303 return getVarHelper<MooseVariableFieldBase>(var_name, comp);
304}

◆ getFieldVar() [2/2]

const MooseVariableFieldBase * Coupleable::getFieldVar ( const std::string &  var_name,
unsigned int  comp 
) const
protected

◆ getFieldVars()

std::vector< const MooseVariableFieldBase * > Coupleable::getFieldVars ( const std::string &  var_name) const
protected

Definition at line 313 of file Coupleable.C.

314{
315 return getVarsHelper<MooseVariableFieldBase>(var_name);
316}

◆ getVar() [1/2]

MooseVariable * Coupleable::getVar ( const std::string &  var_name,
unsigned int  comp 
)
protected

Extract pointer to a coupled variable.

Parameters
var_nameName of parameter desired
compComponent number of multiple coupled variables
Returns
Pointer to the desired variable

Definition at line 319 of file Coupleable.C.

320{
321 return const_cast<MooseVariable *>(getVarHelper<MooseVariable>(var_name, comp));
322}

Referenced by coupledDofValuesOld(), coupledDofValuesOlder(), coupledDot(), coupledDotDot(), coupledDotDotDu(), coupledDotDotOld(), coupledDotDu(), coupledDotOld(), coupledGradientDot(), coupledGradientDotDot(), coupledGradientOld(), coupledGradientOlder(), coupledGradientPreviousNL(), NeighborCoupleable::coupledNeighborDofValues(), NeighborCoupleable::coupledNeighborDofValuesOld(), NeighborCoupleable::coupledNeighborDofValuesOlder(), NeighborCoupleable::coupledNeighborGradientOld(), NeighborCoupleable::coupledNeighborGradientOlder(), NeighborCoupleable::coupledNeighborSecond(), NeighborCoupleable::coupledNeighborValueDot(), NeighborCoupleable::coupledNeighborValueDotDu(), NeighborCoupleable::coupledNeighborValueOld(), NeighborCoupleable::coupledNeighborValueOlder(), coupledNodalDotDot(), coupledNodalDotDotOld(), coupledNodalDotOld(), coupledSecond(), coupledSecondOld(), coupledSecondOlder(), coupledSecondPreviousNL(), coupledValueLower(), coupledValueOld(), coupledValueOlder(), coupledValuePreviousNL(), coupledVectorTagGradient(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), NearestNodeValueAux::NearestNodeValueAux(), and writableCoupledValue().

◆ getVar() [2/2]

const MooseVariable * Coupleable::getVar ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Extract pointer to a coupled variable.

Parameters
var_nameName of parameter desired
compComponent number of multiple coupled variables
Returns
Pointer to the desired variable

Definition at line 343 of file Coupleable.C.

344{
345 return getVarHelper<MooseVariable>(var_name, comp);
346}

◆ getVarHelper() [1/2]

template<typename T >
T * Coupleable::getVarHelper ( const std::string &  var_name,
unsigned int  comp 
)
protected

Helper that can be used to retrieve a variable of arbitrary type T.

Definition at line 2301 of file Coupleable.h.

2302{
2303 const auto & var_name = _c_parameters.checkForRename(var_name_in);
2304 auto name_to_use = var_name;
2305
2306 // First check for supplied name
2307 if (!checkVar(var_name, comp, 0))
2308 {
2309 // See if there is an associated deprecated name that the user may have used instead
2310 auto it = _new_to_deprecated_coupled_vars.find(var_name);
2311 if (it == _new_to_deprecated_coupled_vars.end())
2312 return nullptr;
2313 else
2314 {
2315 auto deprecated_name = it->second;
2316 if (checkVar(deprecated_name, comp, 0))
2317 name_to_use = deprecated_name;
2318 else
2319 return nullptr;
2320 }
2321 }
2322
2323 auto coupled_vars_it = _coupled_vars.find(name_to_use);
2324
2325 mooseAssert(coupled_vars_it != _coupled_vars.end(),
2326 "Trying to get a coupled var " << name_to_use << " that doesn't exist");
2327 mooseAssert(comp < coupled_vars_it->second.size(),
2328 "Component index outside of coupled variables vector");
2329 auto * const base_var = coupled_vars_it->second[comp];
2330
2331 if (auto coupled_var = dynamic_cast<T *>(base_var))
2332 return coupled_var;
2333 else
2334 {
2335 for (auto & var : _coupled_standard_moose_vars)
2336 if (var->name() == base_var->name())
2337 mooseError("The named variable is a standard variable, try a "
2338 "'coupled[Value/Gradient/Dot/etc]...' function instead");
2339 for (auto & var : _coupled_vector_moose_vars)
2340 if (var->name() == base_var->name())
2341 mooseError("The named variable is a vector variable, try a "
2342 "'coupledVector[Value/Gradient/Dot/etc]...' function instead");
2343 for (auto & var : _coupled_array_moose_vars)
2344 if (var->name() == base_var->name())
2345 mooseError("The named variable is an array variable, try a "
2346 "'coupledArray[Value/Gradient/Dot/etc]...' function instead");
2347 for (auto & var : _coupled_fv_moose_vars)
2348 if (var->name() == base_var->name())
2349 mooseError("The named variable is a finite volume variable, which the coupled[...] routine "
2350 "used does not support. Try using the functor system routines instead.");
2351 mooseError("Variable '",
2352 base_var->name(),
2353 "' is of a different C++ type than you tried to fetch it as.");
2354 }
2355}
bool checkVar(const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
Check that the right kind of variable is being coupled in.
Definition Coupleable.C:234

◆ getVarHelper() [2/2]

template<typename T >
const T * Coupleable::getVarHelper ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Helper that that be used to retrieve a variable of arbitrary type T.

Definition at line 2359 of file Coupleable.h.

2360{
2361 return const_cast<Coupleable *>(this)->getVarHelper<T>(var_name, comp);
2362}

◆ getVarsHelper()

template<typename T >
std::vector< const T * > Coupleable::getVarsHelper ( const std::string &  var_name) const
protected

Helper that can be used to retrieve all the component variables of a variable of arbitrary type T.

Parameters
var_nameof the variable, can be a regular, vector or array variable

Definition at line 2366 of file Coupleable.h.

2367{
2368 const auto components = coupledComponents(var_name);
2369 std::vector<const T *> vars(components);
2370 for (const auto i : make_range(components))
2371 vars[i] = getVarHelper<T>(var_name, i);
2372 return vars;
2373}
const T * getVarHelper(const std::string &var_name, unsigned int comp) const
Helper that that be used to retrieve a variable of arbitrary type T.

◆ getVectorVar() [1/2]

VectorMooseVariable * Coupleable::getVectorVar ( const std::string &  var_name,
unsigned int  comp 
)
protected

Extract pointer to a coupled vector variable.

Parameters
var_nameName of parameter desired
compComponent number of multiple coupled variables
Returns
Pointer to the desired variable

Definition at line 325 of file Coupleable.C.

326{
327 auto * const var =
328 const_cast<VectorMooseVariable *>(getVarHelper<VectorMooseVariable>(var_name, comp));
329
330 if (_c_nodal && var && var->feType().family != LAGRANGE_VEC)
331 mooseError(_c_name, ": Only LAGRANGE_VEC vector variables are defined at nodes");
332
333 return var;
334}

Referenced by adCoupledCurl(), adCoupledDiv(), adCoupledVectorDot(), adCoupledVectorGradient(), adCoupledVectorValue(), coupledCurl(), coupledCurlOld(), coupledCurlOlder(), coupledDiv(), coupledDivOld(), coupledDivOlder(), coupledVectorDot(), coupledVectorDotDot(), coupledVectorDotDotDu(), coupledVectorDotDotOld(), coupledVectorDotDu(), coupledVectorDotOld(), coupledVectorGradient(), coupledVectorGradientOld(), coupledVectorGradientOlder(), NeighborCoupleable::coupledVectorNeighborGradient(), NeighborCoupleable::coupledVectorNeighborGradientOld(), NeighborCoupleable::coupledVectorNeighborGradientOlder(), coupledVectorValue(), coupledVectorValueOld(), and coupledVectorValueOlder().

◆ getVectorVar() [2/2]

const VectorMooseVariable * Coupleable::getVectorVar ( const std::string &  var_name,
unsigned int  comp 
) const
protected

Extract pointer to a coupled vector variable.

Parameters
var_nameName of parameter desired
compComponent number of multiple coupled variables
Returns
Pointer to the desired variable

Definition at line 349 of file Coupleable.C.

350{
351 const auto * const var = getVarHelper<VectorMooseVariable>(var_name, comp);
352
353 if (_c_nodal && var && var->feType().family != LAGRANGE_VEC)
354 mooseError(_c_name, ": Only LAGRANGE_VEC vector variables are defined at nodes");
355
356 return var;
357}

◆ getWritableCoupledVariables()

auto & Coupleable::getWritableCoupledVariables ( ) const
inline

returns a reference to the set of writable coupled variables

Definition at line 137 of file Coupleable.h.

Referenced by hasWritableCoupledVariables().

◆ hasWritableCoupledVariables()

bool Coupleable::hasWritableCoupledVariables ( ) const
inline

Checks whether the object has any writable coupled variables.

Definition at line 142 of file Coupleable.h.

142{ return !getWritableCoupledVariables().empty(); }
auto & getWritableCoupledVariables() const
returns a reference to the set of writable coupled variables
Definition Coupleable.h:137

Referenced by FEProblemBase::computeUserObjectsInternal().

◆ isCoupled()

bool Coupleable::isCoupled ( const std::string &  var_name,
unsigned int  i = 0 
) const
protectedvirtual

Returns true if a variables has been coupled as name.

Parameters
var_nameThe name the kernel wants to refer to the variable as.
iBy default 0, in general the index to test in a vector of MooseVariable pointers.
Returns
True if a coupled variable has the supplied name

Definition at line 154 of file Coupleable.C.

155{
156 const auto & var_name = _c_parameters.checkForRename(var_name_in);
157
158 auto it = _coupled_vars.find(var_name);
159 if (it != _coupled_vars.end())
160 return (i < it->second.size());
161 else
162 {
163 // Make sure the user originally requested this value in the InputParameter syntax
164 if (!_c_parameters.hasCoupledVar(var_name))
166 ": The coupled variable \"",
167 var_name,
168 "\" was never added to this object's "
169 "InputParameters, please double-check your "
170 "spelling");
171
172 return false;
173 }
174}
bool hasCoupledVar(const std::string &coupling_name) const
Return whether or not the coupled variable exists.

Referenced by adCoupledNodalValue(), checkVar(), coupledComponents(), and MatReactionTempl< is_ad >::MatReactionTempl().

◆ isCoupledConstant()

bool Coupleable::isCoupledConstant ( const std::string &  var_name) const
protectedvirtual

Returns true if a variable passed as a coupled value is really a constant.

Parameters
var_nameThe name the kernel wants to refer to the variable as.
Returns
True if the variable is actually a constant

Definition at line 177 of file Coupleable.C.

178{
179 return _c_parameters.hasDefaultCoupledValue(var_name);
180}

Referenced by coupledName().

◆ kokkosADCoupledDofValue()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDofValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledDofValueOld()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDofValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledDofValueOlder()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDofValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledDofValues()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDofValues ( const std::string &  var_name) const

◆ kokkosADCoupledDofValuesOld()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDofValuesOld ( const std::string &  var_name) const

◆ kokkosADCoupledDofValuesOlder()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDofValuesOlder ( const std::string &  var_name) const

◆ kokkosADCoupledDot()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledDots()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledDots ( const std::string &  var_name) const

◆ kokkosADCoupledGradient()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledGradientOld()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledGradientOlder()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledGradients()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledGradients ( const std::string &  var_name) const

◆ kokkosADCoupledGradientsOld()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledGradientsOld ( const std::string &  var_name) const

◆ kokkosADCoupledGradientsOlder()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledGradientsOlder ( const std::string &  var_name) const

◆ kokkosADCoupledNodalDot()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledNodalDots()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalDots ( const std::string &  var_name) const

◆ kokkosADCoupledNodalValue()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledNodalValueOld()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledNodalValueOlder()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledNodalValues()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalValues ( const std::string &  var_name) const

◆ kokkosADCoupledNodalValuesOld()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalValuesOld ( const std::string &  var_name) const

◆ kokkosADCoupledNodalValuesOlder()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledNodalValuesOlder ( const std::string &  var_name) const

◆ kokkosADCoupledValue()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledValueOld()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledValueOlder()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledValues()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledValues ( const std::string &  var_name) const

◆ kokkosADCoupledValuesOld()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledValuesOld ( const std::string &  var_name) const

◆ kokkosADCoupledValuesOlder()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledValuesOlder ( const std::string &  var_name) const

◆ kokkosADCoupledVectorTagDofValue()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagDofValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagDofValueByName()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagDofValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagDofValues()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagDofValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosADCoupledVectorTagDofValuesByName()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagDofValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosADCoupledVectorTagGradient()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledVectorTagGradient ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagGradientByName()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledVectorTagGradientByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagGradients()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledVectorTagGradients ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosADCoupledVectorTagGradientsByName()

Moose::Kokkos::ADVariableGradient Coupleable::kokkosADCoupledVectorTagGradientsByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosADCoupledVectorTagNodalValue()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagNodalValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagNodalValueByName()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagNodalValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagNodalValues()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagNodalValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosADCoupledVectorTagNodalValuesByName()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagNodalValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosADCoupledVectorTagValue()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagValueByName()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosADCoupledVectorTagValues()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosADCoupledVectorTagValuesByName()

Moose::Kokkos::ADVariableValue Coupleable::kokkosADCoupledVectorTagValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledDofValue()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDofValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledDofValueOld()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDofValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledDofValueOlder()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDofValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledDofValues()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDofValues ( const std::string &  var_name) const

◆ kokkosCoupledDofValuesOld()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDofValuesOld ( const std::string &  var_name) const

◆ kokkosCoupledDofValuesOlder()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDofValuesOlder ( const std::string &  var_name) const

◆ kokkosCoupledDot()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledDotDu()

Moose::Kokkos::Scalar< const Real > Coupleable::kokkosCoupledDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledDots()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledDots ( const std::string &  var_name) const

◆ kokkosCoupledGradient()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledGradientOld()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledGradientOlder()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledGradients()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledGradients ( const std::string &  var_name) const

◆ kokkosCoupledGradientsOld()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledGradientsOld ( const std::string &  var_name) const

◆ kokkosCoupledGradientsOlder()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledGradientsOlder ( const std::string &  var_name) const

◆ kokkosCoupledNodalDot()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledNodalDots()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalDots ( const std::string &  var_name) const

◆ kokkosCoupledNodalValue()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledNodalValueOld()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledNodalValueOlder()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledNodalValues()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalValues ( const std::string &  var_name) const

◆ kokkosCoupledNodalValuesOld()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalValuesOld ( const std::string &  var_name) const

◆ kokkosCoupledNodalValuesOlder()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledNodalValuesOlder ( const std::string &  var_name) const

◆ kokkosCoupledValue()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledValueOld()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledValueOlder()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledValues()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledValues ( const std::string &  var_name) const

◆ kokkosCoupledValuesOld()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledValuesOld ( const std::string &  var_name) const

◆ kokkosCoupledValuesOlder()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledValuesOlder ( const std::string &  var_name) const

◆ kokkosCoupledVectorDofValue()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDofValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorDofValueOld()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDofValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorDofValueOlder()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDofValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorDofValues()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDofValues ( const std::string &  var_name) const

◆ kokkosCoupledVectorDofValuesOld()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDofValuesOld ( const std::string &  var_name) const

◆ kokkosCoupledVectorDofValuesOlder()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDofValuesOlder ( const std::string &  var_name) const

◆ kokkosCoupledVectorDot()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorDots()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorDots ( const std::string &  var_name) const

◆ kokkosCoupledVectorGradient()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorGradientOld()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorGradientOlder()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorGradients()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorGradients ( const std::string &  var_name) const

◆ kokkosCoupledVectorGradientsOld()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorGradientsOld ( const std::string &  var_name) const

◆ kokkosCoupledVectorGradientsOlder()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorGradientsOlder ( const std::string &  var_name) const

◆ kokkosCoupledVectorNodalDot()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorNodalDots()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalDots ( const std::string &  var_name) const

◆ kokkosCoupledVectorNodalValue()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorNodalValueOld()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorNodalValueOlder()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorNodalValues()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalValues ( const std::string &  var_name) const

◆ kokkosCoupledVectorNodalValuesOld()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalValuesOld ( const std::string &  var_name) const

◆ kokkosCoupledVectorNodalValuesOlder()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorNodalValuesOlder ( const std::string &  var_name) const

◆ kokkosCoupledVectorTagDofValue()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagDofValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagDofValueByName()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagDofValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagDofValues()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagDofValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagDofValuesByName()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagDofValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagGradient()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledVectorTagGradient ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagGradientByName()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledVectorTagGradientByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagGradients()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledVectorTagGradients ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagGradientsByName()

Moose::Kokkos::VariableGradient Coupleable::kokkosCoupledVectorTagGradientsByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagNodalValue()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagNodalValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagNodalValueByName()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagNodalValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagNodalValues()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagNodalValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagNodalValuesByName()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagNodalValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagValue()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagValueByName()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagValues()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagValuesByName()

Moose::Kokkos::VariableValue Coupleable::kokkosCoupledVectorTagValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagVariable()

Moose::Kokkos::Variable Coupleable::kokkosCoupledVectorTagVariable ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp 
) const
private

◆ kokkosCoupledVectorTagVariables()

Moose::Kokkos::Variable Coupleable::kokkosCoupledVectorTagVariables ( const std::string &  var_name,
const std::string &  tag_name 
) const
private

◆ kokkosCoupledVectorTagVectorDofValue()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorDofValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorDofValueByName()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorDofValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorDofValues()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorDofValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagVectorDofValuesByName()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorDofValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagVectorGradient()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorTagVectorGradient ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorGradientByName()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorTagVectorGradientByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorGradients()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorTagVectorGradients ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagVectorGradientsByName()

Moose::Kokkos::VectorVariableGradient Coupleable::kokkosCoupledVectorTagVectorGradientsByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagVectorNodalValue()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorNodalValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorNodalValueByName()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorNodalValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorNodalValues()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorNodalValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagVectorNodalValuesByName()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorNodalValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagVectorValue()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorValue ( const std::string &  var_name,
const std::string &  tag_param_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorValueByName()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorValueByName ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorTagVectorValues()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorValues ( const std::string &  var_name,
const std::string &  tag_param_name 
) const

◆ kokkosCoupledVectorTagVectorValuesByName()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorTagVectorValuesByName ( const std::string &  var_name,
const std::string &  tag_name 
) const

◆ kokkosCoupledVectorTagVectorVariable()

Moose::Kokkos::Variable Coupleable::kokkosCoupledVectorTagVectorVariable ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp 
) const
private

◆ kokkosCoupledVectorTagVectorVariables()

Moose::Kokkos::Variable Coupleable::kokkosCoupledVectorTagVectorVariables ( const std::string &  var_name,
const std::string &  tag_name 
) const
private

◆ kokkosCoupledVectorValue()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorValueOld()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorValueOlder()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const

◆ kokkosCoupledVectorValues()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorValues ( const std::string &  var_name) const

◆ kokkosCoupledVectorValuesOld()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorValuesOld ( const std::string &  var_name) const

◆ kokkosCoupledVectorValuesOlder()

Moose::Kokkos::VectorVariableValue Coupleable::kokkosCoupledVectorValuesOlder ( const std::string &  var_name) const

◆ kokkosZeroGradient()

Moose::Kokkos::VariableGradient Coupleable::kokkosZeroGradient ( ) const

◆ kokkosZeroNodalValue()

Moose::Kokkos::VariableValue Coupleable::kokkosZeroNodalValue ( ) const

◆ kokkosZeroValue()

Moose::Kokkos::VariableValue Coupleable::kokkosZeroValue ( ) const

◆ kokkosZeroVariable()

Moose::Kokkos::Variable Coupleable::kokkosZeroVariable ( ) const
private

◆ requestStates()

template<typename T >
void Coupleable::requestStates ( const std::string &  var_name,
const TagName &  tag_name,
const unsigned int  comp 
)
private

Method that may request additional solution states from the variable's system depending on the value of tag_name.

E.g. if the tag name corresponds to old or older variable solution values, then we must request more states

Definition at line 579 of file Coupleable.C.

582{
583 auto var =
584 const_cast<MooseVariableField<T> *>(getVarHelper<MooseVariableField<T>>(var_name, comp));
585 if (!var)
586 mooseError(var_name, ": invalid variable name for tag coupling");
587
588 auto & var_sys = var->sys();
589 if (tag_name == Moose::OLD_SOLUTION_TAG)
590 var_sys.needSolutionState(1);
591 else if (tag_name == Moose::OLDER_SOLUTION_TAG)
592 var_sys.needSolutionState(2);
593}
Class for stuff related to variables.
const TagName OLDER_SOLUTION_TAG
Definition MooseTypes.C:27
const TagName OLD_SOLUTION_TAG
Definition MooseTypes.C:26

◆ usesFaceCoupledValues()

virtual bool Coupleable::usesFaceCoupledValues ( ) const
inlineprotectedvirtual

Whether this object evaluates coupled variables on element faces, so that it must request coupled AD gradients through the face accessors.

Base classes of face objects override this.

Reimplemented in AuxKernelBase, IntegratedBCBase, MortarConstraintBase, DGKernelBase, InternalSideIndicatorBase, InterfaceKernelBase, InterfaceMaterial, Material, InterfaceUserObjectBase, InternalSideUserObject, MortarUserObject, and SideUserObject.

Definition at line 1702 of file Coupleable.h.

1702{ return false; }

Referenced by adCoupledArrayGradient(), adCoupledGradient(), adCoupledGradientDot(), and adCoupledVectorGradient().

◆ validateExecutionerType()

void Coupleable::validateExecutionerType ( const std::string &  name,
const std::string &  fn_name 
) const
protected

Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in.

Parameters
namethe name of the variable
fn_nameThe name of the function that called this method - used in the error message

Definition at line 2253 of file Coupleable.C.

2254{
2257 ": Calling \"",
2258 fn_name,
2259 "\" on variable \"",
2260 name,
2261 "\" when using a \"Steady\" executioner is not allowed. This value is available "
2262 "only in transient simulations.");
2263}
virtual bool isTransient() const override

Referenced by checkFuncType(), NeighborCoupleable::coupledArrayNeighborGradientOld(), NeighborCoupleable::coupledArrayNeighborGradientOlder(), NeighborCoupleable::coupledNeighborDofValuesOld(), NeighborCoupleable::coupledNeighborDofValuesOlder(), NeighborCoupleable::coupledNeighborGradientOld(), NeighborCoupleable::coupledNeighborGradientOlder(), NeighborCoupleable::coupledNeighborValueOld(), NeighborCoupleable::coupledNeighborValueOlder(), NeighborCoupleable::coupledVectorNeighborGradientOld(), and NeighborCoupleable::coupledVectorNeighborGradientOlder().

◆ vectorTagDofValueHelper() [1/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagDofValueHelper ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const
private

Generic helper method to get vector tag degree of freedom values based on tag name.

Definition at line 775 of file Coupleable.C.

778{
779 if (!_c_parameters.isParamValid(tag_param_name))
780 mooseError("Tag name parameter '", tag_param_name, "' is invalid");
781
782 const TagName tag_name = MooseUtils::toUpper(_c_parameters.get<TagName>(tag_param_name));
783
784 const bool older_state_tag = _older_state_tags.count(tag_name);
785 if (older_state_tag)
786 // We may need to add solution states and create vector tags
787 const_cast<Coupleable *>(this)->requestStates<T>(var_name, tag_name, comp);
788
789 if (!_c_fe_problem.vectorTagExists(tag_name))
790 mooseError("Tagged vector with tag name '", tag_name, "' does not exist");
791
792 TagID tag = _c_fe_problem.getVectorTagID(tag_name);
793
794 return vectorTagDofValueHelper<T>(var_name, tag, comp);
795}
const std::set< std::string > _older_state_tags
vector tag names for which we need to request older solution states from the system
std::string toUpper(std::string name)
Convert supplied string to upper case.

◆ vectorTagDofValueHelper() [2/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagDofValueHelper ( const std::string &  var_name,
TagID  tag,
unsigned int  comp = 0 
) const
private

Generic helper method to get vector tag degree of freedom values based on tag ID.

Definition at line 759 of file Coupleable.C.

762{
763 const auto * var = getVarHelper<MooseVariableField<T>>(var_name, comp);
764 if (!var)
765 mooseError(var_name, ": invalid variable name for coupledVectorTagDofValue");
767
768 const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
769
770 return var->vectorTagDofValue(tag);
771}

◆ vectorTagValueHelper() [1/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagValueHelper ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
private

Generic helper method to get vector tag values based on tag name.

Definition at line 597 of file Coupleable.C.

600{
601 if (!_c_parameters.isParamValid(tag_param_name))
602 mooseError("Tag name parameter '", tag_param_name, "' is invalid");
603
604 const TagName tag_name = MooseUtils::toUpper(_c_parameters.get<TagName>(tag_param_name));
605
606 const bool older_state_tag = _older_state_tags.count(tag_name);
607 if (older_state_tag)
608 // We may need to add solution states and create vector tags
609 const_cast<Coupleable *>(this)->requestStates<T>(var_names, tag_name, index);
610
611 if (!_c_fe_problem.vectorTagExists(tag_name))
612 mooseError("Tagged vector with tag name '", tag_name, "' does not exist");
613
614 TagID tag = _c_fe_problem.getVectorTagID(tag_name);
615 return vectorTagValueHelper<T>(var_names, tag, index);
616}

◆ vectorTagValueHelper() [2/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagValueHelper ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
private

Generic helper method to get vector tag values based on tag ID.

Definition at line 553 of file Coupleable.C.

556{
557 const auto * const var = getVarHelper<MooseVariableField<T>>(var_names, index);
558 if (!var)
559 mooseError(var_names, ": invalid variable name for coupledVectorTagValue");
561
563 mooseError("Attempting to couple to vector tag with ID ",
564 tag,
565 "in ",
566 _c_name,
567 ", but a vector tag with that ID does not exist");
568
569 const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
570
571 if (_c_nodal)
572 return var->nodalVectorTagValue(tag);
573 else
574 return var->vectorTagValue(tag);
575}

◆ writableCoupledValue()

VariableValue & Coupleable::writableCoupledValue ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtual

Returns a writable reference to a coupled variable for writing to multiple AuxVariables from a single AuxKernel or a UserObject.

Only one object can obtain a writable reference in a simulation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableValue for the coupled variable
See also
Kernel::value

Definition at line 971 of file Coupleable.C.

972{
973 mooseDeprecated("Coupleable::writableCoupledValue is deprecated, please use "
974 "Coupleable::writableVariable instead. ");
975
976 // check if the variable exists
977 auto * const var = getVar(var_name, comp);
978 if (!var)
980 "Unable to create a writable reference for '", var_name, "', is it a constant expression?");
981
982 // is the requested variable an AuxiliaryVariable?
983 if (!_c_fe_problem.getAuxiliarySystem().hasVariable(var->name()))
985 "'", var->name(), "' must be an auxiliary variable in Coupleable::writableCoupledValue");
986
987 // check that the variable type (elemental/nodal) is compatible with the object type
988 const auto * aux = dynamic_cast<const AuxKernel *>(this);
989
990 if (!aux)
991 mooseError("writableCoupledValue() can only be called from AuxKernels, but '",
992 _obj->name(),
993 "' is not an AuxKernel.");
994
995 if (!aux->isNodal() && var->isNodal())
996 mooseError("The elemental AuxKernel '",
997 _obj->name(),
998 "' cannot obtain a writable reference to the nodal variable '",
999 var->name(),
1000 "'.");
1001
1002 // make sure only one object can access a variable
1003 checkWritableVar(var);
1004
1005 return const_cast<VariableValue &>(coupledValue(var_name, comp));
1006}
OutputTools< Real >::VariableValue VariableValue
Definition MooseTypes.h:348
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain.
AuxiliarySystem & getAuxiliarySystem()
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition SystemBase.C:851

◆ writableVariable()

MooseWritableVariable & Coupleable::writableVariable ( const std::string &  var_name,
unsigned int  comp = 0 
)
protected

Returns a writable MooseVariable object for a nodal or elemental variable.

Use var.setNodalValue(val) in both cases (!) to set the solution DOF values. Only one object can obtain a writable reference in a simulation. Note that the written values will not ba available in the same system loop! E.g. values written using this API by a nodal AuxKernel will not be updated for other nodal AuxKernels during the same iteration over all nodes.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a MooseWritableVariable for the coupled variable
See also
Kernel::value

Definition at line 934 of file Coupleable.C.

935{
936 auto * var = getVarHelper<MooseWritableVariable>(var_name, comp);
937
938 const auto * aux = dynamic_cast<const AuxKernel *>(this);
939 const auto * euo = dynamic_cast<const ElementUserObject *>(this);
940 const auto * nuo = dynamic_cast<const NodalUserObject *>(this);
941 const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
942 const auto * nec = dynamic_cast<const NodeElemConstraintBase *>(this);
943 const auto * mat = dynamic_cast<const Material *>(this);
944
945 if (!aux && !euo && !nuo && !nfc && !nec && !mat)
946 mooseError("writableVariable() can only be called from AuxKernels, ElementUserObjects, "
947 "NodalUserObjects, NodeFaceConstraints, NodeElemConstraints or Materials. '",
948 _obj->name(),
949 "' is none of those.");
950
951 if (aux && !aux->isNodal() && var->isNodal())
952 mooseError("The elemental AuxKernel '",
953 _obj->name(),
954 "' cannot obtain a writable reference to the nodal variable '",
955 var->name(),
956 "'.");
957 if (euo && var->isNodal())
958 mooseError("The ElementUserObject '",
959 _obj->name(),
960 "' cannot obtain a writable reference to the nodal variable '",
961 var->name(),
962 "'.");
963
964 // make sure only one object can access a variable
965 checkWritableVar(var);
966
967 return *var;
968}
A user object that runs over all the nodes and does an aggregation step to compute a single value.
A NodeElemConstraintBase is used when you need to create constraints between a secondary node and a p...

Member Data Documentation

◆ _ad_default_array_gradient

std::unordered_map<std::string, std::unique_ptr<ADArrayVariableGradient> > Coupleable::_ad_default_array_gradient
mutableprotected

Will hold the zero default gradient for optional array coupled variables for automatic differentiation.

The number of array components depends on the variable.

Definition at line 1547 of file Coupleable.h.

Referenced by getADDefaultArrayGradient().

◆ _ad_default_array_value

std::unordered_map<std::string, std::unique_ptr<ADArrayVariableValue> > Coupleable::_ad_default_array_value
mutableprotected

Will hold the default value for optional array coupled variables for automatic differentiation.

Definition at line 1542 of file Coupleable.h.

Referenced by getADDefaultArrayValue().

◆ _ad_default_array_value_zero

std::unordered_map<std::string, std::unique_ptr<ADArrayVariableValue> > Coupleable::_ad_default_array_value_zero
mutableprotected

Will hold the zero default time derivative for optional array coupled variables for automatic differentiation.

The number of array components depends on the variable.

Definition at line 1552 of file Coupleable.h.

Referenced by getADDefaultArrayValueZero().

◆ _ad_default_curl

MooseArray<ADRealVectorValue> Coupleable::_ad_default_curl
mutableprotected

This will always be zero because the default values for optionally coupled vector variables is always constant.

Definition at line 1580 of file Coupleable.h.

Referenced by getADDefaultCurl().

◆ _ad_default_div

MooseArray<ADReal> Coupleable::_ad_default_div
mutableprotected

Will hold the default value for optional vector coupled variable divergences for automatic differentiation.

Definition at line 1584 of file Coupleable.h.

Referenced by getADDefaultDiv().

◆ _ad_default_gradient

MooseArray<ADRealVectorValue> Coupleable::_ad_default_gradient
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1568 of file Coupleable.h.

Referenced by getADDefaultGradient().

◆ _ad_default_second

MooseArray<ADRealTensorValue> Coupleable::_ad_default_second
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1577 of file Coupleable.h.

Referenced by getADDefaultSecond().

◆ _ad_default_value

std::unordered_map<std::string, std::unique_ptr<MooseArray<ADReal> > > Coupleable::_ad_default_value
mutableprotected

Will hold the default value for optional coupled variables for automatic differentiation.

Definition at line 1531 of file Coupleable.h.

Referenced by getADDefaultValue().

◆ _ad_default_vector_gradient

MooseArray<ADRealTensorValue> Coupleable::_ad_default_vector_gradient
mutableprotected

This will always be zero because the default values for optionally coupled vector variables is always constant.

Definition at line 1571 of file Coupleable.h.

Referenced by getADDefaultVectorGradient().

◆ _ad_default_vector_value

std::unordered_map<std::string, std::unique_ptr<MooseArray<ADRealVectorValue> > > Coupleable::_ad_default_vector_value
mutableprotected

Will hold the default value for optional vector coupled variables for automatic differentiation.

Definition at line 1556 of file Coupleable.h.

Referenced by getADDefaultVectorValue().

◆ _ad_grad_zero

const MooseArray<ADRealVectorValue>& Coupleable::_ad_grad_zero
protected

Definition at line 1593 of file Coupleable.h.

Referenced by adZeroGradient(), and genericZeroGradient().

◆ _ad_second_zero

const MooseArray<ADRealTensorValue>& Coupleable::_ad_second_zero
protected

Definition at line 1600 of file Coupleable.h.

Referenced by adZeroSecond(), and genericZeroSecond().

◆ _ad_zero

const MooseArray<ADReal>& Coupleable::_ad_zero
protected

Definition at line 1589 of file Coupleable.h.

Referenced by adZeroValue(), and genericZeroValue().

◆ _c_allow_element_to_nodal_coupling

const bool Coupleable::_c_allow_element_to_nodal_coupling
protected

Definition at line 1521 of file Coupleable.h.

Referenced by checkVar().

◆ _c_coupled_scalar_vars

std::unordered_map<std::string, std::vector<MooseVariableScalar *> > Coupleable::_c_coupled_scalar_vars
private

Scalar variables coupled into this object (for error checking)

Definition at line 1950 of file Coupleable.h.

Referenced by checkVar(), and Coupleable().

◆ _c_fe_problem

FEProblemBase& Coupleable::_c_fe_problem
protected

◆ _c_is_implicit

bool Coupleable::_c_is_implicit
protected

True if implicit value is required.

Definition at line 1518 of file Coupleable.h.

Referenced by adCoupledArrayGradient(), adCoupledArrayValue(), adCoupledCurl(), adCoupledDiv(), adCoupledDofValues(), adCoupledGradient(), adCoupledGradientDot(), adCoupledLowerValue(), NeighborCoupleable::adCoupledNeighborGradient(), NeighborCoupleable::adCoupledNeighborValue(), NeighborCoupleable::adCoupledNeighborValueDot(), adCoupledNodalValue(), adCoupledSecond(), adCoupledValue(), adCoupledVectorGradient(), NeighborCoupleable::adCoupledVectorNeighborValue(), adCoupledVectorValue(), checkFuncType(), coupledArrayDofValues(), coupledArrayGradient(), coupledArrayGradientOld(), NeighborCoupleable::coupledArrayNeighborGradient(), NeighborCoupleable::coupledArrayNeighborGradientOld(), NeighborCoupleable::coupledArrayNeighborGradientOlder(), NeighborCoupleable::coupledArrayNeighborValue(), coupledArrayValue(), CoupleableMooseVariableDependencyIntermediateInterface::coupledArrayValueByName(), coupledArrayValueOld(), coupledCurl(), coupledCurlOld(), coupledDiv(), coupledDivOld(), coupledDofValues(), coupledDofValuesOld(), coupledGradient(), coupledGradientOld(), NeighborCoupleable::coupledNeighborDofValues(), NeighborCoupleable::coupledNeighborDofValuesOld(), NeighborCoupleable::coupledNeighborDofValuesOlder(), NeighborCoupleable::coupledNeighborGradient(), NeighborCoupleable::coupledNeighborGradientOld(), NeighborCoupleable::coupledNeighborGradientOlder(), NeighborCoupleable::coupledNeighborSecond(), NeighborCoupleable::coupledNeighborValue(), NeighborCoupleable::coupledNeighborValueOld(), NeighborCoupleable::coupledNeighborValueOlder(), coupledNodalValue(), coupledNodalValueOld(), coupledSecond(), coupledSecondOld(), coupledValue(), CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName(), coupledValueLower(), coupledValueOld(), coupledVectorGradient(), coupledVectorGradientOld(), NeighborCoupleable::coupledVectorNeighborGradient(), NeighborCoupleable::coupledVectorNeighborGradientOld(), NeighborCoupleable::coupledVectorNeighborGradientOlder(), coupledVectorValue(), and coupledVectorValueOld().

◆ _c_name

const std::string& Coupleable::_c_name
protected

◆ _c_nodal

bool Coupleable::_c_nodal
protected

◆ _c_parameters

const InputParameters& Coupleable::_c_parameters
protected

◆ _c_sys

const SystemBase* const Coupleable::_c_sys
protected

Pointer to the system object if the moose object this is an interface for has one.

Definition at line 1491 of file Coupleable.h.

Referenced by coupled().

◆ _c_tid

THREAD_ID Coupleable::_c_tid
protected

◆ _c_type

const std::string& Coupleable::_c_type
protected

The type of the object this interface is part of.

Definition at line 1485 of file Coupleable.h.

◆ _coupleable_max_qps

unsigned int Coupleable::_coupleable_max_qps
private

◆ _coupleable_neighbor

bool Coupleable::_coupleable_neighbor
protected

Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor values.

Definition at line 1827 of file Coupleable.h.

Referenced by adCoupledArrayDot(), adCoupledArrayDotDot(), adCoupledArrayGradient(), adCoupledArrayValue(), adCoupledCurl(), adCoupledDiv(), adCoupledDofValues(), adCoupledDot(), adCoupledDotDot(), adCoupledGradient(), adCoupledGradientDot(), adCoupledNodalValue(), adCoupledSecond(), adCoupledValue(), adCoupledVectorDot(), adCoupledVectorGradient(), adCoupledVectorValue(), coupledArrayDofValues(), coupledArrayDot(), coupledArrayDotDot(), coupledArrayDotDotOld(), coupledArrayDotDu(), coupledArrayDotOld(), coupledArrayGradient(), coupledArrayGradientDot(), coupledArrayGradientOld(), coupledArrayGradientOlder(), coupledArrayValue(), CoupleableMooseVariableDependencyIntermediateInterface::coupledArrayValueByName(), coupledArrayValueOld(), coupledArrayValueOlder(), coupledCurl(), coupledCurlOld(), coupledCurlOlder(), coupledDiv(), coupledDivOld(), coupledDivOlder(), coupledDofValues(), coupledDofValuesOld(), coupledDofValuesOlder(), coupledDot(), coupledDotDot(), coupledDotDotDu(), coupledDotDotOld(), coupledDotDu(), coupledDotOld(), coupledGradient(), coupledGradientDot(), coupledGradientDotDot(), coupledGradientOld(), coupledGradientOlder(), coupledGradientPreviousNL(), coupledNodalDot(), coupledNodalDotDot(), coupledNodalDotDotOld(), coupledNodalDotOld(), coupledNodalValue(), coupledNodalValueOld(), coupledNodalValueOlder(), coupledNodalValuePreviousNL(), coupledSecond(), coupledSecondOld(), coupledSecondOlder(), coupledSecondPreviousNL(), coupledValue(), CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName(), coupledValueLower(), coupledValueOld(), coupledValueOlder(), coupledValuePreviousNL(), coupledVectorDot(), coupledVectorDotDot(), coupledVectorDotDotDu(), coupledVectorDotDotOld(), coupledVectorDotDu(), coupledVectorDotOld(), coupledVectorGradient(), coupledVectorGradientOld(), coupledVectorGradientOlder(), coupledVectorValue(), coupledVectorValueOld(), and coupledVectorValueOlder().

◆ _coupled_array_moose_vars

std::vector<ArrayMooseVariable *> Coupleable::_coupled_array_moose_vars
protected

◆ _coupled_fv_moose_vars

std::vector<MooseVariableField<Real> *> Coupleable::_coupled_fv_moose_vars
protected

Vector of all finite volume coupled variables.

Definition at line 1509 of file Coupleable.h.

Referenced by Coupleable(), ElementValueSampler::execute(), SideValueSampler::execute(), getVarHelper(), and SideValueSampler::SideValueSampler().

◆ _coupled_moose_vars

std::vector<MooseVariableFieldBase *> Coupleable::_coupled_moose_vars
protected

◆ _coupled_standard_moose_vars

std::vector<MooseVariable *> Coupleable::_coupled_standard_moose_vars
protected

◆ _coupled_vars

std::unordered_map<std::string, std::vector<MooseVariableFieldBase *> > Coupleable::_coupled_vars
protected

Coupled vars whose values we provide.

Definition at line 1494 of file Coupleable.h.

Referenced by checkVar(), Coupleable(), coupledComponents(), getCoupledVars(), getVarHelper(), and isCoupled().

◆ _coupled_vector_moose_vars

std::vector<VectorMooseVariable *> Coupleable::_coupled_vector_moose_vars
protected

Vector of vector coupled variables.

Definition at line 1503 of file Coupleable.h.

Referenced by Coupleable(), getCoupledVectorMooseVars(), and getVarHelper().

◆ _default_array_gradient

ArrayVariableGradient Coupleable::_default_array_gradient
protected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1630 of file Coupleable.h.

Referenced by coupledArrayGradient(), coupledArrayGradientDot(), coupledArrayGradientOld(), and coupledArrayGradientOlder().

◆ _default_array_value

std::unordered_map<std::string, std::unique_ptr<ArrayVariableValue> > Coupleable::_default_array_value
mutableprotected

Will hold the default value for optional array coupled variables.

Definition at line 1538 of file Coupleable.h.

Referenced by getDefaultArrayValue().

◆ _default_array_value_zero

ArrayVariableValue Coupleable::_default_array_value_zero
protected

This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info.

Definition at line 1627 of file Coupleable.h.

Referenced by coupledArrayDot(), coupledArrayDotDot(), coupledArrayDotDotOld(), and coupledArrayDotOld().

◆ _default_div

VectorVariableDivergence Coupleable::_default_div
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1621 of file Coupleable.h.

Referenced by coupledDiv(), coupledDivOld(), and coupledDivOlder().

◆ _default_gradient

VariableGradient Coupleable::_default_gradient
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1565 of file Coupleable.h.

Referenced by coupledGradient(), coupledGradientDot(), coupledGradientDotDot(), coupledGradientOld(), coupledGradientOlder(), and coupledGradientPreviousNL().

◆ _default_second

VariableSecond Coupleable::_default_second
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1574 of file Coupleable.h.

Referenced by coupledSecond(), coupledSecondOld(), coupledSecondOlder(), and coupledSecondPreviousNL().

◆ _default_value

std::unordered_map<std::string, std::vector<std::unique_ptr<VariableValue> > > Coupleable::_default_value
mutableprotected

Will hold the default value for optional coupled variables.

Definition at line 1528 of file Coupleable.h.

Referenced by getDefaultValue().

◆ _default_value_zero

VariableValue Coupleable::_default_value_zero
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info.

Definition at line 1562 of file Coupleable.h.

Referenced by coupledArrayDotDu(), coupledDot(), coupledDotDot(), coupledDotDotDu(), coupledDotDotOld(), coupledDotDu(), coupledDotOld(), coupledNodalDotDot(), coupledNodalDotDotOld(), coupledNodalDotOld(), coupledVectorDotDotDu(), and coupledVectorDotDu().

◆ _default_vector_curl

VectorVariableCurl Coupleable::_default_vector_curl
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1618 of file Coupleable.h.

Referenced by coupledCurl(), coupledCurlOld(), and coupledCurlOlder().

◆ _default_vector_gradient

VectorVariableGradient Coupleable::_default_vector_gradient
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1615 of file Coupleable.h.

Referenced by coupledVectorGradient(), coupledVectorGradientOld(), and coupledVectorGradientOlder().

◆ _default_vector_value

std::unordered_map<std::string, std::unique_ptr<VectorVariableValue> > Coupleable::_default_vector_value
mutableprotected

Will hold the default value for optional vector coupled variables.

Definition at line 1535 of file Coupleable.h.

Referenced by getDefaultVectorValue().

◆ _default_vector_value_zero

VectorVariableValue Coupleable::_default_vector_value_zero
mutableprotected

This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info.

Definition at line 1612 of file Coupleable.h.

Referenced by coupledVectorDot(), coupledVectorDotDot(), coupledVectorDotDotOld(), and coupledVectorDotOld().

◆ _fe_coupleable_matrix_tags

std::set<TagID> Coupleable::_fe_coupleable_matrix_tags
private

◆ _fe_coupleable_vector_tags

std::set<TagID> Coupleable::_fe_coupleable_vector_tags
private

◆ _grad_phi_zero

const VariablePhiGradient& Coupleable::_grad_phi_zero
protected

Zero gradient of trial function.

Definition at line 1596 of file Coupleable.h.

◆ _grad_zero

const VariableGradient& Coupleable::_grad_zero
protected

Zero gradient of a variable.

Definition at line 1592 of file Coupleable.h.

Referenced by genericZeroGradient().

◆ _is_fv

const bool Coupleable::_is_fv
private

Whether the MooseObject is a finite volume object.

Definition at line 1957 of file Coupleable.h.

Referenced by checkVar().

◆ _kokkos_default_value_zero

const Real Coupleable::_kokkos_default_value_zero = 0
private

kokkos-related variables and methods

Definition at line 1972 of file Coupleable.h.

◆ _new_to_deprecated_coupled_vars

const std::unordered_map<std::string, std::string>& Coupleable::_new_to_deprecated_coupled_vars
protected

map from new to deprecated variable names

Definition at line 1512 of file Coupleable.h.

Referenced by getVarHelper().

◆ _obj

const MooseObject* const Coupleable::_obj
private

◆ _older_state_tags

const std::set<std::string> Coupleable::_older_state_tags
private
Initial value:

vector tag names for which we need to request older solution states from the system

Definition at line 1962 of file Coupleable.h.

Referenced by vectorTagDofValueHelper(), and vectorTagValueHelper().

◆ _optional_var_index

std::unordered_map<std::string, std::vector<unsigned int> > Coupleable::_optional_var_index
private

Unique indices for optionally coupled vars that weren't provided.

Definition at line 1947 of file Coupleable.h.

Referenced by Coupleable(), and coupled().

◆ _phi_zero

const VariablePhiValue& Coupleable::_phi_zero
protected

Definition at line 1588 of file Coupleable.h.

◆ _second_phi_zero

const VariablePhiSecond& Coupleable::_second_phi_zero
protected

Zero second derivative of a test function.

Definition at line 1602 of file Coupleable.h.

◆ _second_zero

const VariableSecond& Coupleable::_second_zero
protected

Zero second derivative of a variable.

Definition at line 1599 of file Coupleable.h.

Referenced by genericZeroSecond().

◆ _vector_curl_zero

const VectorVariableCurl& Coupleable::_vector_curl_zero
protected

Zero value of the curl of a vector variable.

Definition at line 1606 of file Coupleable.h.

◆ _vector_zero

const VectorVariableValue& Coupleable::_vector_zero
protected

Zero value of a vector variable.

Definition at line 1604 of file Coupleable.h.

◆ _writable_coupled_variables

std::vector<std::set<MooseWritableVariable *> > Coupleable::_writable_coupled_variables
private

keep a set of allocated writable variable references to make sure only one object can obtain them per thread

Definition at line 1966 of file Coupleable.h.

Referenced by checkWritableVar(), and getWritableCoupledVariables().

◆ _zero

const VariableValue& Coupleable::_zero
protected

Zero value of a variable.

Definition at line 1587 of file Coupleable.h.

Referenced by genericZeroValue().


The documentation for this class was generated from the following files: