https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CoupleableMooseVariableDependencyIntermediateInterface Class Reference

Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with the MooseVariableDependencyInterface. More...

#include <CoupleableMooseVariableDependencyIntermediateInterface.h>

Inheritance diagram for CoupleableMooseVariableDependencyIntermediateInterface:
[legend]

Public Member Functions

 CoupleableMooseVariableDependencyIntermediateInterface (const MooseObject *moose_object, bool nodal, bool is_fv=false)
 
virtual const VariableValuecoupledValueByName (const std::string &var_name)
 Returns value of a coupled variable give the variable name. More...
 
virtual const ArrayVariableValuecoupledArrayValueByName (const std::string &var_name)
 Returns value of a coupled array variable give the variable name. More...
 
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > & getCoupledVars () const
 Get the list of coupled variables. More...
 
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars () const
 Get the list of all coupled variables. More...
 
const std::vector< MooseVariable * > & getCoupledStandardMooseVars () const
 Get the list of standard coupled variables. More...
 
const std::vector< VectorMooseVariable * > & getCoupledVectorMooseVars () const
 Get the list of vector coupled variables. More...
 
const std::vector< ArrayMooseVariable * > & getCoupledArrayMooseVars () const
 Get the list of array coupled variables. More...
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
const std::set< TagID > & getFEVariableCoupleableVectorTags () const
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::set< TagID > & getFEVariableCoupleableMatrixTags () const
 
auto & getWritableCoupledVariables () const
 returns a reference to the set of writable coupled variables More...
 
bool hasWritableCoupledVariables () const
 Checks whether the object has any writable coupled variables. More...
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default value for Automatic Differentiation for an uncoupled variable. More...
 
const ADVectorVariableValuegetADDefaultVectorValue (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. More...
 
const ADVariableGradientgetADDefaultGradient () const
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled variable. More...
 
const ADVectorVariableGradientgetADDefaultVectorGradient () const
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled vector variable. More...
 
const ADVariableSecondgetADDefaultSecond () const
 Helper method to return (and insert if necessary) the default second derivatives for Automatic Differentiation for an uncoupled variable. More...
 
const ADVectorVariableCurlgetADDefaultCurl () const
 Helper method to return (and insert if necessary) the default curl value for Automatic Differentiation for an uncoupled variable. More...
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 Get the list of coupled scalar variables. More...
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const std::set< MooseVariableFieldBase * > & getMooseVariableDependencies () const
 Retrieve the set of MooseVariableFieldBase that this object depends on. More...
 
template<typename DofObjectType >
std::set< MooseVariableFieldBase * > checkAllVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase *> &vars_to_omit={})
 Check whether all of the variable dependencies have degree of freedom indices on the supplied degree of freedom object. More...
 
template<typename DofObjectType >
std::set< MooseVariableFieldBase * > checkVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase *> &vars_to_check)
 Check whether all of the supplied variables have degree of freedom indices on the supplied degree of freedom object. More...
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends on. More...
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase *> &vars)
 

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. More...
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0) const
 Returns true if a variables has been coupled as name. More...
 
virtual bool isCoupledConstant (const std::string &var_name) const
 Returns true if a variable passed as a coupled value is really a constant. More...
 
unsigned int coupledComponents (const std::string &var_name) const
 Number of coupled components. More...
 
VariableName coupledName (const std::string &var_name, unsigned int comp=0) const
 Names of the variable in the Coupleable interface. More...
 
std::vector< VariableName > coupledNames (const std::string &var_name) const
 Names of the variables in the Coupleable interface. More...
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0) const
 Returns the index for a coupled variable by name. More...
 
std::vector< unsigned intcoupledIndices (const std::string &var_name) const
 Returns the indices for a coupled variable's components. More...
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable. More...
 
std::vector< const VariableValue * > coupledValues (const std::string &var_name) const
 Returns the values for all of a coupled variable components. More...
 
std::vector< const VectorVariableValue * > coupledVectorValues (const std::string &var_name) const
 Returns the values for all of a coupled vector variable's components. More...
 
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. More...
 
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<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. More...
 
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<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. More...
 
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<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. More...
 
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<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. More...
 
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
 
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. More...
 
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
 
virtual const VariableValuecoupledValueLower (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled lower-dimensional variable. More...
 
const ADVariableValueadCoupledValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable for use in Automatic Differentiation. More...
 
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. More...
 
const ADVariableValueadCoupledLowerValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled lower-dimensional variable for use in Automatic Differentiation. More...
 
const ADVectorVariableValueadCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled vector variable for use in Automatic Differentiation. More...
 
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. More...
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled variable for a given tag. More...
 
virtual const VariableValuecoupledVectorTagValue (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. More...
 
std::vector< const VariableValue * > coupledVectorTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled array variable for a given tag. More...
 
virtual const ArrayVariableValuecoupledVectorTagArrayValue (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. More...
 
std::vector< const ArrayVariableValue * > coupledVectorTagArrayValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableGradientcoupledVectorTagGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns gradient of a coupled variable for a given tag. More...
 
virtual const VariableGradientcoupledVectorTagGradient (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. More...
 
std::vector< const VariableGradient * > coupledVectorTagGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns gradient of a coupled array variable for a given tag. More...
 
virtual const ArrayVariableGradientcoupledVectorTagArrayGradient (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. More...
 
std::vector< const ArrayVariableGradient * > coupledVectorTagArrayGradients (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_name, TagID tag, unsigned int index=0) const
 Returns dof value of a coupled variable for a given tag. More...
 
virtual const VariableValuecoupledVectorTagDofValue (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 
const ArrayVariableValuecoupledVectorTagArrayDofValue (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. More...
 
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. More...
 
std::vector< const VariableValue * > coupledVectorTagDofValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled variable for a given tag. More...
 
virtual const VariableValuecoupledMatrixTagValue (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. More...
 
std::vector< const VariableValue * > coupledMatrixTagValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled vector variable. More...
 
virtual const ArrayVariableValuecoupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled array variable. More...
 
std::vector< const ArrayVariableValue * > coupledArrayValues (const std::string &var_name) const
 Returns the values for all of a coupled array variable's components. More...
 
MooseWritableVariablewritableVariable (const std::string &var_name, unsigned int comp=0)
 Returns a writable MooseVariable object for a nodal or elemental variable. More...
 
virtual VariableValuewritableCoupledValue (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. More...
 
void checkWritableVar (MooseWritableVariable *var)
 Checks that the passed in variable is only accessed writable by one object in a given subdomain. More...
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from previous time step of a coupled variable. More...
 
std::vector< const VariableValue * > coupledValuesOld (const std::string &var_name) const
 Returns the old values for all of a coupled variable's components. More...
 
std::vector< const VectorVariableValue * > coupledVectorValuesOld (const std::string &var_name) const
 Returns the old values for all of a coupled vector variable's components. More...
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from two time steps previous of a coupled variable. More...
 
std::vector< const VariableValue * > coupledValuesOlder (const std::string &var_name) const
 Returns the older values for all of a coupled variable's components. More...
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns value of previous Newton iterate of a coupled variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from two time steps previous of a coupled vector variable. More...
 
virtual const ArrayVariableValuecoupledArrayValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from previous time step of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from two time steps previous of a coupled array variable. More...
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable. More...
 
std::vector< const VariableGradient * > coupledGradients (const std::string &var_name) const
 Returns the gradients for all of a coupled variable's components. More...
 
const ADVariableGradientadCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for use in Automatic Differentiation. More...
 
const ADVariableGradientadCoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable's time derivative for use in Automatic Differentiation. More...
 
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. More...
 
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. More...
 
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<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. More...
 
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
 
const ADVectorVariableGradientadCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled vector variable for use in Automatic Differentiation. More...
 
const ADVariableSecondadCoupledSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second derivatives of a coupled variable for use in Automatic Differentiation. More...
 
const ADVectorVariableSecondadCoupledVectorSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second derivatives of a coupled vector variable for use in Automatic Differentiation. More...
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from previous time step of a coupled variable. More...
 
std::vector< const VariableGradient * > coupledGradientsOld (const std::string &var_name) const
 Returns the old gradients for all of a coupled variable's components. More...
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from two time steps previous of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for previous Newton iterate. More...
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of the gradient of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of the gradient of a coupled variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from two time steps previous of a coupled vector variable. More...
 
virtual const ArrayVariableGradientcoupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled array variable. More...
 
virtual const ArrayVariableGradientcoupledArrayGradientOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from previous time step of a coupled array variable. More...
 
virtual const ArrayVariableGradientcoupledArrayGradientOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from two time steps previous of a coupled array variable. More...
 
virtual const ArrayVariableGradientcoupledArrayGradientDot (const std::string &var_name, unsigned int comp=0) const
 Retun a gradient of a coupled array variable's time derivative. More...
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0) const
 Returns curl of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old curl from previous time step of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old curl from two time steps previous of a coupled variable. More...
 
const ADVectorVariableCurladCoupledCurl (const std::string &var_name, unsigned int comp=0) const
 Returns curl of a coupled variable for use in objects utilizing Automatic Differentiation. More...
 
virtual const VectorVariableDivergencecoupledDiv (const std::string &var_name, unsigned int comp=0) const
 Returns divergence of a coupled variable. More...
 
virtual const VectorVariableDivergencecoupledDivOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old divergence from previous time step of a coupled variable. More...
 
virtual const VectorVariableDivergencecoupledDivOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old divergence from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second spatial derivatives of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old second spatial derivatives from previous time step of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old second derivative from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns second derivative of a coupled variable for the previous Newton iterate. More...
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable. More...
 
std::vector< const VariableValue * > coupledDots (const std::string &var_name) const
 Returns the time derivatives for all of a coupled variable's components. More...
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled variable. More...
 
const ADVariableValueadCoupledDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable for ad simulations. More...
 
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. More...
 
const ADVariableValueadCoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable for ad simulations. More...
 
const ADVectorVariableValueadCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a vector coupled variable for ad simulations. More...
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled vector variable. More...
 
virtual const VariableValuecoupledVectorDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled vector variable with respect to the coefficients. More...
 
virtual const VariableValuecoupledVectorDotDotDu (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled vector variable with respect to the coefficients. More...
 
virtual const ArrayVariableValuecoupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled array variable. More...
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable with respect to the coefficients. More...
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable with respect to the coefficients. More...
 
const VariableValuecoupledArrayDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled array variable with respect to the coefficients. More...
 
template<typename T >
const T & coupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 Returns nodal values of a coupled variable. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0) const
 Nodal values of second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0) const
 Nodal values of old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Nodal values of old second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDofValues (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. More...
 
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. More...
 
virtual const VariableValuecoupledDofValuesOld (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. More...
 
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. More...
 
virtual const VariableValuecoupledDofValuesOlder (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. More...
 
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. More...
 
virtual const ArrayVariableValuecoupledArrayDofValues (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. More...
 
virtual const ADVariableValueadCoupledDofValues (const std::string &var_name, unsigned int comp=0) const
 Returns DOF value of a coupled variable for use in Automatic Differentiation. More...
 
const ADVariableValueadZeroValue () const
 method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects More...
 
const ADVariableGradientadZeroGradient () const
 method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing objects More...
 
const ADVariableSecondadZeroSecond () const
 Retrieve a zero second for automatic differentiation. More...
 
template<bool is_ad>
const GenericVariableValue< is_ad > & genericZeroValue ()
 Returns zero value templated with automatic differentiation boolean. More...
 
template<>
const GenericVariableValue< false > & genericZeroValue ()
 
template<>
const GenericVariableValue< true > & genericZeroValue ()
 
template<bool is_ad>
const GenericVariableGradient< is_ad > & genericZeroGradient ()
 Returns zero gradient templated with automatic differentiation boolean. More...
 
template<>
const GenericVariableGradient< false > & genericZeroGradient ()
 
template<>
const GenericVariableGradient< true > & genericZeroGradient ()
 
template<bool is_ad>
const GenericVariableSecond< is_ad > & genericZeroSecond ()
 Returns zero second derivative templated with automatic differentiation boolean. More...
 
template<>
const GenericVariableSecond< false > & genericZeroSecond ()
 
template<>
const GenericVariableSecond< true > & genericZeroSecond ()
 
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. More...
 
const MooseVariableFieldBasegetFEVar (const std::string &var_name, unsigned int comp) const
 Deprecated method. More...
 
const MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp) const
 
MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp)
 
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. More...
 
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. More...
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled variable. More...
 
const MooseVariablegetVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled variable. More...
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled vector variable. More...
 
const VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled vector variable. More...
 
ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled array variable. More...
 
const ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled array variable. More...
 
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. More...
 
template<typename T , typename Func >
std::vector< T > coupledVectorHelper (const std::string &var_name, const Func &func) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 Returns true if a variables has been coupled_as name. More...
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 Return the number of components to the coupled scalar variable. More...
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 Returns the index for a scalar coupled variable by name. More...
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 Returns the order for a scalar coupled variable by name. More...
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a scalar coupled variable. More...
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 Returns AD value of a scalar coupled variable. More...
 
template<bool is_ad>
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled scalar variable for use in templated automatic differentiation classes. More...
 
template<>
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
template<>
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 Returns value of a scalar coupled variable. More...
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 Returns value of a scalar coupled variable. More...
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns the old (previous time step) value of a scalar coupled variable. More...
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns the older (two time steps previous) value of a scalar coupled variable. More...
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 Returns the time derivative of a scalar coupled variable. More...
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 Returns the time derivative of a scalar coupled variable, including its dependence on the nonlinear degrees of freedom through automatic differentiation. More...
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 Returns the second time derivative of a scalar coupled variable. More...
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 Returns the old time derivative of a scalar coupled variable. More...
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Returns the old second time derivative of a scalar coupled variable. More...
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a scalar coupled variable with respect to the coefficients. More...
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a scalar coupled variable with respect to the coefficients. More...
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a scalar coupled variable. More...
 

Protected Attributes

const InputParameters_c_parameters
 
const std::string & _c_name
 The name of the object this interface is part of. More...
 
const std::string & _c_type
 The type of the object this interface is part of. More...
 
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. More...
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
 Coupled vars whose values we provide. More...
 
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
 Vector of all coupled variables. More...
 
std::vector< MooseVariable * > _coupled_standard_moose_vars
 Vector of standard coupled variables. More...
 
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
 Vector of vector coupled variables. More...
 
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
 Vector of array coupled variables. More...
 
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
 Vector of all finite volume coupled variables. More...
 
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
 map from new to deprecated variable names More...
 
bool _c_nodal
 True if we provide coupling to nodal values. More...
 
bool _c_is_implicit
 True if implicit value is required. More...
 
const bool _c_allow_element_to_nodal_coupling
 
THREAD_ID _c_tid
 Thread ID of the thread using this object. More...
 
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
 Will hold the default value for optional coupled variables. More...
 
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. More...
 
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
 Will hold the default value for optional vector coupled variables. More...
 
std::unordered_map< std::string, std::unique_ptr< ArrayVariableValue > > _default_array_value
 Will hold the default value for optional array coupled variables. More...
 
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. More...
 
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. More...
 
VariableGradient _default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< ADRealVectorValue_ad_default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< ADRealTensorValue_ad_default_vector_gradient
 This will always be zero because the default values for optionally coupled vector variables is always constant. More...
 
VariableSecond _default_second
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< ADRealTensorValue_ad_default_second
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< ADRealVectorValue_ad_default_curl
 This will always be zero because the default values for optionally coupled vector variables is always constant. More...
 
const VariableValue_zero
 Zero value of a variable. More...
 
const VariablePhiValue_phi_zero
 
const MooseArray< ADReal > & _ad_zero
 
const VariableGradient_grad_zero
 Zero gradient of a variable. More...
 
const MooseArray< ADRealVectorValue > & _ad_grad_zero
 
const VariablePhiGradient_grad_phi_zero
 Zero gradient of trial function. More...
 
const VariableSecond_second_zero
 Zero second derivative of a variable. More...
 
const MooseArray< ADRealTensorValue > & _ad_second_zero
 
const VariablePhiSecond_second_phi_zero
 Zero second derivative of a test function. More...
 
const VectorVariableValue_vector_zero
 Zero value of a vector variable. More...
 
const VectorVariableCurl_vector_curl_zero
 Zero value of the curl of a vector variable. More...
 
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. More...
 
VectorVariableGradient _default_vector_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
VectorVariableCurl _default_vector_curl
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
VectorVariableDivergence _default_div
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
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. More...
 
ArrayVariableGradient _default_array_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
bool _coupleable_neighbor
 Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor values. More...
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 Thread ID of the thread using this object. More...
 
const Real_real_zero
 Scalar zero. More...
 
const VariableValue_scalar_zero
 Zero value of a scalar variable. More...
 
const Point & _point_zero
 Zero point. More...
 

Detailed Description

Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with the MooseVariableDependencyInterface.

Definition at line 20 of file CoupleableMooseVariableDependencyIntermediateInterface.h.

Constructor & Destructor Documentation

◆ CoupleableMooseVariableDependencyIntermediateInterface()

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

Definition at line 15 of file CoupleableMooseVariableDependencyIntermediateInterface.C.

18  : Coupleable(moose_object, nodal, is_fv),
19  ScalarCoupleable(moose_object),
21 {
22  for (MooseVariableFEBase * coupled_var : getCoupledMooseVars())
23  addMooseVariableDependency(coupled_var);
24 }
This class provides an interface for common operations on field variables of both FE and FV types wit...
Coupleable(const MooseObject *moose_object, bool nodal, bool is_fv=false)
Constructing the object.
Definition: Coupleable.C:27
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition: Coupleable.h:70
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
ScalarCoupleable(const MooseObject *moose_object)
Constructing the object.

Member Function Documentation

◆ adCoupledCurl()

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

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 1756 of file Coupleable.C.

1757 {
1758  const auto * var = getVectorVar(var_name, comp);
1759 
1760  if (!var)
1761  return getADDefaultCurl();
1763 
1764  if (!_c_is_implicit)
1765  mooseError("Not implemented");
1766 
1767  if (!_coupleable_neighbor)
1768  return var->adCurlSln();
1769  return var->adCurlSlnNeighbor();
1770 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const ADVectorVariableCurl & getADDefaultCurl() const
Helper method to return (and insert if necessary) the default curl value for Automatic Differentiatio...
Definition: Coupleable.C:2391
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledDofValues()

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

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 2099 of file Coupleable.C.

2100 {
2101  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2102 
2103  if (!var)
2104  return *getADDefaultValue(var_name);
2106 
2107  if (!_c_is_implicit)
2108  mooseError("Not implemented");
2109 
2110  if (!_coupleable_neighbor)
2111  return var->adDofValues();
2112  return var->adDofValuesNeighbor();
2113 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...
Definition: Coupleable.C:2339
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledDot()

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

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 2249 of file Coupleable.C.

Referenced by Coupleable::adCoupledDots().

2250 {
2251  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2252 
2253  if (!var)
2254  return *getADDefaultValue(var_name);
2256 
2257  if (!_coupleable_neighbor)
2258  {
2259  if (_c_nodal)
2260  return var->adDofValuesDot();
2261  return var->adUDot();
2262  }
2263  else
2264  {
2265  if (_c_nodal)
2266  mooseError("AD neighbor nodal dof dot not implemented");
2267  return var->adUDotNeighbor();
2268  }
2269 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...
Definition: Coupleable.C:2339
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledDotDot()

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

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 2272 of file Coupleable.C.

2273 {
2274  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2275 
2276  if (!var)
2277  return *getADDefaultValue(var_name);
2279 
2280  if (_c_nodal)
2281  mooseError("Not implemented");
2282 
2283  if (!_coupleable_neighbor)
2284  return var->adUDotDot();
2285  return var->adUDotDotNeighbor();
2286 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...
Definition: Coupleable.C:2339
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledDots()

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

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 2752 of file Coupleable.C.

2753 {
2754  auto func = [this, &var_name](unsigned int comp) { return &adCoupledDot(var_name, comp); };
2755  return coupledVectorHelper<const ADVariableValue *>(var_name, func);
2756 }
const ADVariableValue & adCoupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable for ad simulations.
Definition: Coupleable.C:2249

◆ adCoupledGradient()

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

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 2190 of file Coupleable.C.

Referenced by Coupleable::adCoupledGradients().

2191 {
2192  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2193 
2194  if (!var)
2195  return getADDefaultGradient();
2197 
2198  if (!_c_is_implicit)
2199  mooseError("Not implemented");
2200 
2201  if (!_coupleable_neighbor)
2202  return var->adGradSln();
2203  return var->adGradSlnNeighbor();
2204 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2370
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledGradientDot()

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

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 2207 of file Coupleable.C.

2208 {
2209  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2210 
2211  if (!var)
2212  return getADDefaultGradient();
2214 
2215  if (!_c_is_implicit)
2216  mooseError("Not implemented");
2217 
2218  if (!_coupleable_neighbor)
2219  return var->adGradSlnDot();
2220  return var->adGradSlnNeighborDot();
2221 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2370
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledGradients()

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

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 2731 of file Coupleable.C.

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

◆ adCoupledLowerValue()

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

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 2172 of file Coupleable.C.

2173 {
2174  auto var = getVarHelper<MooseVariableFE<Real>>(var_name, comp);
2175 
2176  if (!var)
2177  return *getADDefaultValue(var_name);
2179 
2180  if (!_c_is_implicit)
2181  mooseError("adCoupledLowerValue cannot be called in a coupleable neighbor object");
2182 
2183  if (_c_nodal)
2184  return var->adDofValues();
2185  else
2186  return var->adSlnLower();
2187 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...
Definition: Coupleable.C:2339

◆ adCoupledNodalValue()

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

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 2130 of file Coupleable.C.

2131 {
2132  static const typename Moose::ADType<T>::type zero = 0;
2133  if (!isCoupled(var_name))
2134  return zero;
2135 
2136  if (!_c_nodal)
2137  mooseError("The adCoupledNodalValue method should only be called for nodal computing objects");
2139  mooseError(
2140  "The adCoupledNodalValue method shouldn't be called for neighbor computing objects. I "
2141  "don't even know what that would mean, although maybe someone could explain it to me.");
2142  if (!_c_is_implicit)
2143  mooseError("If you're going to use an explicit scheme, then use coupledNodalValue instead of "
2144  "adCoupledNodalValue");
2145 
2146  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2147 
2148  return var->adNodalValue();
2149 }
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:127
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const Number zero
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledScalarDot()

const ADVariableValue & ScalarCoupleable::adCoupledScalarDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the time derivative of a scalar coupled variable, including its dependence on the nonlinear degrees of freedom through automatic differentiation.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to the time derivative at quadrature points for the coupled variable, including automatic differentiation information

Definition at line 252 of file ScalarCoupleable.C.

253 {
254  checkVar(var_name);
255  validateExecutionerType(var_name, "adCoupledScalarDot");
256  return getScalarVar(var_name, comp)->adUDot();
257 }
const ADVariableValue & adUDot() const
Return the first derivative of the solution with derivative information.
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...
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ adCoupledScalarValue()

const ADVariableValue & ScalarCoupleable::adCoupledScalarValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns AD value of a scalar coupled variable.

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 135 of file ScalarCoupleable.C.

136 {
137  checkVar(var_name);
138  if (!isCoupledScalar(var_name, comp))
139  return *getADDefaultValue(var_name);
140 
141  auto var = getScalarVar(var_name, comp);
142 
143  if (_sc_is_implicit)
144  return var->adSln();
145  else
146  mooseError("adCoupledValue for non-implicit calculations is not currently supported. Use "
147  "coupledValue instead for non-implicit");
148 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const bool _sc_is_implicit
True if implicit value is required.
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the AD default value for an uncoupled variable...

◆ adCoupledSecond()

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

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 2224 of file Coupleable.C.

2225 {
2226  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2227 
2228  if (!var)
2229  return getADDefaultSecond();
2231 
2232  if (!_c_is_implicit)
2233  mooseError("Not implemented");
2234 
2235  if (!_coupleable_neighbor)
2236  return var->adSecondSln();
2237  else
2238  return var->adSecondSlnNeighbor();
2239 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
const ADVariableSecond & getADDefaultSecond() const
Helper method to return (and insert if necessary) the default second derivatives for Automatic Differ...
Definition: Coupleable.C:2384

◆ adCoupledValue()

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

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 2152 of file Coupleable.C.

Referenced by Coupleable::adCoupledValues().

2153 {
2154  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2155 
2156  if (!var)
2157  return *getADDefaultValue(var_name);
2159 
2160  if (!_c_is_implicit)
2161  mooseError("Not implemented");
2162 
2163  if (_c_nodal)
2164  return var->adDofValues();
2165 
2166  if (!_coupleable_neighbor)
2167  return var->adSln();
2168  return var->adSlnNeighbor();
2169 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...
Definition: Coupleable.C:2339
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledValues()

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

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 2534 of file Coupleable.C.

2535 {
2536  auto func = [this, &var_name](unsigned int comp) { return &adCoupledValue(var_name, comp); };
2537  return coupledVectorHelper<const ADVariableValue *>(var_name, func);
2538 }
const ADVariableValue & adCoupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable for use in Automatic Differentiation.
Definition: Coupleable.C:2152

◆ adCoupledVectorDot()

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

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 2289 of file Coupleable.C.

2290 {
2291  const auto * var = getVectorVar(var_name, comp);
2292  if (!var)
2293  return *getADDefaultVectorValue(var_name);
2295 
2296  if (_c_nodal)
2297  mooseError("Not implemented");
2298 
2299  if (!_coupleable_neighbor)
2300  return var->adUDot();
2301  return var->adUDotNeighbor();
2302 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
const ADVectorVariableValue * getADDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default vector value for Automatic Differentiat...
Definition: Coupleable.C:2353
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledVectorGradient()

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

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 2323 of file Coupleable.C.

2324 {
2325  const auto * var = getVectorVar(var_name, comp);
2326  if (!var)
2327  return getADDefaultVectorGradient();
2329 
2330  if (!_c_is_implicit)
2331  mooseError("Not implemented");
2332 
2333  if (!_coupleable_neighbor)
2334  return var->adGradSln();
2335  return var->adGradSlnNeighbor();
2336 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const ADVectorVariableGradient & getADDefaultVectorGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2377
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledVectorSecond()

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

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
protectedinherited

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 2305 of file Coupleable.C.

Referenced by Coupleable::adCoupledVectorValues().

2306 {
2307  const auto * var = getVectorVar(var_name, comp);
2308  if (!var)
2309  return *getADDefaultVectorValue(var_name);
2311 
2312  if (_c_nodal)
2313  mooseError("Not implemented");
2314  if (!_c_is_implicit)
2315  mooseError("Not implemented");
2316 
2317  if (!_coupleable_neighbor)
2318  return var->adSln();
2319  return var->adSlnNeighbor();
2320 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
const ADVectorVariableValue * getADDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default vector value for Automatic Differentiat...
Definition: Coupleable.C:2353
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ adCoupledVectorValues()

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

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 2541 of file Coupleable.C.

2542 {
2543  auto func = [this, &var_name](unsigned int comp)
2544  { return &adCoupledVectorValue(var_name, comp); };
2545  return coupledVectorHelper<const ADVectorVariableValue *>(var_name, func);
2546 }
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.
Definition: Coupleable.C:2305

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 104 of file Coupleable.h.

Referenced by Coupleable::coupledMatrixTagValue().

104 { _fe_coupleable_matrix_tags.insert(tag); }
std::set< TagID > _fe_coupleable_matrix_tags
Definition: Coupleable.h:1798

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

◆ addMooseVariableDependency() [1/2]

void MooseVariableDependencyInterface::addMooseVariableDependency ( MooseVariableFieldBase var)
inlineinherited

Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends on.

Definition at line 72 of file MooseVariableDependencyInterface.h.

Referenced by ADDGKernel::ADDGKernel(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADKernelTempl< T >::ADKernelTempl(), ArrayDGKernel::ArrayDGKernel(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayNodalBC::ArrayNodalBC(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxNodalScalarKernel::AuxNodalScalarKernel(), CoupleableMooseVariableDependencyIntermediateInterface(), coupledArrayValueByName(), coupledValueByName(), DGKernel::DGKernel(), DiffusionLHDGAssemblyHelper::DiffusionLHDGAssemblyHelper(), DiracKernelTempl< T >::DiracKernelTempl(), ElemElemConstraint::ElemElemConstraint(), ElementIndicator::ElementIndicator(), ElementIntegralArrayVariablePostprocessor::ElementIntegralArrayVariablePostprocessor(), ElementIntegralVariablePostprocessor::ElementIntegralVariablePostprocessor(), ElementIntegralVariableUserObject::ElementIntegralVariableUserObject(), ElementVariablePostprocessor::ElementVariablePostprocessor(), FVBoundaryCondition::FVBoundaryCondition(), FVElementalKernel::FVElementalKernel(), FVInterfaceKernel::FVInterfaceKernel(), IntegratedBC::IntegratedBC(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), InterfaceMaterial::InterfaceMaterial(), InternalSideIndicatorBase::InternalSideIndicatorBase(), InternalSideIndicatorTempl< ComputeValueType >::InternalSideIndicatorTempl(), InternalSideIntegralVariablePostprocessor::InternalSideIntegralVariablePostprocessor(), IPHDGAssemblyHelper::IPHDGAssemblyHelper(), Kernel::Kernel(), LinearFVBoundaryCondition::LinearFVBoundaryCondition(), LinearFVKernel::LinearFVKernel(), Marker::Marker(), Material::Material(), MortarConstraintBase::MortarConstraintBase(), NeighborCoupleableMooseVariableDependencyIntermediateInterface::NeighborCoupleableMooseVariableDependencyIntermediateInterface(), NodalBC::NodalBC(), NodalConstraint::NodalConstraint(), NodalKernel::NodalKernel(), NodalScalarKernel::NodalScalarKernel(), NodeElemConstraintBase::NodeElemConstraintBase(), NodeFaceConstraint::NodeFaceConstraint(), PointVariableSamplerBase::PointVariableSamplerBase(), QuadraturePointMarker::QuadraturePointMarker(), SideIntegralVariablePostprocessor::SideIntegralVariablePostprocessor(), SideIntegralVariableUserObject::SideIntegralVariableUserObject(), SideVariablePostprocessor::SideVariablePostprocessor(), VectorIntegratedBC::VectorIntegratedBC(), VectorKernel::VectorKernel(), and VectorNodalBC::VectorNodalBC().

73  {
74  _moose_variable_dependencies.insert(var);
75  }
std::set< MooseVariableFieldBase * > _moose_variable_dependencies

◆ addMooseVariableDependency() [2/2]

void MooseVariableDependencyInterface::addMooseVariableDependency ( const std::vector< MooseVariableFieldBase *> &  vars)
inlineinherited

Definition at line 76 of file MooseVariableDependencyInterface.h.

77  {
78  _moose_variable_dependencies.insert(vars.begin(), vars.end());
79  }
char ** vars
std::set< MooseVariableFieldBase * > _moose_variable_dependencies

◆ adZeroGradient()

const ADVariableGradient & Coupleable::adZeroGradient ( ) const
protectedinherited

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

Definition at line 2405 of file Coupleable.C.

2406 {
2407  mooseDeprecated("Method adZeroGradient() is deprecated. Use '_ad_grad_zero' instead.");
2408  return _ad_grad_zero;
2409 }
const MooseArray< ADRealVectorValue > & _ad_grad_zero
Definition: Coupleable.h:1490
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353

◆ adZeroSecond()

const ADVariableSecond & Coupleable::adZeroSecond ( ) const
protectedinherited

Retrieve a zero second for automatic differentiation.

Definition at line 2412 of file Coupleable.C.

2413 {
2414  mooseDeprecated("Method adZeroSecond() is deprecated. Use '_ad_second_zero' instead.");
2415  return _ad_second_zero;
2416 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
const MooseArray< ADRealTensorValue > & _ad_second_zero
Definition: Coupleable.h:1497

◆ adZeroValue()

const ADVariableValue & Coupleable::adZeroValue ( ) const
protectedinherited

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

Definition at line 2398 of file Coupleable.C.

2399 {
2400  mooseDeprecated("Method adZeroValue() is deprecated. Use '_ad_zero' instead.");
2401  return _ad_zero;
2402 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
const MooseArray< ADReal > & _ad_zero
Definition: Coupleable.h:1486

◆ checkAllVariables()

template<typename DofObjectType >
std::set< MooseVariableFieldBase * > MooseVariableDependencyInterface::checkAllVariables ( const DofObjectType &  dof_object,
const std::set< MooseVariableFieldBase *> &  vars_to_omit = {} 
)
inherited

Check whether all of the variable dependencies have degree of freedom indices on the supplied degree of freedom object.

Parameters
dof_objectThe degree of freedom object (an element or node) that we want to check for existence of variable degrees of freedom on
vars_to_omitVariables that we can omit from checking
Returns
Any variables that do not have degrees of freedom on the supplied degree of freedom object

Definition at line 90 of file MooseVariableDependencyInterface.h.

92 {
93  if (vars_to_omit.empty())
94  return checkVariables(dof_object, _moose_variable_dependencies);
95 
96  std::set<MooseVariableFieldBase *> vars_to_check;
97  std::set_difference(_moose_variable_dependencies.begin(),
99  vars_to_omit.begin(),
100  vars_to_omit.end(),
101  std::inserter(vars_to_check, vars_to_check.begin()));
102  return checkVariables(dof_object, vars_to_check);
103 }
std::set< MooseVariableFieldBase * > checkVariables(const DofObjectType &dof_object, const std::set< MooseVariableFieldBase *> &vars_to_check)
Check whether all of the supplied variables have degree of freedom indices on the supplied degree of ...
std::set< MooseVariableFieldBase * > _moose_variable_dependencies

◆ checkVar()

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

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

Parameters
var_nameThe name of the coupled variable

Definition at line 207 of file Coupleable.C.

Referenced by Coupleable::getVarHelper().

210 {
211  const auto var_name = _c_parameters.checkForRename(var_name_in);
212  auto it = _c_coupled_scalar_vars.find(var_name);
213  if (it != _c_coupled_scalar_vars.end())
214  {
215  std::string cvars;
216  for (auto jt : it->second)
217  cvars += " " + jt->name();
218 
219  _obj->paramError(var_name,
220  "cannot couple '",
221  var_name,
222  "' to a scalar variable (",
223  cvars,
224  ") where field variable is expected");
225  }
226 
227  if (!isCoupled(var_name, comp))
228  return false; // return false since variable is *not* coupled
229 
230  auto vars_vector_it = _coupled_vars.find(var_name);
231  if (vars_vector_it == _coupled_vars.end())
232  mooseError(_c_name, ": Trying to get a coupled var ", var_name, " that doesn't exist");
233 
234  const auto & vars_vector = vars_vector_it->second;
235 
236  auto bound = comp_bound ? comp_bound : vars_vector.size();
237  checkComponent(_obj, comp, bound, var_name);
238 
239  // We should know we have a variable now
240  const auto * var = vars_vector[comp];
241  if (!var)
242  mooseError(
243  _c_name,
244  ": We did all our checks for the existence of a var, yet we still don't have a var!?");
245 
246  // Only perform the following checks for objects that feed into residuals/Jacobians, e.g. objects
247  // that inherit from the TaggingInterface
248  if (_c_parameters.have_parameter<MultiMooseEnum>("vector_tags"))
249  {
250  // Are we attempting to couple to a non-FV var in an FV object?
251  if (!var->isFV() && _is_fv)
252  mooseError("Attempting to couple non-FV variable ",
253  var->name(),
254  " into an FV object ",
255  _c_name,
256  ". This is not currently supported");
257  }
258 
259  if (!(vars_vector[comp])->isNodal() && _c_nodal && !_c_allow_element_to_nodal_coupling)
260  mooseError(_c_name, ": cannot couple elemental variables into nodal objects");
261 
262  return true;
263 }
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:127
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1409
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const bool _is_fv
Whether the MooseObject is a finite volume object.
Definition: Coupleable.h:1801
const bool _c_allow_element_to_nodal_coupling
Definition: Coupleable.h:1436
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
Scalar variables coupled into this object (for error checking)
Definition: Coupleable.h:1794
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
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 ...
const MooseObject *const _obj
Definition: Coupleable.h:1803
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
void checkComponent(const MooseObject *obj, unsigned int comp, unsigned int bound, const std::string &var_name)
Definition: Coupleable.C:176
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...

◆ checkVariables()

template<typename DofObjectType >
template std::set< MooseVariableFieldBase * > MooseVariableDependencyInterface::checkVariables ( const DofObjectType &  dof_object,
const std::set< MooseVariableFieldBase *> &  vars_to_check 
)
inherited

Check whether all of the supplied variables have degree of freedom indices on the supplied degree of freedom object.

Parameters
dof_objectThe degree of freedom object (an element or node) that we want to check for existence of variable degrees of freedom on
vars_to_checkthe variables to check
Returns
Any variables that do not have degrees of freedom on the supplied degree of freedom object

Definition at line 25 of file MooseVariableDependencyInterface.C.

Referenced by MooseVariableDependencyInterface::checkAllVariables().

27 {
28  std::set<MooseVariableFieldBase *> vars_without_indices;
29  for (auto * const var : vars_to_check)
30  {
31  var->sys().dofMap().dof_indices(&dof_object, _dof_indices, var->number());
32  if (_dof_indices.empty())
33  vars_without_indices.insert(var);
34  }
35 
36  return vars_without_indices;
37 }
std::vector< libMesh::dof_id_type > _dof_indices
A container for holding dof indices in order to avoid constant memory reallocation.

◆ checkWritableVar()

void Coupleable::checkWritableVar ( MooseWritableVariable var)
protectedinherited

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

Definition at line 950 of file Coupleable.C.

Referenced by Coupleable::writableCoupledValue(), and Coupleable::writableVariable().

951 {
952  // check domain restrictions for compatibility
953  const auto * br = dynamic_cast<const BlockRestrictable *>(this);
954  const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
955 
956  if (br && !var->hasBlocks(br->blockIDs()))
957  mooseError("The variable '",
958  var->name(),
959  "' must be defined on all blocks '",
960  _obj->name(),
961  "' is defined on.");
962 
963  if (nfc && !var->hasBlocks(nfc->getSecondaryConnectedBlocks()))
964  mooseError("The variable '",
965  var->name(),
966  " must be defined on all blocks '",
967  _obj->name(),
968  "'s secondary surface is defined on.");
969 
970  // make sure only one object can access a variable
971  for (const auto & ci : _obj->getMooseApp().getInterfaceObjects<Coupleable>())
972  if (ci != this && ci->_writable_coupled_variables[_c_tid].count(var))
973  {
974  // if both this and ci are block restrictable then we check if the block restrictions
975  // are not overlapping. If they don't we permit the call.
976  const auto * br_other = dynamic_cast<const BlockRestrictable *>(ci);
977  if (br && br_other && br->blockRestricted() && br_other->blockRestricted() &&
978  !MooseUtils::setsIntersect(br->blockIDs(), br_other->blockIDs()))
979  continue;
980  else if (nfc)
981  continue;
982 
983  mooseError("'",
984  ci->_obj->name(),
985  "' already obtained a writable reference to '",
986  var->name(),
987  "'. Only one object can obtain such a reference per variable and subdomain in a "
988  "simulation.");
989  }
990 
991  // var is unique across threads, so we could forego having a separate set per thread, but we
992  // need quick access to the list of all variables that need to be inserted into the solution
993  // vector by a given thread.
994 
995  _writable_coupled_variables[_c_tid].insert(var);
996 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool setsIntersect(InputIterator first1, InputIterator last1, InputIterator first2, InputIterator last2)
This method detects whether two sets intersect without building a result set.
Definition: MooseUtils.h:1180
const std::string & name() const override
Get the variable name.
THREAD_ID _c_tid
Thread ID of the thread using this object.
Definition: Coupleable.h:1439
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...
Definition: Coupleable.h:1810
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh...
const MooseObject *const _obj
Definition: Coupleable.h:1803
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:45
bool hasBlocks(const SubdomainID id) const override
Returns whether the functor is defined on this block.
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
const std::vector< T * > & getInterfaceObjects() const
Gets the registered interface objects for a given interface.
Definition: MooseApp.h:1683

◆ coupled()

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

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 440 of file Coupleable.C.

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

441 {
442  const auto * var = getFieldVar(var_name, comp);
443  if (!var)
444  {
445  mooseAssert(_optional_var_index.find(var_name) != _optional_var_index.end(),
446  "optional var index for " << var_name << " does not exist!");
447  // make sure we don't try to access default var ids that were not provided
448  checkComponent(_obj, comp, _optional_var_index.at(var_name).size(), var_name);
449  return _optional_var_index.at(var_name)[comp];
450  }
452 
453  if (var->kind() == Moose::VAR_SOLVER &&
454  // are we not an object that feeds into the nonlinear system?
455  (!_c_sys || _c_sys->varKind() != Moose::VAR_SOLVER ||
456  // are we an object that impacts the nonlinear system and this variable is within our
457  // nonlinear system?
458  var->sys().number() == _c_sys->number()))
459  return var->number();
460  else
461  // Avoid registering coupling to variables outside of our system (e.g. avoid potentially
462  // creating bad Jacobians)
463  return std::numeric_limits<unsigned int>::max() - var->number();
464 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
auto max(const L &left, const R &right)
const SystemBase *const _c_sys
Pointer to the system object if the moose object this is an interface for has one.
Definition: Coupleable.h:1406
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
const MooseObject *const _obj
Definition: Coupleable.h:1803
void checkComponent(const MooseObject *obj, unsigned int comp, unsigned int bound, const std::string &var_name)
Definition: Coupleable.C:176
std::unordered_map< std::string, std::vector< unsigned int > > _optional_var_index
Unique indices for optionally coupled vars that weren&#39;t provided.
Definition: Coupleable.h:1791
Moose::VarKindType varKind() const
Definition: SystemBase.h:925
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
Definition: Coupleable.C:280

◆ coupledAllDofValues()

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

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 2038 of file Coupleable.C.

2039 {
2040  auto func = [this, &var_name](unsigned int comp) { return &coupledDofValues(var_name, comp); };
2041  return coupledVectorHelper<const VariableValue *>(var_name, func);
2042 }
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.
Definition: Coupleable.C:2025

◆ coupledAllDofValuesOld()

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

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 2058 of file Coupleable.C.

2059 {
2060  auto func = [this, &var_name](unsigned int comp) { return &coupledDofValuesOld(var_name, comp); };
2061  return coupledVectorHelper<const VariableValue *>(var_name, func);
2062 }
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.
Definition: Coupleable.C:2045

◆ coupledAllDofValuesOlder()

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

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 2078 of file Coupleable.C.

2079 {
2080  auto func = [this, &var_name](unsigned int comp)
2081  { return &coupledDofValuesOlder(var_name, comp); };
2082  return coupledVectorHelper<const VariableValue *>(var_name, func);
2083 }
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.
Definition: Coupleable.C:2065

◆ coupledArrayDofValues()

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

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 2086 of file Coupleable.C.

2087 {
2088  const auto * var = getArrayVar(var_name, comp);
2089  if (!var)
2090  return *getDefaultArrayValue(var_name);
2092 
2093  if (!_coupleable_neighbor)
2094  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2095  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2096 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
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:395
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304

◆ coupledArrayDot()

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

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 1348 of file Coupleable.C.

1349 {
1350  const auto * var = getArrayVar(var_name, comp);
1351  if (!var)
1354 
1355  if (!_coupleable_neighbor)
1356  {
1357  if (_c_nodal)
1358  return var->dofValuesDot();
1359  return var->uDot();
1360  }
1361  else
1362  {
1363  if (_c_nodal)
1364  return var->dofValuesDotNeighbor();
1365  return var->uDotNeighbor();
1366  }
1367 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1524

◆ coupledArrayDotDot()

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

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 1370 of file Coupleable.C.

1371 {
1372  const auto * var = getArrayVar(var_name, comp);
1373  if (!var)
1376 
1377  if (!_coupleable_neighbor)
1378  {
1379  if (_c_nodal)
1380  return var->dofValuesDotDot();
1381  return var->uDotDot();
1382  }
1383  else
1384  {
1385  if (_c_nodal)
1386  return var->dofValuesDotDotNeighbor();
1387  return var->uDotDotNeighbor();
1388  }
1389 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1524

◆ coupledArrayDotDotOld()

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

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 1414 of file Coupleable.C.

1415 {
1416  const auto * var = getArrayVar(var_name, comp);
1417  if (!var)
1420 
1421  if (!_coupleable_neighbor)
1422  {
1423  if (_c_nodal)
1424  return var->dofValuesDotDotOld();
1425  return var->uDotDotOld();
1426  }
1427  else
1428  {
1429  if (_c_nodal)
1430  return var->dofValuesDotDotOldNeighbor();
1431  return var->uDotDotOldNeighbor();
1432  }
1433 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1524

◆ coupledArrayDotDu()

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

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 1486 of file Coupleable.C.

1487 {
1488  const auto * const var = getArrayVar(var_name, comp);
1489  if (!var)
1490  {
1492  return _default_value_zero;
1493  }
1495 
1496  if (!_coupleable_neighbor)
1497  {
1498  if (_c_nodal)
1499  return var->dofValuesDuDotDu();
1500  return var->duDotDu();
1501  }
1502  else
1503  {
1504  if (_c_nodal)
1505  return var->dofValuesDuDotDuNeighbor();
1506  return var->duDotDuNeighbor();
1507  }
1508 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledArrayDotOld()

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

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 1392 of file Coupleable.C.

1393 {
1394  const auto * var = getArrayVar(var_name, comp);
1395  if (!var)
1398 
1399  if (!_coupleable_neighbor)
1400  {
1401  if (_c_nodal)
1402  return var->dofValuesDotOld();
1403  return var->uDotOld();
1404  }
1405  else
1406  {
1407  if (_c_nodal)
1408  return var->dofValuesDotOldNeighbor();
1409  return var->uDotOldNeighbor();
1410  }
1411 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1524

◆ coupledArrayGradient()

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

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 1656 of file Coupleable.C.

1657 {
1658  const auto * var = getArrayVar(var_name, comp);
1659  if (!var)
1660  return _default_array_gradient;
1662 
1663  if (!_coupleable_neighbor)
1664  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1665  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1666 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1527

◆ coupledArrayGradientDot()

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

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 1695 of file Coupleable.C.

1696 {
1697  const auto * const var = getArrayVar(var_name, comp);
1698  if (!var)
1699  return _default_array_gradient;
1701 
1702  if (!_coupleable_neighbor)
1703  return var->gradSlnDot();
1704  return var->gradSlnNeighborDot();
1705 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1527

◆ coupledArrayGradientOld()

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

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 1669 of file Coupleable.C.

1670 {
1671  const auto * var = getArrayVar(var_name, comp);
1672  if (!var)
1673  return _default_array_gradient;
1675 
1676  if (!_coupleable_neighbor)
1677  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1678  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1679 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1527

◆ coupledArrayGradientOlder()

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

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 1682 of file Coupleable.C.

1683 {
1684  const auto * var = getArrayVar(var_name, comp);
1685  if (!var)
1686  return _default_array_gradient;
1688 
1689  if (!_coupleable_neighbor)
1690  return var->gradSlnOlder();
1691  return var->gradSlnOlderNeighbor();
1692 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1527

◆ coupledArrayValue()

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

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 847 of file Coupleable.C.

Referenced by Coupleable::coupledArrayValues().

848 {
849  const auto * var = getArrayVar(var_name, comp);
850  if (!var)
851  return *getDefaultArrayValue(var_name);
853 
855  {
856  if (_c_nodal)
857  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
858  return (_c_is_implicit) ? var->sln() : var->slnOld();
859  }
860  else
861  {
862  if (_c_nodal)
863  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
864  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
865  }
866 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
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:395
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304

◆ coupledArrayValueByName()

const ArrayVariableValue & CoupleableMooseVariableDependencyIntermediateInterface::coupledArrayValueByName ( const std::string &  var_name)
virtual

Returns value of a coupled array variable give the variable name.

Parameters
var_nameName of coupled variable
Returns
Reference to a ArrayVariableValue for the coupled array variable

Definition at line 55 of file CoupleableMooseVariableDependencyIntermediateInterface.C.

57 {
60  _coupled_moose_vars.push_back(moose_var);
62  _coupled_array_moose_vars.push_back(var);
63 
64  addMooseVariableDependency(moose_var);
65 
67  {
68  if (_c_nodal)
69  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
70  else
71  return (_c_is_implicit) ? var->sln() : var->slnOld();
72  }
73  else
74  {
75  if (_c_nodal)
76  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
77  else
78  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
79  }
80 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
Class for stuff related to variables.
Definition: Adaptivity.h:31
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
Definition: Coupleable.h:1421
const FieldVariableValue & slnNeighbor() const override
neighbor solutions
THREAD_ID _c_tid
Thread ID of the thread using this object.
Definition: Coupleable.h:1439
This class provides an interface for common operations on field variables of both FE and FV types wit...
const DoFValue & dofValuesNeighbor() const override
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 override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const FieldVariableValue & sln() const override
element solutions
const DoFValue & dofValuesOld() const override
const DoFValue & dofValuesOldNeighbor() const override
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
Definition: Coupleable.h:1412
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
const DoFValue & dofValues() const override
dof values getters
virtual ArrayMooseVariable & getArrayVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested ArrayMooseVariable which may be in any system...
const FieldVariableValue & slnOld() const override
const FieldVariableValue & slnOldNeighbor() const override

◆ coupledArrayValueOld()

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

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 1094 of file Coupleable.C.

1095 {
1096  const auto * var = getArrayVar(var_name, comp);
1097  if (!var)
1098  return *getDefaultArrayValue(var_name);
1100 
1101  if (!_coupleable_neighbor)
1102  {
1103  if (_c_nodal)
1104  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1105  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1106  }
1107  else
1108  {
1109  if (_c_nodal)
1110  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1111  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1112  }
1113 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
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:395
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304

◆ coupledArrayValueOlder()

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

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 1116 of file Coupleable.C.

1117 {
1118  const auto * var = getArrayVar(var_name, comp);
1119  if (!var)
1120  return *getDefaultArrayValue(var_name);
1122 
1123  if (!_coupleable_neighbor)
1124  {
1125  if (_c_nodal)
1126  return var->dofValuesOlder();
1127  return var->slnOlder();
1128  }
1129  else
1130  {
1131  if (_c_nodal)
1132  return var->dofValuesOlderNeighbor();
1133  return var->slnOlderNeighbor();
1134  }
1135 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
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:395
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304

◆ coupledArrayValues()

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

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 869 of file Coupleable.C.

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

◆ coupledCallback()

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

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

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

Definition at line 135 of file Coupleable.h.

Referenced by Coupleable::checkFuncType().

135 {}

◆ coupledComponents()

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

Number of coupled components.

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

Definition at line 156 of file Coupleable.C.

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

157 {
158  const auto var_name = _c_parameters.checkForRename(var_name_in);
159 
160  if (isCoupled(var_name))
161  {
162  mooseAssert(_coupled_vars.find(var_name) != _coupled_vars.end(),
163  var_name << " must not actually be coupled!");
164  return _coupled_vars.at(var_name).size();
165  }
166  else
167  {
169  return _c_parameters.numberDefaultCoupledValues(var_name);
170  else
171  return 0;
172  }
173 }
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:127
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1409
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
const InputParameters & _c_parameters
Definition: Coupleable.h:1395

◆ coupledCurl()

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

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 1708 of file Coupleable.C.

1709 {
1710  const auto * var = getVectorVar(var_name, comp);
1711  if (!var)
1712  {
1714  return _default_vector_curl;
1715  }
1717 
1718  if (!_coupleable_neighbor)
1719  return (_c_is_implicit) ? var->curlSln() : var->curlSlnOld();
1720  return (_c_is_implicit) ? var->curlSlnNeighbor() : var->curlSlnOldNeighbor();
1721 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1515
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledCurlOld()

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

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 1724 of file Coupleable.C.

1725 {
1726  const auto * var = getVectorVar(var_name, comp);
1727  if (!var)
1728  {
1730  return _default_vector_curl;
1731  }
1733 
1734  if (!_coupleable_neighbor)
1735  return (_c_is_implicit) ? var->curlSlnOld() : var->curlSlnOlder();
1736  return (_c_is_implicit) ? var->curlSlnOldNeighbor() : var->curlSlnOlderNeighbor();
1737 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1515
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledCurlOlder()

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

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 1740 of file Coupleable.C.

1741 {
1742  const auto * var = getVectorVar(var_name, comp);
1743  if (!var)
1744  {
1746  return _default_vector_curl;
1747  }
1749 
1750  if (!_coupleable_neighbor)
1751  return var->curlSlnOlder();
1752  return var->curlSlnOlderNeighbor();
1753 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1515
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDiv()

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

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 1773 of file Coupleable.C.

1774 {
1775  const auto * var = getVectorVar(var_name, comp);
1776  if (!var)
1777  {
1779  return _default_div;
1780  }
1782 
1783  if (!_coupleable_neighbor)
1784  return (_c_is_implicit) ? var->divSln() : var->divSlnOld();
1785  return (_c_is_implicit) ? var->divSlnNeighbor() : var->divSlnOldNeighbor();
1786 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1518
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDivOld()

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

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 1789 of file Coupleable.C.

1790 {
1791  const auto * var = getVectorVar(var_name, comp);
1792  if (!var)
1793  {
1795  return _default_div;
1796  }
1798 
1799  if (!_coupleable_neighbor)
1800  return (_c_is_implicit) ? var->divSlnOld() : var->divSlnOlder();
1801  return (_c_is_implicit) ? var->divSlnOldNeighbor() : var->divSlnOlderNeighbor();
1802 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1518
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDivOlder()

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

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 1805 of file Coupleable.C.

1806 {
1807  const auto * var = getVectorVar(var_name, comp);
1808  if (!var)
1809  {
1811  return _default_div;
1812  }
1814 
1815  if (!_coupleable_neighbor)
1816  return var->divSlnOlder();
1817  return var->divSlnOlderNeighbor();
1818 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1518
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDofValues()

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

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 2025 of file Coupleable.C.

Referenced by Coupleable::coupledAllDofValues().

2026 {
2027  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2028  if (!var)
2029  return *getDefaultValue(var_name, comp);
2031 
2032  if (!_coupleable_neighbor)
2033  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2034  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2035 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
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:333
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledDofValuesOld()

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

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 2045 of file Coupleable.C.

Referenced by Coupleable::coupledAllDofValuesOld().

2046 {
2047  const auto * var = getVar(var_name, comp);
2048  if (!var)
2049  return *getDefaultValue(var_name, comp);
2051 
2052  if (!_coupleable_neighbor)
2053  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
2054  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
2055 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
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:333
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledDofValuesOlder()

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

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 2065 of file Coupleable.C.

Referenced by Coupleable::coupledAllDofValuesOlder().

2066 {
2067  const auto * var = getVar(var_name, comp);
2068  if (!var)
2069  return *getDefaultValue(var_name, comp);
2071 
2072  if (!_coupleable_neighbor)
2073  return var->dofValuesOlder();
2074  return var->dofValuesOlderNeighbor();
2075 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
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:333
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledDot()

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

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< RT >, AuxKernelTempl< RealVectorValue >, and AuxKernelTempl< Real >.

Definition at line 1138 of file Coupleable.C.

Referenced by AuxKernelTempl< Real >::coupledDot(), and Coupleable::coupledDots().

1139 {
1140  const auto * var = getVar(var_name, comp);
1141  if (!var)
1142  {
1144  return _default_value_zero;
1145  }
1147 
1148  if (!_coupleable_neighbor)
1149  {
1150  if (_c_nodal)
1151  return var->dofValuesDot();
1152  return var->uDot();
1153  }
1154  else
1155  {
1156  if (_c_nodal)
1157  return var->dofValuesDotNeighbor();
1158  return var->uDotNeighbor();
1159  }
1160 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDotDot()

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

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 1163 of file Coupleable.C.

1164 {
1165  const auto * var = getVar(var_name, comp);
1166  if (!var)
1167  {
1169  return _default_value_zero;
1170  }
1172 
1173  if (!_coupleable_neighbor)
1174  {
1175  if (_c_nodal)
1176  return var->dofValuesDotDot();
1177  return var->uDotDot();
1178  }
1179  else
1180  {
1181  if (_c_nodal)
1182  return var->dofValuesDotDotNeighbor();
1183  return var->uDotDotNeighbor();
1184  }
1185 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDotDotDu()

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

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 1461 of file Coupleable.C.

1462 {
1463  const auto * var = getVar(var_name, comp);
1464  if (!var)
1465  {
1467  return _default_value_zero;
1468  }
1470 
1471  if (!_coupleable_neighbor)
1472  {
1473  if (_c_nodal)
1474  return var->dofValuesDuDotDotDu();
1475  return var->duDotDotDu();
1476  }
1477  else
1478  {
1479  if (_c_nodal)
1480  return var->dofValuesDuDotDotDuNeighbor();
1481  return var->duDotDotDuNeighbor();
1482  }
1483 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDotDotOld()

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

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 1227 of file Coupleable.C.

1228 {
1229  const auto * var = getVar(var_name, comp);
1230  if (!var)
1231  {
1233  return _default_value_zero;
1234  }
1236 
1237  if (!_coupleable_neighbor)
1238  {
1239  if (_c_nodal)
1240  return var->dofValuesDotDotOld();
1241  return var->uDotDotOld();
1242  }
1243  else
1244  {
1245  if (_c_nodal)
1246  return var->dofValuesDotDotOldNeighbor();
1247  return var->uDotDotOldNeighbor();
1248  }
1249 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDotDu()

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

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< RT >, AuxKernelTempl< RealVectorValue >, and AuxKernelTempl< Real >.

Definition at line 1436 of file Coupleable.C.

Referenced by AuxKernelTempl< Real >::coupledDotDu().

1437 {
1438  const auto * var = getVar(var_name, comp);
1439  if (!var)
1440  {
1442  return _default_value_zero;
1443  }
1445 
1446  if (!_coupleable_neighbor)
1447  {
1448  if (_c_nodal)
1449  return var->dofValuesDuDotDu();
1450  return var->duDotDu();
1451  }
1452  else
1453  {
1454  if (_c_nodal)
1455  return var->dofValuesDuDotDuNeighbor();
1456  return var->duDotDuNeighbor();
1457  }
1458 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDotOld()

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

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 1202 of file Coupleable.C.

1203 {
1204  const auto * var = getVar(var_name, comp);
1205  if (!var)
1206  {
1208  return _default_value_zero;
1209  }
1211 
1212  if (!_coupleable_neighbor)
1213  {
1214  if (_c_nodal)
1215  return var->dofValuesDotOld();
1216  return var->uDotOld();
1217  }
1218  else
1219  {
1220  if (_c_nodal)
1221  return var->dofValuesDotOldNeighbor();
1222  return var->uDotOldNeighbor();
1223  }
1224 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledDots()

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

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 2745 of file Coupleable.C.

2746 {
2747  auto func = [this, &var_name](unsigned int comp) { return &coupledDot(var_name, comp); };
2748  return coupledVectorHelper<const VariableValue *>(var_name, func);
2749 }
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable.
Definition: Coupleable.C:1138

◆ coupledGenericDofValue() [1/3]

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

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

◆ coupledGenericDofValue() [2/3]

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

Definition at line 587 of file Coupleable.C.

588 {
589  return coupledDofValues(var_name, comp);
590 }
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.
Definition: Coupleable.C:2025

◆ coupledGenericDofValue() [3/3]

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

Definition at line 594 of file Coupleable.C.

595 {
596  return adCoupledDofValues(var_name, comp);
597 }
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.
Definition: Coupleable.C:2099

◆ coupledGenericDot() [1/3]

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

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

◆ coupledGenericDot() [2/3]

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

Definition at line 2760 of file Coupleable.C.

2761 {
2762  return coupledDot(var_name, comp);
2763 }
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable.
Definition: Coupleable.C:1138

◆ coupledGenericDot() [3/3]

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

Definition at line 2767 of file Coupleable.C.

2768 {
2769  return adCoupledDot(var_name, comp);
2770 }
const ADVariableValue & adCoupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable for ad simulations.
Definition: Coupleable.C:2249

◆ coupledGenericDotDot() [1/3]

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

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

◆ coupledGenericDotDot() [2/3]

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

Definition at line 1189 of file Coupleable.C.

1190 {
1191  return coupledDotDot(var_name, comp);
1192 }
virtual const VariableValue & coupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable.
Definition: Coupleable.C:1163

◆ coupledGenericDotDot() [3/3]

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

Definition at line 1196 of file Coupleable.C.

1197 {
1198  return adCoupledDotDot(var_name, comp);
1199 }
const ADVariableValue & adCoupledDotDot(const std::string &var_name, unsigned int comp=0) const
Second time derivative of a coupled variable for ad simulations.
Definition: Coupleable.C:2272

◆ coupledGenericGradient() [1/3]

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

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

◆ coupledGenericGradient() [2/3]

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

Definition at line 2462 of file Coupleable.C.

2463 {
2464  return coupledGradient(var_name, comp);
2465 }
virtual const VariableGradient & coupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable.
Definition: Coupleable.C:1511

◆ coupledGenericGradient() [3/3]

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

Definition at line 2469 of file Coupleable.C.

2470 {
2471  return adCoupledGradient(var_name, comp);
2472 }
const ADVariableGradient & adCoupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for use in Automatic Differentiation.
Definition: Coupleable.C:2190

◆ coupledGenericGradients() [1/3]

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

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<false> *> Coupleable::coupledGenericGradients ( const std::string &  var_name) const
protectedinherited

Definition at line 2717 of file Coupleable.C.

2718 {
2719  return coupledGradients(var_name);
2720 }
std::vector< const VariableGradient * > coupledGradients(const std::string &var_name) const
Returns the gradients for all of a coupled variable&#39;s components.
Definition: Coupleable.C:2709

◆ coupledGenericGradients() [3/3]

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

Definition at line 2724 of file Coupleable.C.

2725 {
2726  auto func = [this, &var_name](unsigned int comp) { return &adCoupledGradient(var_name, comp); };
2727  return coupledVectorHelper<const GenericVariableGradient<true> *>(var_name, func);
2728 }
const ADVariableGradient & adCoupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable for use in Automatic Differentiation.
Definition: Coupleable.C:2190

◆ coupledGenericScalarValue() [1/3]

template<bool is_ad>
const GenericVariableValue<is_ad>& ScalarCoupleable::coupledGenericScalarValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

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

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

◆ coupledGenericScalarValue() [2/3]

template<>
const GenericVariableValue<false>& ScalarCoupleable::coupledGenericScalarValue ( const std::string &  var_name,
const unsigned int  comp 
) const
protectedinherited

Definition at line 152 of file ScalarCoupleable.C.

154 {
155  return coupledScalarValue(var_name, comp);
156 }
const VariableValue & coupledScalarValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a scalar coupled variable.

◆ coupledGenericScalarValue() [3/3]

template<>
const GenericVariableValue<true>& ScalarCoupleable::coupledGenericScalarValue ( const std::string &  var_name,
const unsigned int  comp 
) const
protectedinherited

Definition at line 160 of file ScalarCoupleable.C.

162 {
163  return adCoupledScalarValue(var_name, comp);
164 }
const ADVariableValue & adCoupledScalarValue(const std::string &var_name, unsigned int comp=0) const
Returns AD value of a scalar coupled variable.

◆ coupledGenericValue() [1/3]

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

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

◆ coupledGenericValue() [2/3]

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

Definition at line 468 of file Coupleable.C.

469 {
470  return coupledValue(var_name, comp);
471 }
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable.
Definition: Coupleable.C:495

◆ coupledGenericValue() [3/3]

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

Definition at line 475 of file Coupleable.C.

476 {
477  return adCoupledValue(var_name, comp);
478 }
const ADVariableValue & adCoupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable for use in Automatic Differentiation.
Definition: Coupleable.C:2152

◆ coupledGenericValues() [1/3]

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

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
protectedinherited

Definition at line 2521 of file Coupleable.C.

2522 {
2523  return coupledValues(var_name);
2524 }
std::vector< const VariableValue * > coupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable components.
Definition: Coupleable.C:2506

◆ coupledGenericValues() [3/3]

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

Definition at line 2528 of file Coupleable.C.

2529 {
2530  return adCoupledValues(var_name);
2531 }
std::vector< const ADVariableValue * > adCoupledValues(const std::string &var_name) const
Returns the values for all of a coupled variable&#39;s components for use in Automatic Differentiation...
Definition: Coupleable.C:2534

◆ coupledGenericVectorValue() [1/3]

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

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

◆ coupledGenericVectorValue() [2/3]

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

Definition at line 482 of file Coupleable.C.

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

◆ coupledGenericVectorValue() [3/3]

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

Definition at line 489 of file Coupleable.C.

490 {
491  return adCoupledVectorValue(var_name, comp);
492 }
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.
Definition: Coupleable.C:2305

◆ coupledGradient()

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

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 1511 of file Coupleable.C.

Referenced by Coupleable::coupledGradients(), and NodeFaceConstraint::coupledSecondaryGradient().

1512 {
1513  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
1514  if (!var)
1515  {
1517  return _default_gradient;
1518  }
1520 
1521  if (!_coupleable_neighbor)
1522  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1523  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1524 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1466
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledGradientDot()

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

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 1576 of file Coupleable.C.

1577 {
1578  const auto * var = getVar(var_name, comp);
1579  if (!var)
1580  {
1582  return _default_gradient;
1583  }
1585 
1586  if (!_coupleable_neighbor)
1587  return var->gradSlnDot();
1588  return var->gradSlnNeighborDot();
1589 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1466
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledGradientDotDot()

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

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 1592 of file Coupleable.C.

1593 {
1594  const auto * var = getVar(var_name, comp);
1595  if (!var)
1596  {
1598  return _default_gradient;
1599  }
1601 
1602  if (!_coupleable_neighbor)
1603  return var->gradSlnDotDot();
1604  return var->gradSlnNeighborDotDot();
1605 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1466
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledGradientOld()

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

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 1527 of file Coupleable.C.

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

1528 {
1529  const auto * var = getVar(var_name, comp);
1530  if (!var)
1531  {
1533  return _default_gradient;
1534  }
1536 
1537  if (!_coupleable_neighbor)
1538  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1539  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1540 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1466
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledGradientOlder()

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

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 1543 of file Coupleable.C.

Referenced by NodeFaceConstraint::coupledSecondaryGradientOlder().

1544 {
1545  const auto * var = getVar(var_name, comp);
1546  if (!var)
1547  {
1549  return _default_gradient;
1550  }
1552 
1553  if (!_coupleable_neighbor)
1554  return var->gradSlnOlder();
1555  return var->gradSlnOlderNeighbor();
1556 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1466
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledGradientPreviousNL()

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

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 1559 of file Coupleable.C.

1560 {
1561  const auto * var = getVar(var_name, comp);
1563  if (!var)
1564  {
1566  return _default_gradient;
1567  }
1569 
1570  if (!_coupleable_neighbor)
1571  return var->gradSlnPreviousNL();
1572  return var->gradSlnPreviousNLNeighbor();
1573 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1466
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledGradients()

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

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 2709 of file Coupleable.C.

2710 {
2711  auto func = [this, &var_name](unsigned int comp) { return &coupledGradient(var_name, comp); };
2712  return coupledVectorHelper<const VariableGradient *>(var_name, func);
2713 }
virtual const VariableGradient & coupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable.
Definition: Coupleable.C:1511

◆ coupledGradientsOld()

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

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 2738 of file Coupleable.C.

2739 {
2740  auto func = [this, &var_name](unsigned int comp) { return &coupledGradientOld(var_name, comp); };
2741  return coupledVectorHelper<const VariableGradient *>(var_name, func);
2742 }
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.
Definition: Coupleable.C:1527

◆ coupledIndices()

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

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 2475 of file Coupleable.C.

2476 {
2477  auto func = [this, &var_name](unsigned int comp) { return coupled(var_name, comp); };
2478  return coupledVectorHelper<unsigned int>(var_name, func);
2479 }
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:440

◆ coupledMatrixTagScalarValue()

const VariableValue & ScalarCoupleable::coupledMatrixTagScalarValue ( const std::string &  var_name,
TagID  tag,
unsigned int  comp = 0 
) const
protectedinherited

Returns value of a scalar coupled variable.

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

Definition at line 202 of file ScalarCoupleable.C.

205 {
206  checkVar(var_name);
207  if (!isCoupledScalar(var_name, comp))
208  return *getDefaultValue(var_name);
209 
210  _sc_coupleable_matrix_tags.insert(tag);
211 
212  return getScalarVar(var_name, comp)->matrixTagSln(tag);
213 }
std::set< TagID > _sc_coupleable_matrix_tags
The scalar coupleable matrix tags.
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
const VariableValue & matrixTagSln(TagID tag) const
const VariableValue * getDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable...

◆ coupledMatrixTagValue() [1/2]

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

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 789 of file Coupleable.C.

Referenced by Coupleable::coupledMatrixTagValue(), and Coupleable::coupledMatrixTagValues().

792 {
793  const auto * var = getVarHelper<MooseVariableField<Real>>(var_names, index);
794  if (!var)
795  mooseError(var_names, ": invalid variable name for coupledMatrixTagValue");
797 
798  const_cast<Coupleable *>(this)->addFEVariableCoupleableMatrixTag(tag);
799 
800  if (_c_nodal)
801  return var->nodalMatrixTagValue(tag);
802  return var->matrixTagValue(tag);
803 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:45
void addFEVariableCoupleableMatrixTag(TagID tag)
Definition: Coupleable.h:104

◆ coupledMatrixTagValue() [2/2]

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

Definition at line 806 of file Coupleable.C.

809 {
810  if (!_c_parameters.isParamValid(tag_name))
811  mooseError("Tag name parameter '", tag_name, "' is invalid");
812 
813  TagName tagname = _c_parameters.get<TagName>(tag_name);
814  if (!_c_fe_problem.matrixTagExists(tagname))
815  mooseError("Matrix tag name '", tagname, "' does not exist");
816 
817  TagID tag = _c_fe_problem.getMatrixTagID(tagname);
818  return coupledMatrixTagValue(var_names, tag, index);
819 }
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
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:789
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual TagID getMatrixTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:342
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledMatrixTagValues() [1/2]

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

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 2664 of file Coupleable.C.

Referenced by Coupleable::coupledMatrixTagValues().

2665 {
2666  auto func = [this, &var_names, &tag](unsigned int comp)
2667  { return &coupledMatrixTagValue(var_names, tag, comp); };
2668  return coupledVectorHelper<const VariableValue *>(var_names, func);
2669 }
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:789

◆ coupledMatrixTagValues() [2/2]

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

Definition at line 2672 of file Coupleable.C.

2674 {
2675  if (!_c_parameters.isParamValid(tag_name))
2676  mooseError("Tag name parameter '", tag_name, "' is invalid");
2677 
2678  TagName tagname = _c_parameters.get<TagName>(tag_name);
2679  if (!_c_fe_problem.matrixTagExists(tagname))
2680  mooseError("Matrix tag name '", tagname, "' does not exist");
2681 
2682  TagID tag = _c_fe_problem.getMatrixTagID(tagname);
2683  return coupledMatrixTagValues(var_names, tag);
2684 }
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual TagID getMatrixTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:342
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...
Definition: Coupleable.C:2664
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition: SubProblem.C:328
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledName()

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

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 2482 of file Coupleable.C.

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

2483 {
2484  if (getFieldVar(var_name, comp))
2485  return getFieldVar(var_name, comp)->name();
2486  // Detect if we are in the case where a constant was passed in lieu of a variable
2487  else if (isCoupledConstant(var_name))
2489  ": a variable name was queried but a constant was passed for parameter '",
2490  var_name,
2491  "Either pass a true variable or contact a developer to shield the call to "
2492  "'coupledName' with 'isCoupledConstant'");
2493  else
2494  mooseError(
2495  _c_name, ": Variable '", var_name, "' does not exist, yet its coupled name is requested");
2496 }
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:150
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & name() const override
Get the variable name.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
Definition: Coupleable.C:280

◆ coupledNames()

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

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 2499 of file Coupleable.C.

2500 {
2501  auto func = [this, &var_name](unsigned int comp) { return coupledName(var_name, comp); };
2502  return coupledVectorHelper<VariableName>(var_name, func);
2503 }
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
Names of the variable in the Coupleable interface.
Definition: Coupleable.C:2482

◆ coupledNodalDot()

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

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 1963 of file Coupleable.C.

1964 {
1965  static const T zero = 0;
1966  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1967  if (!var)
1968  return zero;
1970 
1971  if (!_coupleable_neighbor)
1972  return var->nodalValueDot();
1973  mooseError("Neighbor version not implemented");
1974 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const Number zero
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledNodalDotDot()

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

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 1977 of file Coupleable.C.

1978 {
1979  const auto * var = getVar(var_name, comp);
1980  if (!var)
1981  {
1983  return _default_value_zero;
1984  }
1986 
1987  if (!_coupleable_neighbor)
1988  return var->dofValuesDotDot();
1989  return var->dofValuesDotDotNeighbor();
1990 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledNodalDotDotOld()

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

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 2009 of file Coupleable.C.

2010 {
2011  const auto * var = getVar(var_name, comp);
2012  if (!var)
2013  {
2015  return _default_value_zero;
2016  }
2018 
2019  if (!_coupleable_neighbor)
2020  return var->dofValuesDotDotOld();
2021  return var->dofValuesDotDotOldNeighbor();
2022 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledNodalDotOld()

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

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 1993 of file Coupleable.C.

1994 {
1995  const auto * var = getVar(var_name, comp);
1996  if (!var)
1997  {
1999  return _default_value_zero;
2000  }
2002 
2003  if (!_coupleable_neighbor)
2004  return var->dofValuesDotOld();
2005  return var->dofValuesDotOldNeighbor();
2006 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledNodalValue()

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

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 1887 of file Coupleable.C.

1888 {
1889  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1890  if (!var)
1891  return getDefaultNodalValue<T>(var_name, comp);
1893 
1894  if (!var->isNodal())
1896  ": Trying to get nodal values of variable '",
1897  var->name(),
1898  "', but it is not nodal.");
1899 
1900  if (!_coupleable_neighbor)
1901  return (_c_is_implicit) ? var->nodalValue() : var->nodalValueOld();
1902  return (_c_is_implicit) ? var->nodalValueNeighbor() : var->nodalValueOldNeighbor();
1903 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledNodalValueOld()

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

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 1907 of file Coupleable.C.

1908 {
1909  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1910  if (!var)
1911  return getDefaultNodalValue<T>(var_name, comp);
1913 
1914  if (!var->isNodal())
1916  ": Trying to get old nodal values of variable '",
1917  var->name(),
1918  "', but it is not nodal.");
1919 
1920  if (!_coupleable_neighbor)
1921  return (_c_is_implicit) ? var->nodalValueOld() : var->nodalValueOlder();
1922  return (_c_is_implicit) ? var->nodalValueOldNeighbor() : var->nodalValueOlderNeighbor();
1923 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledNodalValueOlder()

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

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 1927 of file Coupleable.C.

1928 {
1929  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1930  if (!var)
1931  return getDefaultNodalValue<T>(var_name, comp);
1933 
1934  if (!var->isNodal())
1936  ": Trying to get older nodal values of variable '",
1937  var->name(),
1938  "', but it is not nodal.");
1939 
1940  if (!_coupleable_neighbor)
1941  return var->nodalValueOlder();
1942  return var->nodalValueOlderNeighbor();
1943 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledNodalValuePreviousNL()

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

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 1947 of file Coupleable.C.

1948 {
1949  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1950  if (!var)
1951  return getDefaultNodalValue<T>(var_name, comp);
1953 
1955 
1956  if (!_coupleable_neighbor)
1957  return var->nodalValuePreviousNL();
1958  return var->nodalValuePreviousNLNeighbor();
1959 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledScalar()

unsigned int ScalarCoupleable::coupledScalar ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the index for a scalar coupled variable by name.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Index of coupled variable

Definition at line 93 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

94 {
95  checkVar(var_name);
96  return getScalarVar(var_name, comp)->number();
97 }
unsigned int number() const
Get variable number coming from libMesh.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ coupledScalarComponents()

unsigned int ScalarCoupleable::coupledScalarComponents ( const std::string &  var_name) const
protectedinherited

Return the number of components to the coupled scalar variable.

Parameters
var_nameThe of the coupled variable

Definition at line 353 of file ScalarCoupleable.C.

354 {
355  const auto var_name = _sc_parameters.checkForRename(var_name_in);
356 
357  const auto it = _coupled_scalar_vars.find(var_name);
358  if (it != _coupled_scalar_vars.end())
359  return it->second.size();
360 
361  mooseError(_sc_name, ": Trying to get a non-existent variable '", var_name, "'");
362 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _sc_name
The name of the object this interface is part of.
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.
const InputParameters & _sc_parameters
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ coupledScalarDot()

const VariableValue & ScalarCoupleable::coupledScalarDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the time derivative of a scalar coupled variable.

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

Definition at line 244 of file ScalarCoupleable.C.

245 {
246  checkVar(var_name);
247  validateExecutionerType(var_name, "coupledScalarDot");
248  return getScalarVar(var_name, comp)->uDot();
249 }
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...
const VariableValue & uDot() const
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ coupledScalarDotDot()

const VariableValue & ScalarCoupleable::coupledScalarDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the second time derivative of a scalar coupled variable.

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

Definition at line 260 of file ScalarCoupleable.C.

261 {
262  checkVar(var_name);
263  validateExecutionerType(var_name, "coupledScalarDotDot");
264  return getScalarVar(var_name, comp)->uDotDot();
265 }
const VariableValue & uDotDot() const
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...
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ coupledScalarDotDotDu()

const VariableValue & ScalarCoupleable::coupledScalarDotDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Second time derivative of a scalar 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 292 of file ScalarCoupleable.C.

293 {
294  checkVar(var_name);
295  validateExecutionerType(var_name, "coupledScalarDotDotDu");
296  return getScalarVar(var_name, comp)->duDotDotDu();
297 }
const VariableValue & duDotDotDu() const
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...
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ coupledScalarDotDotOld()

const VariableValue & ScalarCoupleable::coupledScalarDotDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the old second time derivative of a scalar coupled variable.

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

Definition at line 276 of file ScalarCoupleable.C.

278 {
279  checkVar(var_name);
280  validateExecutionerType(var_name, "coupledScalarDotDotOld");
281  return getScalarVar(var_name, comp)->uDotDotOld();
282 }
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...
const VariableValue & uDotDotOld() const
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ coupledScalarDotDu()

const VariableValue & ScalarCoupleable::coupledScalarDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Time derivative of a scalar 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 284 of file ScalarCoupleable.C.

285 {
286  checkVar(var_name);
287  validateExecutionerType(var_name, "coupledScalarDotDu");
288  return getScalarVar(var_name, comp)->duDotDu();
289 }
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...
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
const VariableValue & duDotDu() const

◆ coupledScalarDotOld()

const VariableValue & ScalarCoupleable::coupledScalarDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the old time derivative of a scalar coupled variable.

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

Definition at line 268 of file ScalarCoupleable.C.

269 {
270  checkVar(var_name);
271  validateExecutionerType(var_name, "coupledScalarDotOld");
272  return getScalarVar(var_name, comp)->uDotOld();
273 }
const VariableValue & uDotOld() const
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...
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ coupledScalarOrder()

Order ScalarCoupleable::coupledScalarOrder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the order for a scalar coupled variable by name.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Order of coupled variable

Definition at line 100 of file ScalarCoupleable.C.

101 {
102  checkVar(var_name);
103  if (!isCoupledScalar(var_name, comp))
105 
106  return getScalarVar(var_name, comp)->order();
107 }
FEProblemBase & _sc_fe_problem
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
libMesh::Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
libMesh::Order getMaxScalarOrder() const

◆ coupledScalarValue()

const VariableValue & ScalarCoupleable::coupledScalarValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns value of a scalar 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 124 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

125 {
126  checkVar(var_name);
127  if (!isCoupledScalar(var_name, comp))
128  return *getDefaultValue(var_name);
129 
130  auto var = getScalarVar(var_name, comp);
131  return _sc_is_implicit ? var->sln() : var->slnOld();
132 }
const bool _sc_is_implicit
True if implicit value is required.
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
const VariableValue * getDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable...

◆ coupledScalarValueOld()

const VariableValue & ScalarCoupleable::coupledScalarValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the old (previous time step) value of a scalar coupled variable.

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

Definition at line 216 of file ScalarCoupleable.C.

217 {
218  checkVar(var_name);
219  if (!isCoupledScalar(var_name, comp))
220  return *getDefaultValue(var_name);
221 
222  validateExecutionerType(var_name, "coupledScalarValueOld");
223  auto var = getScalarVar(var_name, comp);
224  return _sc_is_implicit ? var->slnOld() : var->slnOlder();
225 }
const bool _sc_is_implicit
True if implicit value is required.
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...
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
const VariableValue * getDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable...

◆ coupledScalarValueOlder()

const VariableValue & ScalarCoupleable::coupledScalarValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
protectedinherited

Returns the older (two time steps previous) value of a scalar coupled variable.

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

Definition at line 228 of file ScalarCoupleable.C.

230 {
231  checkVar(var_name);
232  if (!isCoupledScalar(var_name, comp))
233  return *getDefaultValue(var_name);
234 
235  validateExecutionerType(var_name, "coupledScalarValueOlder");
236  auto var = getScalarVar(var_name, comp);
237  if (_sc_is_implicit)
238  return var->slnOlder();
239  else
240  mooseError("Older values not available for explicit schemes");
241 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const bool _sc_is_implicit
True if implicit value is required.
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...
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
const VariableValue * getDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable...

◆ coupledSecond()

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

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 1821 of file Coupleable.C.

Referenced by NodeFaceConstraint::coupledSecondarySecond().

1822 {
1823  const auto * var = getVar(var_name, comp);
1824  if (!var)
1825  {
1827  return _default_second;
1828  }
1830 
1831  if (!_coupleable_neighbor)
1832  return (_c_is_implicit) ? var->secondSln() : var->secondSlnOlder();
1833  return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOlderNeighbor();
1834 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1475
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledSecondOld()

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

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 1837 of file Coupleable.C.

1838 {
1839  const auto * var = getVar(var_name, comp);
1840  if (!var)
1841  {
1843  return _default_second;
1844  }
1846 
1847  if (!_coupleable_neighbor)
1848  return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
1849  return (_c_is_implicit) ? var->secondSlnOldNeighbor() : var->secondSlnOlderNeighbor();
1850 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1475
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledSecondOlder()

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

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 1853 of file Coupleable.C.

1854 {
1855  const auto * var = getVar(var_name, comp);
1856  if (!var)
1857  {
1859  return _default_second;
1860  }
1862 
1863  if (!_coupleable_neighbor)
1864  return var->secondSlnOlder();
1865  return var->secondSlnOlderNeighbor();
1866 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1475
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledSecondPreviousNL()

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

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 1869 of file Coupleable.C.

1870 {
1871  const auto * var = getVar(var_name, comp);
1873  if (!var)
1874  {
1876  return _default_second;
1877  }
1879 
1880  if (!_coupleable_neighbor)
1881  return var->secondSlnPreviousNL();
1882  return var->secondSlnPreviousNLNeighbor();
1883 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1475
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledValue()

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

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 495 of file Coupleable.C.

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

496 {
497  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
498  if (!var)
499  return *getDefaultValue(var_name, comp);
501 
503  {
504  if (_c_nodal)
505  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
506  else
507  return (_c_is_implicit) ? var->sln() : var->slnOld();
508  }
509  else
510  {
511  if (_c_nodal)
512  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
513  else
514  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
515  }
516 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
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:333
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledValueByName()

const VariableValue & CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName ( const std::string &  var_name)
virtual

Returns value of a coupled variable give the variable name.

Parameters
var_nameName of coupled variable
Returns
Reference to a VariableValue for the coupled variable

Definition at line 27 of file CoupleableMooseVariableDependencyIntermediateInterface.C.

29 {
32  _coupled_moose_vars.push_back(moose_var);
34  _coupled_standard_moose_vars.push_back(var);
35 
36  addMooseVariableDependency(moose_var);
37 
39  {
40  if (_c_nodal)
41  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
42  else
43  return (_c_is_implicit) ? var->sln() : var->slnOld();
44  }
45  else
46  {
47  if (_c_nodal)
48  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
49  else
50  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
51  }
52 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
const FieldVariableValue & slnNeighbor() const override
neighbor solutions
THREAD_ID _c_tid
Thread ID of the thread using this object.
Definition: Coupleable.h:1439
This class provides an interface for common operations on field variables of both FE and FV types wit...
const DoFValue & dofValuesNeighbor() const override
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 override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Definition: Coupleable.h:1415
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
const FieldVariableValue & sln() const override
element solutions
const DoFValue & dofValuesOld() const override
const DoFValue & dofValuesOldNeighbor() const override
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariable which may be in any system.
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
Definition: Coupleable.h:1412
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
const DoFValue & dofValues() const override
dof values getters
const FieldVariableValue & slnOld() const override
const FieldVariableValue & slnOldNeighbor() const override

◆ coupledValueLower()

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

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 600 of file Coupleable.C.

601 {
602  const auto * var = getVar(var_name, comp);
603  if (!var)
604  return *getDefaultValue(var_name, comp);
606 
608  mooseError(_c_name, ":coupledValueLower cannot be called in a coupleable neighbor object");
609 
610  if (_c_nodal)
611  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
612  else
613  return (_c_is_implicit) ? var->slnLower() : var->slnLowerOld();
614 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
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:333
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledValueOld()

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

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 999 of file Coupleable.C.

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

1000 {
1001  const auto * var = getVar(var_name, comp);
1002  if (!var)
1003  return *getDefaultValue(var_name, comp);
1005 
1006  if (!_coupleable_neighbor)
1007  {
1008  if (_c_nodal)
1009  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1010  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1011  }
1012  else
1013  {
1014  if (_c_nodal)
1015  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1016  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1017  }
1018 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
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:333
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledValueOlder()

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

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 1021 of file Coupleable.C.

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

1022 {
1023  const auto * var = getVar(var_name, comp);
1024  if (!var)
1025  return *getDefaultValue(var_name, comp);
1027 
1028  if (!_coupleable_neighbor)
1029  {
1030  if (_c_nodal)
1031  return var->dofValuesOlder();
1032  return var->slnOlder();
1033  }
1034  else
1035  {
1036  if (_c_nodal)
1037  return var->dofValuesOlderNeighbor();
1038  return var->slnOlderNeighbor();
1039  }
1040 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
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:333
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledValuePreviousNL()

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

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 1043 of file Coupleable.C.

1044 {
1045  const auto * var = getVar(var_name, comp);
1046  if (!var)
1047  return *getDefaultValue(var_name, comp);
1049 
1051  if (!_coupleable_neighbor)
1052  {
1053  if (_c_nodal)
1054  return var->dofValuesPreviousNL();
1055  return var->slnPreviousNL();
1056  }
1057  else
1058  {
1059  if (_c_nodal)
1060  return var->dofValuesPreviousNLNeighbor();
1061  return var->slnPreviousNLNeighbor();
1062  }
1063 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
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:333
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledValues()

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

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 2506 of file Coupleable.C.

2507 {
2508  auto func = [this, &var_name](unsigned int comp) { return &coupledValue(var_name, comp); };
2509  return coupledVectorHelper<const VariableValue *>(var_name, func);
2510 }
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable.
Definition: Coupleable.C:495

◆ coupledValuesOld()

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

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 2687 of file Coupleable.C.

2688 {
2689  auto func = [this, &var_name](unsigned int comp) { return &coupledValueOld(var_name, comp); };
2690  return coupledVectorHelper<const VariableValue *>(var_name, func);
2691 }
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.
Definition: Coupleable.C:999

◆ coupledValuesOlder()

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

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 2694 of file Coupleable.C.

2695 {
2696  auto func = [this, &var_name](unsigned int comp) { return &coupledValueOlder(var_name, comp); };
2697  return coupledVectorHelper<const VariableValue *>(var_name, func);
2698 }
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.
Definition: Coupleable.C:1021

◆ coupledVectorDot()

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

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 1252 of file Coupleable.C.

1253 {
1254  const auto * var = getVectorVar(var_name, comp);
1255  if (!var)
1256  {
1259  }
1261 
1262  if (!_coupleable_neighbor)
1263  return var->uDot();
1264  return var->uDotNeighbor();
1265 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1509
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorDotDot()

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

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 1268 of file Coupleable.C.

1269 {
1270  const auto * var = getVectorVar(var_name, comp);
1271  if (!var)
1272  {
1275  }
1277 
1278  if (!_coupleable_neighbor)
1279  return var->uDotDot();
1280  return var->uDotDotNeighbor();
1281 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1509
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorDotDotDu()

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

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 1332 of file Coupleable.C.

1333 {
1334  const auto * var = getVectorVar(var_name, comp);
1335  if (!var)
1336  {
1338  return _default_value_zero;
1339  }
1341 
1342  if (!_coupleable_neighbor)
1343  return var->duDotDotDu();
1344  return var->duDotDotDuNeighbor();
1345 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorDotDotOld()

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

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 1300 of file Coupleable.C.

1301 {
1302  const auto * var = getVectorVar(var_name, comp);
1303  if (!var)
1304  {
1307  }
1309 
1310  if (!_coupleable_neighbor)
1311  return var->uDotDotOld();
1312  return var->uDotDotOldNeighbor();
1313 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1509
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorDotDu()

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

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 1316 of file Coupleable.C.

1317 {
1318  const auto * var = getVectorVar(var_name, comp);
1319  if (!var)
1320  {
1322  return _default_value_zero;
1323  }
1325 
1326  if (!_coupleable_neighbor)
1327  return var->duDotDu();
1328  return var->duDotDuNeighbor();
1329 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1463
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorDotOld()

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

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 1284 of file Coupleable.C.

1285 {
1286  const auto * var = getVectorVar(var_name, comp);
1287  if (!var)
1288  {
1291  }
1293 
1294  if (!_coupleable_neighbor)
1295  return var->uDotOld();
1296  return var->uDotOldNeighbor();
1297 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1509
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorGradient()

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

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 1608 of file Coupleable.C.

1609 {
1610  const auto * var = getVectorVar(var_name, comp);
1611  if (!var)
1612  {
1614  return _default_vector_gradient;
1615  }
1617 
1618  if (!_coupleable_neighbor)
1619  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1620  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1621 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1512
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorGradientOld()

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

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 1624 of file Coupleable.C.

1625 {
1626  const auto * var = getVectorVar(var_name, comp);
1627  if (!var)
1628  {
1630  return _default_vector_gradient;
1631  }
1633 
1634  if (!_coupleable_neighbor)
1635  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1636  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1637 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1512
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorGradientOlder()

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

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 1640 of file Coupleable.C.

1641 {
1642  const auto * var = getVectorVar(var_name, comp);
1643  if (!var)
1644  {
1646  return _default_vector_gradient;
1647  }
1649 
1650  if (!_coupleable_neighbor)
1651  return var->gradSlnOlder();
1652  return var->gradSlnOlderNeighbor();
1653 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1512
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ coupledVectorHelper()

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

Definition at line 1692 of file Coupleable.h.

1693  {
1694  const auto components = coupledComponents(var_name);
1695  std::vector<T> vals(components);
1696  for (MooseIndex(components) comp = 0; comp < components; ++comp)
1697  vals[comp] = func(comp);
1698  return vals;
1699  }
unsigned int coupledComponents(const std::string &var_name) const
Number of coupled components.
Definition: Coupleable.C:156

◆ coupledVectorTagArrayDofValue()

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

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 781 of file Coupleable.C.

784 {
785  return vectorTagDofValueHelper<RealEigenVector>(var_name, tag_name, comp);
786 }

◆ coupledVectorTagArrayGradient() [1/2]

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

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 687 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagArrayGradient(), and Coupleable::coupledVectorTagArrayGradients().

690 {
691  const auto * var = getArrayVar(var_names, index);
692  if (!var)
693  mooseError(var_names, ": invalid variable name for coupledVectorTagArrayGradient");
695 
696  if (!_c_fe_problem.vectorTagExists(tag))
697  mooseError("Attempting to couple to vector tag with ID ",
698  tag,
699  "in ",
700  _c_name,
701  ", but a vector tag with that ID does not exist");
702 
703  const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
704 
705  return var->vectorTagGradient(tag);
706 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
void addFEVariableCoupleableVectorTag(TagID tag)
Definition: Coupleable.h:102
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:45
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:304

◆ coupledVectorTagArrayGradient() [2/2]

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

Definition at line 709 of file Coupleable.C.

712 {
713  if (!_c_parameters.isParamValid(tag_name))
714  mooseError("Tag name parameter '", tag_name, "' is invalid");
715 
716  TagName tagname = _c_parameters.get<TagName>(tag_name);
717  if (!_c_fe_problem.vectorTagExists(tagname))
718  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
719 
720  TagID tag = _c_fe_problem.getVectorTagID(tagname);
721  return coupledVectorTagArrayGradient(var_names, tag, index);
722 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
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:687
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledVectorTagArrayGradients() [1/2]

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

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 2618 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagArrayGradients().

2619 {
2620  auto func = [this, &var_names, &tag](unsigned int index)
2621  { return &coupledVectorTagArrayGradient(var_names, tag, index); };
2622  return coupledVectorHelper<const ArrayVariableGradient *>(var_names, func);
2623 }
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:687

◆ coupledVectorTagArrayGradients() [2/2]

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

Definition at line 2626 of file Coupleable.C.

2628 {
2629  if (!_c_parameters.isParamValid(tag_name))
2630  mooseError("Tag name parameter '", tag_name, "' is invalid");
2631 
2632  TagName tagname = _c_parameters.get<TagName>(tag_name);
2633  if (!_c_fe_problem.vectorTagExists(tagname))
2634  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2635 
2636  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2637  return coupledVectorTagArrayGradients(var_names, tag);
2638 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
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.
Definition: Coupleable.C:2618
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledVectorTagArrayValue() [1/2]

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

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 633 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagArrayValues().

636 {
637  return vectorTagValueHelper<RealEigenVector>(var_names, tag, index);
638 }

◆ coupledVectorTagArrayValue() [2/2]

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

Definition at line 641 of file Coupleable.C.

644 {
645  return vectorTagValueHelper<RealEigenVector>(var_names, tag_name, index);
646 }

◆ coupledVectorTagArrayValues() [1/2]

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

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 2572 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagArrayValues().

2573 {
2574  auto func = [this, &var_names, &tag](unsigned int index)
2575  { return &coupledVectorTagArrayValue(var_names, tag, index); };
2576  return coupledVectorHelper<const ArrayVariableValue *>(var_names, func);
2577 }
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:633

◆ coupledVectorTagArrayValues() [2/2]

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

Definition at line 2580 of file Coupleable.C.

2582 {
2583  if (!_c_parameters.isParamValid(tag_name))
2584  mooseError("Tag name parameter '", tag_name, "' is invalid");
2585 
2586  TagName tagname = _c_parameters.get<TagName>(tag_name);
2587  if (!_c_fe_problem.vectorTagExists(tagname))
2588  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2589 
2590  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2591  return coupledVectorTagArrayValues(var_names, tag);
2592 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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::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.
Definition: Coupleable.C:2572
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledVectorTagDofValue() [1/2]

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

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 765 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagDofValues().

768 {
769  return vectorTagDofValueHelper<Real>(var_name, tag, comp);
770 }

◆ coupledVectorTagDofValue() [2/2]

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

Definition at line 773 of file Coupleable.C.

776 {
777  return vectorTagDofValueHelper<Real>(var_name, tag_name, comp);
778 }

◆ coupledVectorTagDofValues() [1/2]

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

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 2641 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagDofValues().

2642 {
2643  auto func = [this, &var_names, &tag](unsigned int comp)
2644  { return &coupledVectorTagDofValue(var_names, tag, comp); };
2645  return coupledVectorHelper<const VariableValue *>(var_names, func);
2646 }
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:765

◆ coupledVectorTagDofValues() [2/2]

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

Definition at line 2649 of file Coupleable.C.

2651 {
2652  if (!_c_parameters.isParamValid(tag_name))
2653  mooseError("Tag name parameter '", tag_name, "' is invalid");
2654 
2655  TagName tagname = _c_parameters.get<TagName>(tag_name);
2656  if (!_c_fe_problem.vectorTagExists(tagname))
2657  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2658 
2659  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2660  return coupledVectorTagDofValues(var_names, tag);
2661 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
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.
Definition: Coupleable.C:2641
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledVectorTagGradient() [1/2]

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

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 649 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagGradient(), and Coupleable::coupledVectorTagGradients().

652 {
653  const auto * var = getVar(var_names, index);
654  if (!var)
655  mooseError(var_names, ": invalid variable name for coupledVectorTagGradient");
657 
658  if (!_c_fe_problem.vectorTagExists(tag))
659  mooseError("Attempting to couple to vector tag with ID ",
660  tag,
661  "in ",
662  _c_name,
663  ", but a vector tag with that ID does not exist");
664 
665  const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
666 
667  return var->vectorTagGradient(tag);
668 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
void addFEVariableCoupleableVectorTag(TagID tag)
Definition: Coupleable.h:102
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:45

◆ coupledVectorTagGradient() [2/2]

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

Definition at line 671 of file Coupleable.C.

674 {
675  if (!_c_parameters.isParamValid(tag_name))
676  mooseError("Tag name parameter '", tag_name, "' is invalid");
677 
678  TagName tagname = _c_parameters.get<TagName>(tag_name);
679  if (!_c_fe_problem.vectorTagExists(tagname))
680  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
681 
682  TagID tag = _c_fe_problem.getVectorTagID(tagname);
683  return coupledVectorTagGradient(var_names, tag, index);
684 }
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:649
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledVectorTagGradients() [1/2]

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

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 2595 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagGradients().

2596 {
2597  auto func = [this, &var_names, &tag](unsigned int index)
2598  { return &coupledVectorTagGradient(var_names, tag, index); };
2599  return coupledVectorHelper<const VariableGradient *>(var_names, func);
2600 }
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:649

◆ coupledVectorTagGradients() [2/2]

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

Definition at line 2603 of file Coupleable.C.

2605 {
2606  if (!_c_parameters.isParamValid(tag_name))
2607  mooseError("Tag name parameter '", tag_name, "' is invalid");
2608 
2609  TagName tagname = _c_parameters.get<TagName>(tag_name);
2610  if (!_c_fe_problem.vectorTagExists(tagname))
2611  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2612 
2613  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2614  return coupledVectorTagGradients(var_names, tag);
2615 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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::vector< const VariableGradient * > coupledVectorTagGradients(const std::string &var_names, TagID tag) const
Returns gradients for all the coupled variables desired for a given tag.
Definition: Coupleable.C:2595
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledVectorTagScalarValue()

const VariableValue & ScalarCoupleable::coupledVectorTagScalarValue ( const std::string &  var_name,
TagID  tag,
unsigned int  comp = 0 
) const
protectedinherited

Returns value of a scalar coupled variable.

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

Definition at line 181 of file ScalarCoupleable.C.

184 {
185  checkVar(var_name);
186  if (!isCoupledScalar(var_name, comp))
187  return *getDefaultValue(var_name);
188 
190  mooseError("Attempting to couple to vector tag scalar with ID ",
191  tag,
192  "in ",
193  _sc_name,
194  ", but a vector tag with that ID does not exist");
195 
196  _sc_coupleable_vector_tags.insert(tag);
197 
198  return getScalarVar(var_name, comp)->vectorTagSln(tag);
199 }
std::set< TagID > _sc_coupleable_vector_tags
The scalar coupleable vector tags.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _sc_name
The name of the object this interface is part of.
FEProblemBase & _sc_fe_problem
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
const VariableValue & vectorTagSln(TagID tag) const
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
const VariableValue * getDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable...

◆ coupledVectorTagValue() [1/2]

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

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 617 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagValues().

620 {
621  return vectorTagValueHelper<Real>(var_names, tag, index);
622 }

◆ coupledVectorTagValue() [2/2]

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

Definition at line 625 of file Coupleable.C.

628 {
629  return vectorTagValueHelper<Real>(var_names, tag_name, index);
630 }

◆ coupledVectorTagValues() [1/2]

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

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 2549 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagValues().

2550 {
2551  auto func = [this, &var_names, &tag](unsigned int comp)
2552  { return &coupledVectorTagValue(var_names, tag, comp); };
2553  return coupledVectorHelper<const VariableValue *>(var_names, func);
2554 }
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:617

◆ coupledVectorTagValues() [2/2]

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

Definition at line 2557 of file Coupleable.C.

2559 {
2560  if (!_c_parameters.isParamValid(tag_name))
2561  mooseError("Tag name parameter '", tag_name, "' is invalid");
2562 
2563  TagName tagname = _c_parameters.get<TagName>(tag_name);
2564  if (!_c_fe_problem.vectorTagExists(tagname))
2565  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2566 
2567  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2568  return coupledVectorTagValues(var_names, tag);
2569 }
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition: SubProblem.C:203
unsigned int TagID
Definition: MooseTypes.h:210
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
Definition: SubProblem.h:201
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.
Definition: Coupleable.C:2549
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledVectorValue()

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

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 822 of file Coupleable.C.

Referenced by Coupleable::coupledVectorValues().

823 {
824  const auto * var = getVectorVar(var_name, comp);
825  if (!var)
826  return *getDefaultVectorValue(var_name);
828 
830  {
831  if (_c_nodal)
832  return _c_is_implicit ? var->nodalValueArray() : var->nodalValueOldArray();
833  else
834  return _c_is_implicit ? var->sln() : var->slnOld();
835  }
836  else
837  {
838  if (_c_nodal)
839  // Since this is at a node, I don't feel like there should be any "neighbor" logic
840  return _c_is_implicit ? var->nodalValueArray() : var->nodalValueOldArray();
841  else
842  return _c_is_implicit ? var->slnNeighbor() : var->slnOldNeighbor();
843  }
844 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
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:360
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledVectorValueOld()

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

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 1066 of file Coupleable.C.

Referenced by Coupleable::coupledVectorValuesOld().

1067 {
1068  const auto * var = getVectorVar(var_name, comp);
1069  if (!var)
1070  return *getDefaultVectorValue(var_name);
1072 
1073  if (_c_nodal)
1074  return (_c_is_implicit) ? var->nodalValueOldArray() : var->nodalValueOlderArray();
1075  if (!_coupleable_neighbor)
1076  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1077  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1078 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
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:360
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1433
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledVectorValueOlder()

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

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 1081 of file Coupleable.C.

1082 {
1083  const auto * var = getVectorVar(var_name, comp);
1084  if (!var)
1085  return *getDefaultVectorValue(var_name);
1087 
1088  if (!_coupleable_neighbor)
1089  return var->slnOlder();
1090  return var->slnOlderNeighbor();
1091 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:190
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:292
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:360
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:1702

◆ coupledVectorValues()

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

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 2513 of file Coupleable.C.

2514 {
2515  auto func = [this, &var_name](unsigned int comp) { return &coupledVectorValue(var_name, comp); };
2516  return coupledVectorHelper<const VectorVariableValue *>(var_name, func);
2517 }
virtual const VectorVariableValue & coupledVectorValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled vector variable.
Definition: Coupleable.C:822

◆ coupledVectorValuesOld()

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

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 2701 of file Coupleable.C.

2702 {
2703  auto func = [this, &var_name](unsigned int comp)
2704  { return &coupledVectorValueOld(var_name, comp); };
2705  return coupledVectorHelper<const VectorVariableValue *>(var_name, func);
2706 }
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.
Definition: Coupleable.C:1066

◆ genericZeroGradient() [1/3]

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

Returns zero gradient templated with automatic differentiation boolean.

Returns
Reference to a const GenericVariableValue

◆ genericZeroGradient() [2/3]

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

Definition at line 2434 of file Coupleable.C.

2435 {
2436  return _grad_zero;
2437 }
const VariableGradient & _grad_zero
Zero gradient of a variable.
Definition: Coupleable.h:1489

◆ genericZeroGradient() [3/3]

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

Definition at line 2441 of file Coupleable.C.

2442 {
2443  return _ad_grad_zero;
2444 }
const MooseArray< ADRealVectorValue > & _ad_grad_zero
Definition: Coupleable.h:1490

◆ genericZeroSecond() [1/3]

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

Returns zero second derivative templated with automatic differentiation boolean.

Returns
Reference to a const GenericVariableValue

◆ genericZeroSecond() [2/3]

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

Definition at line 2448 of file Coupleable.C.

2449 {
2450  return _second_zero;
2451 }
const VariableSecond & _second_zero
Zero second derivative of a variable.
Definition: Coupleable.h:1496

◆ genericZeroSecond() [3/3]

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

Definition at line 2455 of file Coupleable.C.

2456 {
2457  return _ad_second_zero;
2458 }
const MooseArray< ADRealTensorValue > & _ad_second_zero
Definition: Coupleable.h:1497

◆ genericZeroValue() [1/3]

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

Returns zero value templated with automatic differentiation boolean.

Returns
Reference to a const GenericVariableValue

◆ genericZeroValue() [2/3]

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

Definition at line 2420 of file Coupleable.C.

2421 {
2422  return _zero;
2423 }
const VariableValue & _zero
Zero value of a variable.
Definition: Coupleable.h:1484

◆ genericZeroValue() [3/3]

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

Definition at line 2427 of file Coupleable.C.

2428 {
2429  return _ad_zero;
2430 }
const MooseArray< ADReal > & _ad_zero
Definition: Coupleable.h:1486

◆ getADDefaultCurl()

const ADVectorVariableCurl & Coupleable::getADDefaultCurl ( ) const
inherited

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 2391 of file Coupleable.C.

Referenced by Coupleable::adCoupledCurl().

2392 {
2394  return _ad_default_curl;
2395 }
MooseArray< ADRealVectorValue > _ad_default_curl
This will always be zero because the default values for optionally coupled vector variables is always...
Definition: Coupleable.h:1481
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ getADDefaultGradient()

const ADVariableGradient & Coupleable::getADDefaultGradient ( ) const
inherited

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 2370 of file Coupleable.C.

Referenced by Coupleable::adCoupledGradient(), and Coupleable::adCoupledGradientDot().

2371 {
2373  return _ad_default_gradient;
2374 }
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788
MooseArray< ADRealVectorValue > _ad_default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1469

◆ getADDefaultSecond()

const ADVariableSecond & Coupleable::getADDefaultSecond ( ) const
inherited

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 2384 of file Coupleable.C.

Referenced by Coupleable::adCoupledSecond().

2385 {
2387  return _ad_default_second;
2388 }
MooseArray< ADRealTensorValue > _ad_default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1478
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ getADDefaultValue()

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

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 2339 of file Coupleable.C.

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

2340 {
2341  auto default_value_it = _ad_default_value.find(var_name);
2342  if (default_value_it == _ad_default_value.end())
2343  {
2344  auto value = std::make_unique<ADVariableValue>(_coupleable_max_qps,
2346  default_value_it = _ad_default_value.insert(std::make_pair(var_name, std::move(value))).first;
2347  }
2348 
2349  return default_value_it->second.get();
2350 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.
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.
Definition: Coupleable.h:1446
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ getADDefaultVectorGradient()

const ADVectorVariableGradient & Coupleable::getADDefaultVectorGradient ( ) const
inherited

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 2377 of file Coupleable.C.

Referenced by Coupleable::adCoupledVectorGradient().

2378 {
2381 }
MooseArray< ADRealTensorValue > _ad_default_vector_gradient
This will always be zero because the default values for optionally coupled vector variables is always...
Definition: Coupleable.h:1472
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ getADDefaultVectorValue()

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

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 2353 of file Coupleable.C.

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

2354 {
2355  auto default_value_it = _ad_default_vector_value.find(var_name);
2356  if (default_value_it == _ad_default_vector_value.end())
2357  {
2358  RealVectorValue default_vec;
2359  for (unsigned int i = 0; i < _c_parameters.numberDefaultCoupledValues(var_name); ++i)
2360  default_vec(i) = _c_parameters.defaultCoupledValue(var_name, i);
2361  auto value = std::make_unique<ADVectorVariableValue>(_coupleable_max_qps, default_vec);
2362  default_value_it =
2363  _ad_default_vector_value.insert(std::make_pair(var_name, std::move(value))).first;
2364  }
2365 
2366  return default_value_it->second.get();
2367 }
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.
Definition: Coupleable.h:1457
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1788

◆ getArrayVar() [1/2]

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

◆ getArrayVar() [2/2]

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

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 327 of file Coupleable.C.

328 {
329  return getVarHelper<ArrayMooseVariable>(var_name, comp);
330 }

◆ getCoupledArrayMooseVars()

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

Get the list of array coupled variables.

Returns
The list of array coupled variables

Definition at line 97 of file Coupleable.h.

98  {
100  }
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
Definition: Coupleable.h:1421

◆ getCoupledMooseScalarVars()

const std::vector<MooseVariableScalar *>& ScalarCoupleable::getCoupledMooseScalarVars ( )
inlineinherited

Get the list of coupled scalar variables.

Returns
The list of coupled variables

Definition at line 45 of file ScalarCoupleable.h.

Referenced by AuxScalarKernel::AuxScalarKernel(), MortarScalarBase::computeJacobian(), and ScalarInitialCondition::ScalarInitialCondition().

46  {
48  }
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
Vector of coupled variables.

◆ getCoupledMooseVars()

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

◆ getCoupledStandardMooseVars()

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

Get the list of standard coupled variables.

Returns
The list of standard coupled variables

Definition at line 79 of file Coupleable.h.

80  {
82  }
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Definition: Coupleable.h:1415

◆ getCoupledVars()

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

Get the list of coupled variables.

Returns
The list of coupled variables

Definition at line 61 of file Coupleable.h.

Referenced by InitialConditionBase::InitialConditionBase().

62  {
63  return _coupled_vars;
64  }
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1409

◆ getCoupledVectorMooseVars()

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

Get the list of vector coupled variables.

Returns
The list of vector coupled variables

Definition at line 88 of file Coupleable.h.

89  {
91  }
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
Definition: Coupleable.h:1418

◆ getFEVar()

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

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 266 of file Coupleable.C.

267 {
268  mooseDeprecated("Coupleable::getFEVar is deprecated. Please use Coupleable::getFieldVar instead. "
269  "Note that this method could potentially return a finite volume variable");
270  return getFieldVar(var_name, comp);
271 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
Definition: Coupleable.C:280

◆ getFEVariableCoupleableMatrixTags() [1/2]

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

Definition at line 108 of file Coupleable.h.

108 { return _fe_coupleable_matrix_tags; }
std::set< TagID > _fe_coupleable_matrix_tags
Definition: Coupleable.h:1798

◆ getFEVariableCoupleableMatrixTags() [2/2]

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

Definition at line 115 of file Coupleable.h.

116  {
118  }
std::set< TagID > _fe_coupleable_matrix_tags
Definition: Coupleable.h:1798

◆ getFEVariableCoupleableVectorTags() [1/2]

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

◆ getFEVariableCoupleableVectorTags() [2/2]

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

Definition at line 110 of file Coupleable.h.

111  {
113  }
std::set< TagID > _fe_coupleable_vector_tags
Definition: Coupleable.h:1796

◆ getFieldVar() [1/2]

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

◆ getFieldVar() [2/2]

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

Definition at line 274 of file Coupleable.C.

275 {
276  return getVarHelper<MooseVariableFieldBase>(var_name, comp);
277 }

◆ getMooseVariableDependencies()

const std::set<MooseVariableFieldBase *>& MooseVariableDependencyInterface::getMooseVariableDependencies ( ) const
inlineinherited

Retrieve the set of MooseVariableFieldBase that this object depends on.

Returns
The MooseVariableFieldBase that MUST be reinited before evaluating this object

Definition at line 35 of file MooseVariableDependencyInterface.h.

Referenced by ComputeUserObjectsThread::subdomainChanged(), and MooseObjectWarehouseBase< Indicator >::updateVariableDependencyHelper().

36  {
38  }
std::set< MooseVariableFieldBase * > _moose_variable_dependencies

◆ getScalarVar()

const MooseVariableScalar * ScalarCoupleable::getScalarVar ( const std::string &  var_name,
unsigned int  comp 
) const
protectedinherited

Extract pointer to a scalar coupled variable.

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

Definition at line 321 of file ScalarCoupleable.C.

Referenced by ScalarCoupleable::adCoupledScalarDot(), ScalarCoupleable::adCoupledScalarValue(), ScalarCoupleable::coupledMatrixTagScalarValue(), ScalarCoupleable::coupledScalar(), ScalarCoupleable::coupledScalarDot(), ScalarCoupleable::coupledScalarDotDot(), ScalarCoupleable::coupledScalarDotDotDu(), ScalarCoupleable::coupledScalarDotDotOld(), ScalarCoupleable::coupledScalarDotDu(), ScalarCoupleable::coupledScalarDotOld(), ScalarCoupleable::coupledScalarOrder(), ScalarCoupleable::coupledScalarValue(), ScalarCoupleable::coupledScalarValueOld(), ScalarCoupleable::coupledScalarValueOlder(), ScalarCoupleable::coupledVectorTagScalarValue(), and ParsedODEKernel::ParsedODEKernel().

322 {
323  const auto var_name = _sc_parameters.checkForRename(var_name_in);
324 
325  const auto it = _coupled_scalar_vars.find(var_name);
326  if (it != _coupled_scalar_vars.end())
327  {
328  const auto & entry = it->second;
329  if (comp < entry.size())
330  return entry[comp];
331  else
332  mooseError(_sc_name, ": Trying to get a non-existent component of variable '", var_name, "'");
333  }
334  else
335  mooseError(_sc_name, ": Trying to get a non-existent variable '", var_name, "'");
336 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _sc_name
The name of the object this interface is part of.
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.
const InputParameters & _sc_parameters
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ getScalarVariableCoupleableMatrixTags()

const std::set<TagID>& ScalarCoupleable::getScalarVariableCoupleableMatrixTags ( ) const
inlineinherited

Definition at line 55 of file ScalarCoupleable.h.

56  {
58  }
std::set< TagID > _sc_coupleable_matrix_tags
The scalar coupleable matrix tags.

◆ getScalarVariableCoupleableVectorTags()

const std::set<TagID>& ScalarCoupleable::getScalarVariableCoupleableVectorTags ( ) const
inlineinherited

Definition at line 50 of file ScalarCoupleable.h.

51  {
53  }
std::set< TagID > _sc_coupleable_vector_tags
The scalar coupleable vector tags.

◆ getVar() [1/2]

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

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 286 of file Coupleable.C.

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

287 {
288  return const_cast<MooseVariable *>(getVarHelper<MooseVariable>(var_name, comp));
289 }

◆ getVar() [2/2]

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

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 310 of file Coupleable.C.

311 {
312  return getVarHelper<MooseVariable>(var_name, comp);
313 }

◆ getVarHelper() [1/2]

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

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

Definition at line 1869 of file Coupleable.h.

1870 {
1871  return const_cast<Coupleable *>(this)->getVarHelper<T>(var_name, comp);
1872 }
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:45

◆ getVarHelper() [2/2]

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

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

Definition at line 1815 of file Coupleable.h.

1816 {
1817  const auto var_name = _c_parameters.checkForRename(var_name_in);
1818  auto name_to_use = var_name;
1819 
1820  // First check for supplied name
1821  if (!checkVar(var_name, comp, 0))
1822  {
1823  // See if there is an associated deprecated name that the user may have used instead
1824  auto it = _new_to_deprecated_coupled_vars.find(var_name);
1825  if (it == _new_to_deprecated_coupled_vars.end())
1826  return nullptr;
1827  else
1828  {
1829  auto deprecated_name = it->second;
1830  if (checkVar(deprecated_name, comp, 0))
1831  name_to_use = deprecated_name;
1832  else
1833  return nullptr;
1834  }
1835  }
1836 
1837  auto coupled_vars_it = _coupled_vars.find(name_to_use);
1838 
1839  mooseAssert(coupled_vars_it != _coupled_vars.end(),
1840  "Trying to get a coupled var " << name_to_use << " that doesn't exist");
1841 
1842  if (auto coupled_var = dynamic_cast<T *>(coupled_vars_it->second[comp]))
1843  return coupled_var;
1844  else
1845  {
1846  for (auto & var : _coupled_standard_moose_vars)
1847  if (var->name() == name_to_use)
1848  mooseError("The named variable is a standard variable, try a "
1849  "'coupled[Value/Gradient/Dot/etc]...' function instead");
1850  for (auto & var : _coupled_vector_moose_vars)
1851  if (var->name() == name_to_use)
1852  mooseError("The named variable is a vector variable, try a "
1853  "'coupledVector[Value/Gradient/Dot/etc]...' function instead");
1854  for (auto & var : _coupled_array_moose_vars)
1855  if (var->name() == name_to_use)
1856  mooseError("The named variable is an array variable, try a "
1857  "'coupledArray[Value/Gradient/Dot/etc]...' function instead");
1858  for (auto & var : _coupled_fv_moose_vars)
1859  if (var->name() == name_to_use)
1860  mooseError("The named variable is a finite volume variable, which the coupled[...] routine "
1861  "used does not support. Try using the functor system routines instead.");
1862  mooseError(
1863  "Variable '", name_to_use, "' is of a different C++ type than you tried to fetch it as.");
1864  }
1865 }
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1409
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
Definition: Coupleable.h:1421
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Definition: Coupleable.h:1415
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
Definition: Coupleable.h:1418
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
Vector of all finite volume coupled variables.
Definition: Coupleable.h:1424
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:207
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
const InputParameters & _c_parameters
Definition: Coupleable.h:1395
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
map from new to deprecated variable names
Definition: Coupleable.h:1427

◆ getVectorVar() [1/2]

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

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 292 of file Coupleable.C.

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

293 {
294  auto * const var =
295  const_cast<VectorMooseVariable *>(getVarHelper<VectorMooseVariable>(var_name, comp));
296 
297  if (_c_nodal && var && var->feType().family != LAGRANGE_VEC)
298  mooseError(_c_name, ": Only LAGRANGE_VEC vector variables are defined at nodes");
299 
300  return var;
301 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
LAGRANGE_VEC
Class for stuff related to variables.
Definition: Adaptivity.h:31
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398

◆ getVectorVar() [2/2]

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

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 316 of file Coupleable.C.

317 {
318  const auto * const var = getVarHelper<VectorMooseVariable>(var_name, comp);
319 
320  if (_c_nodal && var && var->feType().family != LAGRANGE_VEC)
321  mooseError(_c_name, ": Only LAGRANGE_VEC vector variables are defined at nodes");
322 
323  return var;
324 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1430
LAGRANGE_VEC
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398

◆ getWritableCoupledVariables()

auto& Coupleable::getWritableCoupledVariables ( ) const
inlineinherited

returns a reference to the set of writable coupled variables

Definition at line 123 of file Coupleable.h.

Referenced by Coupleable::hasWritableCoupledVariables().

THREAD_ID _c_tid
Thread ID of the thread using this object.
Definition: Coupleable.h:1439
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...
Definition: Coupleable.h:1810

◆ hasWritableCoupledVariables()

bool Coupleable::hasWritableCoupledVariables ( ) const
inlineinherited

Checks whether the object has any writable coupled variables.

Definition at line 128 of file Coupleable.h.

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

◆ isCoupled()

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

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 127 of file Coupleable.C.

Referenced by Coupleable::adCoupledNodalValue(), Coupleable::checkVar(), Coupleable::coupledComponents(), and MatDiffusionBase< Real >::MatDiffusionBase().

128 {
129  const auto var_name = _c_parameters.checkForRename(var_name_in);
130 
131  auto it = _coupled_vars.find(var_name);
132  if (it != _coupled_vars.end())
133  return (i < it->second.size());
134  else
135  {
136  // Make sure the user originally requested this value in the InputParameter syntax
137  if (!_c_parameters.hasCoupledValue(var_name))
139  ": The coupled variable \"",
140  var_name,
141  "\" was never added to this object's "
142  "InputParameters, please double-check your "
143  "spelling");
144 
145  return false;
146  }
147 }
bool hasCoupledValue(const std::string &coupling_name) const
Return whether or not the coupled variable exists.
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1409
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
const InputParameters & _c_parameters
Definition: Coupleable.h:1395

◆ isCoupledConstant()

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

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 150 of file Coupleable.C.

Referenced by Coupleable::coupledName(), and DerivativeFunctionMaterialBaseTempl< is_ad >::DerivativeFunctionMaterialBaseTempl().

151 {
152  return _c_parameters.hasDefaultCoupledValue(var_name);
153 }
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
const InputParameters & _c_parameters
Definition: Coupleable.h:1395

◆ isCoupledScalar()

bool ScalarCoupleable::isCoupledScalar ( const std::string &  var_name,
unsigned int  i = 0 
) const
protectedinherited

Returns true if a variables has been coupled_as name.

Parameters
var_nameThe of the coupled variable
iBy default 0, in general the index to test in a vector of MooseVariable pointers.

Definition at line 70 of file ScalarCoupleable.C.

Referenced by ScalarCoupleable::adCoupledScalarValue(), ScalarCoupleable::coupledMatrixTagScalarValue(), ScalarCoupleable::coupledScalarOrder(), ScalarCoupleable::coupledScalarValue(), ScalarCoupleable::coupledScalarValueOld(), ScalarCoupleable::coupledScalarValueOlder(), and ScalarCoupleable::coupledVectorTagScalarValue().

71 {
72  const auto var_name = _sc_parameters.checkForRename(var_name_in);
73 
74  auto it = _coupled_scalar_vars.find(var_name);
75  if (it != _coupled_scalar_vars.end())
76  return (i < it->second.size());
77  else
78  {
79  // Make sure the user originally requested this value in the InputParameter syntax
80  if (!_sc_parameters.hasCoupledValue(var_name))
82  ": The coupled scalar variable \"",
83  var_name,
84  "\" was never added to this object's "
85  "InputParameters, please double-check "
86  "your spelling");
87 
88  return false;
89  }
90 }
bool hasCoupledValue(const std::string &coupling_name) const
Return whether or not the coupled variable exists.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & _sc_name
The name of the object this interface is part of.
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.
const InputParameters & _sc_parameters
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ validateExecutionerType()

void Coupleable::validateExecutionerType ( const std::string &  name,
const std::string &  fn_name 
) const
protectedinherited

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 2116 of file Coupleable.C.

Referenced by Coupleable::checkFuncType(), NeighborCoupleable::coupledArrayNeighborGradientOld(), NeighborCoupleable::coupledArrayNeighborGradientOlder(), NeighborCoupleable::coupledNeighborDofValuesOld(), NeighborCoupleable::coupledNeighborDofValuesOlder(), NeighborCoupleable::coupledNeighborGradientOld(), NeighborCoupleable::coupledNeighborGradientOlder(), NeighborCoupleable::coupledNeighborValueOld(), NeighborCoupleable::coupledNeighborValueOlder(), NeighborCoupleable::coupledVectorNeighborGradientOld(), and NeighborCoupleable::coupledVectorNeighborGradientOlder().

2117 {
2118  if (!_c_fe_problem.isTransient())
2120  ": Calling \"",
2121  fn_name,
2122  "\" on variable \"",
2123  name,
2124  "\" when using a \"Steady\" executioner is not allowed. This value is available "
2125  "only in transient simulations.");
2126 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1398
virtual bool isTransient() const override

◆ writableCoupledValue()

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

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 912 of file Coupleable.C.

913 {
914  mooseDeprecated("Coupleable::writableCoupledValue is deprecated, please use "
915  "Coupleable::writableVariable instead. ");
916 
917  // check if the variable exists
918  auto * const var = getVar(var_name, comp);
919  if (!var)
920  mooseError(
921  "Unable to create a writable reference for '", var_name, "', is it a constant expression?");
922 
923  // is the requested variable an AuxiliaryVariable?
924  if (!_c_fe_problem.getAuxiliarySystem().hasVariable(var->name()))
925  mooseError(
926  "'", var->name(), "' must be an auxiliary variable in Coupleable::writableCoupledValue");
927 
928  // check that the variable type (elemental/nodal) is compatible with the object type
929  const auto * aux = dynamic_cast<const AuxKernel *>(this);
930 
931  if (!aux)
932  mooseError("writableCoupledValue() can only be called from AuxKernels, but '",
933  _obj->name(),
934  "' is not an AuxKernel.");
935 
936  if (!aux->isNodal() && var->isNodal())
937  mooseError("The elemental AuxKernel '",
938  _obj->name(),
939  "' cannot obtain a writable reference to the nodal variable '",
940  var->name(),
941  "'.");
942 
943  // make sure only one object can access a variable
944  checkWritableVar(var);
945 
946  return const_cast<VariableValue &>(coupledValue(var_name, comp));
947 }
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain...
Definition: Coupleable.C:950
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:286
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1403
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable.
Definition: Coupleable.C:495
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
AuxiliarySystem & getAuxiliarySystem()
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:834
const MooseObject *const _obj
Definition: Coupleable.h:1803
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:314

◆ writableVariable()

MooseWritableVariable & Coupleable::writableVariable ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedinherited

Returns a writable MooseVariable object for a nodal or elemental variable.

Use var.setNodalValue(val[, idx]) 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 876 of file Coupleable.C.

877 {
878  auto * var = getVarHelper<MooseWritableVariable>(var_name, comp);
879 
880  const auto * aux = dynamic_cast<const AuxKernel *>(this);
881  const auto * euo = dynamic_cast<const ElementUserObject *>(this);
882  const auto * nuo = dynamic_cast<const NodalUserObject *>(this);
883  const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
884  const auto * nec = dynamic_cast<const NodeElemConstraintBase *>(this);
885 
886  if (!aux && !euo && !nuo && !nfc && !nec)
887  mooseError("writableVariable() can only be called from AuxKernels, ElementUserObjects, "
888  "NodalUserObjects, NodeFaceConstraints, or NodeElemConstraints. '",
889  _obj->name(),
890  "' is none of those.");
891 
892  if (aux && !aux->isNodal() && var->isNodal())
893  mooseError("The elemental AuxKernel '",
894  _obj->name(),
895  "' cannot obtain a writable reference to the nodal variable '",
896  var->name(),
897  "'.");
898  if (euo && var->isNodal())
899  mooseError("The ElementUserObject '",
900  _obj->name(),
901  "' cannot obtain a writable reference to the nodal variable '",
902  var->name(),
903  "'.");
904 
905  // make sure only one object can access a variable
906  checkWritableVar(var);
907 
908  return *var;
909 }
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain...
Definition: Coupleable.C:950
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
A user object that runs over all the nodes and does an aggregation step to compute a single value...
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh...
const MooseObject *const _obj
Definition: Coupleable.h:1803
A NodeElemConstraintBase is used when you need to create constraints between a secondary node and a p...

Member Data Documentation

◆ _ad_default_curl

MooseArray<ADRealVectorValue> Coupleable::_ad_default_curl
mutableprotectedinherited

This will always be zero because the default values for optionally coupled vector variables is always constant.

Definition at line 1481 of file Coupleable.h.

Referenced by Coupleable::getADDefaultCurl().

◆ _ad_default_gradient

MooseArray<ADRealVectorValue> Coupleable::_ad_default_gradient
mutableprotectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1469 of file Coupleable.h.

Referenced by Coupleable::getADDefaultGradient().

◆ _ad_default_second

MooseArray<ADRealTensorValue> Coupleable::_ad_default_second
mutableprotectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1478 of file Coupleable.h.

Referenced by Coupleable::getADDefaultSecond().

◆ _ad_default_value

std::unordered_map<std::string, std::unique_ptr<MooseArray<ADReal> > > Coupleable::_ad_default_value
mutableprotectedinherited

Will hold the default value for optional coupled variables for automatic differentiation.

Definition at line 1446 of file Coupleable.h.

Referenced by Coupleable::getADDefaultValue().

◆ _ad_default_vector_gradient

MooseArray<ADRealTensorValue> Coupleable::_ad_default_vector_gradient
mutableprotectedinherited

This will always be zero because the default values for optionally coupled vector variables is always constant.

Definition at line 1472 of file Coupleable.h.

Referenced by Coupleable::getADDefaultVectorGradient().

◆ _ad_default_vector_value

std::unordered_map<std::string, std::unique_ptr<MooseArray<ADRealVectorValue> > > Coupleable::_ad_default_vector_value
mutableprotectedinherited

Will hold the default value for optional vector coupled variables for automatic differentiation.

Definition at line 1457 of file Coupleable.h.

Referenced by Coupleable::getADDefaultVectorValue().

◆ _ad_grad_zero

const MooseArray<ADRealVectorValue>& Coupleable::_ad_grad_zero
protectedinherited

Definition at line 1490 of file Coupleable.h.

Referenced by Coupleable::adZeroGradient().

◆ _ad_second_zero

const MooseArray<ADRealTensorValue>& Coupleable::_ad_second_zero
protectedinherited

Definition at line 1497 of file Coupleable.h.

Referenced by Coupleable::adZeroSecond().

◆ _ad_zero

const MooseArray<ADReal>& Coupleable::_ad_zero
protectedinherited

Definition at line 1486 of file Coupleable.h.

Referenced by Coupleable::adZeroValue().

◆ _c_allow_element_to_nodal_coupling

const bool Coupleable::_c_allow_element_to_nodal_coupling
protectedinherited

Definition at line 1436 of file Coupleable.h.

Referenced by Coupleable::checkVar().

◆ _c_fe_problem

FEProblemBase& Coupleable::_c_fe_problem
protectedinherited

◆ _c_is_implicit

bool Coupleable::_c_is_implicit
protectedinherited

True if implicit value is required.

Definition at line 1433 of file Coupleable.h.

Referenced by Coupleable::adCoupledCurl(), Coupleable::adCoupledDofValues(), Coupleable::adCoupledGradient(), Coupleable::adCoupledGradientDot(), Coupleable::adCoupledLowerValue(), NeighborCoupleable::adCoupledNeighborGradient(), NeighborCoupleable::adCoupledNeighborValue(), NeighborCoupleable::adCoupledNeighborValueDot(), Coupleable::adCoupledNodalValue(), Coupleable::adCoupledSecond(), Coupleable::adCoupledValue(), Coupleable::adCoupledVectorGradient(), NeighborCoupleable::adCoupledVectorNeighborValue(), Coupleable::adCoupledVectorValue(), Coupleable::checkFuncType(), Coupleable::coupledArrayDofValues(), Coupleable::coupledArrayGradient(), Coupleable::coupledArrayGradientOld(), NeighborCoupleable::coupledArrayNeighborGradient(), NeighborCoupleable::coupledArrayNeighborGradientOld(), NeighborCoupleable::coupledArrayNeighborGradientOlder(), NeighborCoupleable::coupledArrayNeighborValue(), Coupleable::coupledArrayValue(), coupledArrayValueByName(), Coupleable::coupledArrayValueOld(), Coupleable::coupledCurl(), Coupleable::coupledCurlOld(), Coupleable::coupledDiv(), Coupleable::coupledDivOld(), Coupleable::coupledDofValues(), Coupleable::coupledDofValuesOld(), Coupleable::coupledGradient(), Coupleable::coupledGradientOld(), NeighborCoupleable::coupledNeighborDofValues(), NeighborCoupleable::coupledNeighborDofValuesOld(), NeighborCoupleable::coupledNeighborDofValuesOlder(), NeighborCoupleable::coupledNeighborGradient(), NeighborCoupleable::coupledNeighborGradientOld(), NeighborCoupleable::coupledNeighborGradientOlder(), NeighborCoupleable::coupledNeighborSecond(), NeighborCoupleable::coupledNeighborValue(), NeighborCoupleable::coupledNeighborValueOld(), NeighborCoupleable::coupledNeighborValueOlder(), Coupleable::coupledNodalValue(), Coupleable::coupledNodalValueOld(), Coupleable::coupledSecond(), Coupleable::coupledSecondOld(), Coupleable::coupledValue(), coupledValueByName(), Coupleable::coupledValueLower(), Coupleable::coupledValueOld(), Coupleable::coupledVectorGradient(), Coupleable::coupledVectorGradientOld(), NeighborCoupleable::coupledVectorNeighborGradient(), NeighborCoupleable::coupledVectorNeighborGradientOld(), NeighborCoupleable::coupledVectorNeighborGradientOlder(), Coupleable::coupledVectorValue(), and Coupleable::coupledVectorValueOld().

◆ _c_name

const std::string& Coupleable::_c_name
protectedinherited

◆ _c_nodal

bool Coupleable::_c_nodal
protectedinherited

◆ _c_parameters

const InputParameters& Coupleable::_c_parameters
protectedinherited

◆ _c_sys

const SystemBase* const Coupleable::_c_sys
protectedinherited

Pointer to the system object if the moose object this is an interface for has one.

Definition at line 1406 of file Coupleable.h.

Referenced by Coupleable::coupled().

◆ _c_tid

THREAD_ID Coupleable::_c_tid
protectedinherited

◆ _c_type

const std::string& Coupleable::_c_type
protectedinherited

The type of the object this interface is part of.

Definition at line 1400 of file Coupleable.h.

◆ _coupleable_neighbor

bool Coupleable::_coupleable_neighbor
protectedinherited

Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor values.

Definition at line 1702 of file Coupleable.h.

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

◆ _coupled_array_moose_vars

std::vector<ArrayMooseVariable *> Coupleable::_coupled_array_moose_vars
protectedinherited

Vector of array coupled variables.

Definition at line 1421 of file Coupleable.h.

Referenced by Coupleable::Coupleable(), coupledArrayValueByName(), Coupleable::getCoupledArrayMooseVars(), and Coupleable::getVarHelper().

◆ _coupled_fv_moose_vars

std::vector<MooseVariableField<Real> *> Coupleable::_coupled_fv_moose_vars
protectedinherited

Vector of all finite volume coupled variables.

Definition at line 1424 of file Coupleable.h.

Referenced by Coupleable::Coupleable(), SideValueSampler::execute(), ElementValueSampler::execute(), Coupleable::getVarHelper(), and SideValueSampler::SideValueSampler().

◆ _coupled_moose_vars

std::vector<MooseVariableFieldBase *> Coupleable::_coupled_moose_vars
protectedinherited

◆ _coupled_standard_moose_vars

std::vector<MooseVariable *> Coupleable::_coupled_standard_moose_vars
protectedinherited

◆ _coupled_vars

std::unordered_map<std::string, std::vector<MooseVariableFieldBase *> > Coupleable::_coupled_vars
protectedinherited

◆ _coupled_vector_moose_vars

std::vector<VectorMooseVariable *> Coupleable::_coupled_vector_moose_vars
protectedinherited

Vector of vector coupled variables.

Definition at line 1418 of file Coupleable.h.

Referenced by Coupleable::Coupleable(), Coupleable::getCoupledVectorMooseVars(), and Coupleable::getVarHelper().

◆ _default_array_gradient

ArrayVariableGradient Coupleable::_default_array_gradient
protectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1527 of file Coupleable.h.

Referenced by Coupleable::coupledArrayGradient(), Coupleable::coupledArrayGradientDot(), Coupleable::coupledArrayGradientOld(), and Coupleable::coupledArrayGradientOlder().

◆ _default_array_value

std::unordered_map<std::string, std::unique_ptr<ArrayVariableValue> > Coupleable::_default_array_value
mutableprotectedinherited

Will hold the default value for optional array coupled variables.

Definition at line 1453 of file Coupleable.h.

Referenced by Coupleable::getDefaultArrayValue().

◆ _default_array_value_zero

ArrayVariableValue Coupleable::_default_array_value_zero
protectedinherited

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 1524 of file Coupleable.h.

Referenced by Coupleable::coupledArrayDot(), Coupleable::coupledArrayDotDot(), Coupleable::coupledArrayDotDotOld(), and Coupleable::coupledArrayDotOld().

◆ _default_div

VectorVariableDivergence Coupleable::_default_div
mutableprotectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1518 of file Coupleable.h.

Referenced by Coupleable::coupledDiv(), Coupleable::coupledDivOld(), and Coupleable::coupledDivOlder().

◆ _default_gradient

VariableGradient Coupleable::_default_gradient
mutableprotectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1466 of file Coupleable.h.

Referenced by Coupleable::coupledGradient(), Coupleable::coupledGradientDot(), Coupleable::coupledGradientDotDot(), Coupleable::coupledGradientOld(), Coupleable::coupledGradientOlder(), and Coupleable::coupledGradientPreviousNL().

◆ _default_second

VariableSecond Coupleable::_default_second
mutableprotectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1475 of file Coupleable.h.

Referenced by Coupleable::coupledSecond(), Coupleable::coupledSecondOld(), Coupleable::coupledSecondOlder(), and Coupleable::coupledSecondPreviousNL().

◆ _default_value

std::unordered_map<std::string, std::vector<std::unique_ptr<VariableValue> > > Coupleable::_default_value
mutableprotectedinherited

Will hold the default value for optional coupled variables.

Definition at line 1443 of file Coupleable.h.

Referenced by Coupleable::getDefaultValue().

◆ _default_value_zero

VariableValue Coupleable::_default_value_zero
mutableprotectedinherited

◆ _default_vector_curl

VectorVariableCurl Coupleable::_default_vector_curl
mutableprotectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1515 of file Coupleable.h.

Referenced by Coupleable::coupledCurl(), Coupleable::coupledCurlOld(), and Coupleable::coupledCurlOlder().

◆ _default_vector_gradient

VectorVariableGradient Coupleable::_default_vector_gradient
mutableprotectedinherited

This will always be zero because the default values for optionally coupled variables is always constant.

Definition at line 1512 of file Coupleable.h.

Referenced by Coupleable::coupledVectorGradient(), Coupleable::coupledVectorGradientOld(), and Coupleable::coupledVectorGradientOlder().

◆ _default_vector_value

std::unordered_map<std::string, std::unique_ptr<VectorVariableValue> > Coupleable::_default_vector_value
mutableprotectedinherited

Will hold the default value for optional vector coupled variables.

Definition at line 1450 of file Coupleable.h.

Referenced by Coupleable::getDefaultVectorValue().

◆ _default_vector_value_zero

VectorVariableValue Coupleable::_default_vector_value_zero
mutableprotectedinherited

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 1509 of file Coupleable.h.

Referenced by Coupleable::coupledVectorDot(), Coupleable::coupledVectorDotDot(), Coupleable::coupledVectorDotDotOld(), and Coupleable::coupledVectorDotOld().

◆ _grad_phi_zero

const VariablePhiGradient& Coupleable::_grad_phi_zero
protectedinherited

Zero gradient of trial function.

Definition at line 1493 of file Coupleable.h.

◆ _grad_zero

const VariableGradient& Coupleable::_grad_zero
protectedinherited

Zero gradient of a variable.

Definition at line 1489 of file Coupleable.h.

◆ _new_to_deprecated_coupled_vars

const std::unordered_map<std::string, std::string>& Coupleable::_new_to_deprecated_coupled_vars
protectedinherited

map from new to deprecated variable names

Definition at line 1427 of file Coupleable.h.

Referenced by Coupleable::getVarHelper().

◆ _phi_zero

const VariablePhiValue& Coupleable::_phi_zero
protectedinherited

Definition at line 1485 of file Coupleable.h.

◆ _point_zero

const Point& ScalarCoupleable::_point_zero
protectedinherited

◆ _real_zero

const Real& ScalarCoupleable::_real_zero
protectedinherited

Scalar zero.

Definition at line 238 of file ScalarCoupleable.h.

◆ _sc_fe_problem

FEProblemBase& ScalarCoupleable::_sc_fe_problem
protectedinherited

◆ _sc_tid

const THREAD_ID ScalarCoupleable::_sc_tid
protectedinherited

Thread ID of the thread using this object.

Definition at line 235 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::ScalarCoupleable().

◆ _scalar_zero

const VariableValue& ScalarCoupleable::_scalar_zero
protectedinherited

Zero value of a scalar variable.

Definition at line 241 of file ScalarCoupleable.h.

◆ _second_phi_zero

const VariablePhiSecond& Coupleable::_second_phi_zero
protectedinherited

Zero second derivative of a test function.

Definition at line 1499 of file Coupleable.h.

◆ _second_zero

const VariableSecond& Coupleable::_second_zero
protectedinherited

Zero second derivative of a variable.

Definition at line 1496 of file Coupleable.h.

◆ _vector_curl_zero

const VectorVariableCurl& Coupleable::_vector_curl_zero
protectedinherited

Zero value of the curl of a vector variable.

Definition at line 1503 of file Coupleable.h.

◆ _vector_zero

const VectorVariableValue& Coupleable::_vector_zero
protectedinherited

Zero value of a vector variable.

Definition at line 1501 of file Coupleable.h.

◆ _zero

const VariableValue& Coupleable::_zero
protectedinherited

Zero value of a variable.

Definition at line 1484 of file Coupleable.h.


The documentation for this class was generated from the following files: