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

Enhances Coupleable interface to also couple the values from neighbor elements. More...

#include <NeighborCoupleable.h>

Inheritance diagram for NeighborCoupleable:
[legend]

Public Member Functions

 NeighborCoupleable (const MooseObject *moose_object, bool nodal, bool neighbor_nodal, bool is_fv=false)
 Constructing the object. More...
 
virtual const VariableValuecoupledNeighborValue (const std::string &var_name, unsigned int comp=0) const
 
std::vector< const VariableValue * > coupledNeighborValues (const std::string &var_name) const
 
std::vector< const VariableValue * > coupledNeighborValuesOld (const std::string &var_name) const
 
std::vector< const VariableValue * > coupledNeighborValuesOlder (const std::string &var_name) const
 
virtual const ADVariableValueadCoupledNeighborValue (const std::string &var_name, unsigned int comp=0) const
 Get the coupled neighbor variable value for var_name with derivative information for automatic differentiation objects. More...
 
template<bool is_ad>
const auto & coupledGenericNeighborValue (const std::string &var_name, unsigned int comp=0) const
 Retrieve the coupled neighbor variable value whether AD or not. More...
 
template<bool is_ad>
const auto & coupledGenericNeighborGradient (const std::string &var_name, unsigned int comp=0) const
 Retrieve the coupled neighbor variable gradient whether AD or not. More...
 
virtual const ADVariableValueadCoupledNeighborValueDot (const std::string &var_name, unsigned int comp=0) const
 Get the time derivative of the coupled neighbor variable value for var_name with derivative information for automatic differentiation objects. More...
 
std::vector< const ADVariableValue * > adCoupledNeighborValues (const std::string &var_name) const
 
virtual const ADVectorVariableValueadCoupledVectorNeighborValue (const std::string &var_name, unsigned int comp=0) const
 Get the coupled neighbor vector variable value for var_name with derivative information for automatic differentiation objects. More...
 
virtual const VariableValuecoupledNeighborValueDot (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNeighborValueDotDu (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNeighborValueOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNeighborValueOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledNeighborGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual std::vector< const VariableGradient * > coupledNeighborGradients (const std::string &var_name) const
 
virtual const VariableGradientcoupledNeighborGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableGradientcoupledNeighborGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ADVariableGradientadCoupledNeighborGradient (const std::string &var_name, unsigned int comp=0) const
 Get the coupled neighbor variable gradient for var_name with derivative information for automatic differentiation objects. More...
 
virtual const VectorVariableGradientcoupledVectorNeighborGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorNeighborGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VectorVariableGradientcoupledVectorNeighborGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableValuecoupledArrayNeighborValue (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayNeighborGradient (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayNeighborGradientOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const ArrayVariableGradientcoupledArrayNeighborGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableSecondcoupledNeighborSecond (const std::string &var_name, unsigned int i=0) const
 
virtual const VariableValuecoupledNeighborDofValues (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNeighborDofValuesOld (const std::string &var_name, unsigned int comp=0) const
 
virtual const VariableValuecoupledNeighborDofValuesOlder (const std::string &var_name, unsigned int comp=0) const
 
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...
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0)
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValuesByName (const std::string &var_name, const std::string &tag_name)
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0)
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientsByName (const std::string &var_name, const std::string &tag_name)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledVectorTagNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledVectorTagNodalValuesByName (const std::string &var_name, const std::string &tag_name)
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0)
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValues (const std::string &var_name, const std::string &tag_param_name)
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0)
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradients (const std::string &var_name, const std::string &tag_param_name)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledVectorTagNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledVectorTagNodalValues (const std::string &var_name, const std::string &tag_param_name)
 
Moose::Kokkos::VariableValue kokkosCoupledValue (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableValue kokkosCoupledValues (const std::string &var_name)
 
Moose::Kokkos::VariableGradient kokkosCoupledGradient (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableGradient kokkosCoupledGradients (const std::string &var_name)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalValue (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalValues (const std::string &var_name)
 
Moose::Kokkos::VariableValue kokkosCoupledValueOld (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOld (const std::string &var_name)
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOld (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOld (const std::string &var_name)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalValueOld (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalValuesOld (const std::string &var_name)
 
Moose::Kokkos::VariableValue kokkosCoupledValueOlder (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOlder (const std::string &var_name)
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOlder (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOlder (const std::string &var_name)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalValuesOlder (const std::string &var_name)
 
Moose::Kokkos::VariableValue kokkosCoupledDot (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableValue kokkosCoupledDots (const std::string &var_name)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalDot (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableNodalValue kokkosCoupledNodalDots (const std::string &var_name)
 
Moose::Kokkos::Scalar< const RealkokkosCoupledDotDu (const std::string &var_name, unsigned int comp=0)
 
Moose::Kokkos::VariableValue kokkosZeroValue ()
 
Moose::Kokkos::VariableGradient kokkosZeroGradient ()
 
Moose::Kokkos::VariableNodalValue kokkosZeroNodalValue ()
 

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
 

Protected Attributes

bool _neighbor_nodal
 
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...
 

Detailed Description

Enhances Coupleable interface to also couple the values from neighbor elements.

Definition at line 21 of file NeighborCoupleable.h.

Constructor & Destructor Documentation

◆ NeighborCoupleable()

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

Constructing the object.

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

Definition at line 18 of file NeighborCoupleable.C.

22  : Coupleable(moose_object, nodal, is_fv), _neighbor_nodal(neighbor_nodal)
23 {
24 }
Coupleable(const MooseObject *moose_object, bool nodal, bool is_fv=false)
Constructing the object.
Definition: Coupleable.C:27

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

1789 {
1790  const auto * var = getVectorVar(var_name, comp);
1791 
1792  if (!var)
1793  return getADDefaultCurl();
1795 
1796  if (!_c_is_implicit)
1797  mooseError("Not implemented");
1798 
1799  if (!_coupleable_neighbor)
1800  return var->adCurlSln();
1801  return var->adCurlSlnNeighbor();
1802 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const ADVectorVariableCurl & getADDefaultCurl() const
Helper method to return (and insert if necessary) the default curl value for Automatic Differentiatio...
Definition: Coupleable.C:2423
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713

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

2132 {
2133  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2134 
2135  if (!var)
2136  return *getADDefaultValue(var_name);
2138 
2139  if (!_c_is_implicit)
2140  mooseError("Not implemented");
2141 
2142  if (!_coupleable_neighbor)
2143  return var->adDofValues();
2144  return var->adDofValuesNeighbor();
2145 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:2371
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:1713

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

Referenced by Coupleable::adCoupledDots().

2282 {
2283  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2284 
2285  if (!var)
2286  return *getADDefaultValue(var_name);
2288 
2289  if (!_coupleable_neighbor)
2290  {
2291  if (_c_nodal)
2292  return var->adDofValuesDot();
2293  return var->adUDot();
2294  }
2295  else
2296  {
2297  if (_c_nodal)
2298  mooseError("AD neighbor nodal dof dot not implemented");
2299  return var->adUDotNeighbor();
2300  }
2301 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
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:2371
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:1713

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

2305 {
2306  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2307 
2308  if (!var)
2309  return *getADDefaultValue(var_name);
2311 
2312  if (_c_nodal)
2313  mooseError("Not implemented");
2314 
2315  if (!_coupleable_neighbor)
2316  return var->adUDotDot();
2317  return var->adUDotDotNeighbor();
2318 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
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:2371
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:1713

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

2785 {
2786  auto func = [this, &var_name](unsigned int comp) { return &adCoupledDot(var_name, comp); };
2787  return coupledVectorHelper<const ADVariableValue *>(var_name, func);
2788 }
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:2281

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

Referenced by Coupleable::adCoupledGradients().

2223 {
2224  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2225 
2226  if (!var)
2227  return getADDefaultGradient();
2229 
2230  if (!_c_is_implicit)
2231  mooseError("Not implemented");
2232 
2233  if (!_coupleable_neighbor)
2234  return var->adGradSln();
2235  return var->adGradSlnNeighbor();
2236 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2402
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713

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

2240 {
2241  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2242 
2243  if (!var)
2244  return getADDefaultGradient();
2246 
2247  if (!_c_is_implicit)
2248  mooseError("Not implemented");
2249 
2250  if (!_coupleable_neighbor)
2251  return var->adGradSlnDot();
2252  return var->adGradSlnNeighborDot();
2253 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2402
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713

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

2764 {
2765  auto func = [this, &var_name](unsigned int comp) { return &adCoupledGradient(var_name, comp); };
2766  return coupledVectorHelper<const ADVariableGradient *>(var_name, func);
2767 }
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:2222

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

2205 {
2206  auto var = getVarHelper<MooseVariableFE<Real>>(var_name, comp);
2207 
2208  if (!var)
2209  return *getADDefaultValue(var_name);
2211 
2212  if (!_c_is_implicit)
2213  mooseError("adCoupledLowerValue cannot be called in a coupleable neighbor object");
2214 
2215  if (_c_nodal)
2216  return var->adDofValues();
2217  else
2218  return var->adSlnLower();
2219 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:2371

◆ adCoupledNeighborGradient()

const ADVariableGradient & NeighborCoupleable::adCoupledNeighborGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Get the coupled neighbor variable gradient for var_name with derivative information for automatic differentiation objects.

Definition at line 224 of file NeighborCoupleable.C.

Referenced by coupledGenericNeighborGradient().

225 {
226  if (_neighbor_nodal)
227  mooseError("Nodal variables do not have gradients");
228  if (!_c_is_implicit)
229  mooseError(
230  "adCoupledNeighborGradient returns a data structure with derivatives. Explicit schemes "
231  "use old solution data which do not have derivatives so adCoupledNeighborGradient is "
232  "not appropriate. Please use coupledNeighborGradient instead");
233 
234  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
235  return var->adGradSlnNeighbor();
236 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ adCoupledNeighborValue()

const ADVariableValue & NeighborCoupleable::adCoupledNeighborValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Get the coupled neighbor variable value for var_name with derivative information for automatic differentiation objects.

Definition at line 61 of file NeighborCoupleable.C.

Referenced by adCoupledNeighborValues(), and coupledGenericNeighborValue().

62 {
63  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
64 
65  if (!var)
66  return *getADDefaultValue(var_name);
67 
68  if (_neighbor_nodal)
69  mooseError("adCoupledNeighborValue cannot be used for nodal compute objects at this time");
70  if (!_c_is_implicit)
71  mooseError("adCoupledNeighborValue returns a data structure with derivatives. Explicit schemes "
72  "use old solution data which do not have derivatives so adCoupledNeighborValue is "
73  "not appropriate. Please use coupledNeighborValue instead");
74 
75  return var->adSlnNeighbor();
76 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:2371

◆ adCoupledNeighborValueDot()

const ADVariableValue & NeighborCoupleable::adCoupledNeighborValueDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Get the time derivative of the coupled neighbor variable value for var_name with derivative information for automatic differentiation objects.

Definition at line 79 of file NeighborCoupleable.C.

80 {
81  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
82 
83  if (!_c_is_implicit)
84  mooseError(
85  "adCoupledNeighborValueDot returns a data structure with derivatives. Explicit schemes "
86  "use old solution data which do not have derivatives so adCoupledNeighborValueDot is "
87  "not appropriate. Please use coupledNeighborValueDot instead");
88 
89  if (_neighbor_nodal)
90  mooseError("adCoupledNeighborValueDot cannot be used for nodal compute objects at this time");
91  else
92  return var->adUDotNeighbor();
93 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ adCoupledNeighborValues()

std::vector< const ADVariableValue * > NeighborCoupleable::adCoupledNeighborValues ( const std::string &  var_name) const

Definition at line 96 of file NeighborCoupleable.C.

97 {
98  auto func = [this, &var_name](unsigned int comp)
99  { return &adCoupledNeighborValue(var_name, comp); };
100  return coupledVectorHelper<const ADVariableValue *>(var_name, func);
101 }
virtual const ADVariableValue & adCoupledNeighborValue(const std::string &var_name, unsigned int comp=0) const
Get the coupled neighbor variable value for var_name with derivative information for automatic differ...

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

2163 {
2164  static const typename Moose::ADType<T>::type zero = 0;
2165  if (!isCoupled(var_name))
2166  return zero;
2167 
2168  if (!_c_nodal)
2169  mooseError("The adCoupledNodalValue method should only be called for nodal computing objects");
2171  mooseError(
2172  "The adCoupledNodalValue method shouldn't be called for neighbor computing objects. I "
2173  "don't even know what that would mean, although maybe someone could explain it to me.");
2174  if (!_c_is_implicit)
2175  mooseError("If you're going to use an explicit scheme, then use coupledNodalValue instead of "
2176  "adCoupledNodalValue");
2177 
2178  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2179 
2180  return var->adNodalValue();
2181 }
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:159
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const Number zero
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713

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

2257 {
2258  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2259 
2260  if (!var)
2261  return getADDefaultSecond();
2263 
2264  if (!_c_is_implicit)
2265  mooseError("Not implemented");
2266 
2267  if (!_coupleable_neighbor)
2268  return var->adSecondSln();
2269  else
2270  return var->adSecondSlnNeighbor();
2271 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
const ADVariableSecond & getADDefaultSecond() const
Helper method to return (and insert if necessary) the default second derivatives for Automatic Differ...
Definition: Coupleable.C:2416

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

Referenced by Coupleable::adCoupledValues().

2185 {
2186  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2187 
2188  if (!var)
2189  return *getADDefaultValue(var_name);
2191 
2192  if (!_c_is_implicit)
2193  mooseError("Not implemented");
2194 
2195  if (_c_nodal)
2196  return var->adDofValues();
2197 
2198  if (!_coupleable_neighbor)
2199  return var->adSln();
2200  return var->adSlnNeighbor();
2201 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:2371
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:1713

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

2567 {
2568  auto func = [this, &var_name](unsigned int comp) { return &adCoupledValue(var_name, comp); };
2569  return coupledVectorHelper<const ADVariableValue *>(var_name, func);
2570 }
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:2184

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

2322 {
2323  const auto * var = getVectorVar(var_name, comp);
2324  if (!var)
2325  return *getADDefaultVectorValue(var_name);
2327 
2328  if (_c_nodal)
2329  mooseError("Not implemented");
2330 
2331  if (!_coupleable_neighbor)
2332  return var->adUDot();
2333  return var->adUDotNeighbor();
2334 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:2385
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
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:1713

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

2356 {
2357  const auto * var = getVectorVar(var_name, comp);
2358  if (!var)
2359  return getADDefaultVectorGradient();
2361 
2362  if (!_c_is_implicit)
2363  mooseError("Not implemented");
2364 
2365  if (!_coupleable_neighbor)
2366  return var->adGradSln();
2367  return var->adGradSlnNeighbor();
2368 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
const ADVectorVariableGradient & getADDefaultVectorGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...
Definition: Coupleable.C:2409
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:1713

◆ adCoupledVectorNeighborValue()

const ADVectorVariableValue & NeighborCoupleable::adCoupledVectorNeighborValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Get the coupled neighbor vector variable value for var_name with derivative information for automatic differentiation objects.

Definition at line 104 of file NeighborCoupleable.C.

106 {
107  auto var = getVarHelper<MooseVariableField<RealVectorValue>>(var_name, comp);
108 
109  if (!var)
110  return *getADDefaultVectorValue(var_name);
111 
112  if (_neighbor_nodal)
113  mooseError(
114  "adCoupledVectorNeighborValue cannot be used for nodal compute objects at this time");
115  if (!_c_is_implicit)
116  mooseError(
117  "adCoupledVectorNeighborValue returns a data structure with derivatives. Explicit schemes "
118  "use old solution data which do not have derivatives so adCoupledVectorNeighborValue is "
119  "not appropriate. Please use coupledNeighborValue instead");
120 
121  return var->adSlnNeighbor();
122 }
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:2385
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

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

Referenced by Coupleable::adCoupledVectorValues().

2338 {
2339  const auto * var = getVectorVar(var_name, comp);
2340  if (!var)
2341  return *getADDefaultVectorValue(var_name);
2343 
2344  if (_c_nodal)
2345  mooseError("Not implemented");
2346  if (!_c_is_implicit)
2347  mooseError("Not implemented");
2348 
2349  if (!_coupleable_neighbor)
2350  return var->adSln();
2351  return var->adSlnNeighbor();
2352 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:2385
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713

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

2574 {
2575  auto func = [this, &var_name](unsigned int comp)
2576  { return &adCoupledVectorValue(var_name, comp); };
2577  return coupledVectorHelper<const ADVectorVariableValue *>(var_name, func);
2578 }
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:2337

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 115 of file Coupleable.h.

Referenced by Coupleable::coupledMatrixTagValue().

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

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

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

2438 {
2439  mooseDeprecated("Method adZeroGradient() is deprecated. Use '_ad_grad_zero' instead.");
2440  return _ad_grad_zero;
2441 }
const MooseArray< ADRealVectorValue > & _ad_grad_zero
Definition: Coupleable.h:1501
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:374

◆ adZeroSecond()

const ADVariableSecond & Coupleable::adZeroSecond ( ) const
protectedinherited

Retrieve a zero second for automatic differentiation.

Definition at line 2444 of file Coupleable.C.

2445 {
2446  mooseDeprecated("Method adZeroSecond() is deprecated. Use '_ad_second_zero' instead.");
2447  return _ad_second_zero;
2448 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:374
const MooseArray< ADRealTensorValue > & _ad_second_zero
Definition: Coupleable.h:1508

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

2431 {
2432  mooseDeprecated("Method adZeroValue() is deprecated. Use '_ad_zero' instead.");
2433  return _ad_zero;
2434 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:374
const MooseArray< ADReal > & _ad_zero
Definition: Coupleable.h:1497

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

Referenced by Coupleable::getVarHelper().

242 {
243  const auto var_name = _c_parameters.checkForRename(var_name_in);
244  auto it = _c_coupled_scalar_vars.find(var_name);
245  if (it != _c_coupled_scalar_vars.end())
246  {
247  std::string cvars;
248  for (auto jt : it->second)
249  cvars += " " + jt->name();
250 
251  _obj->paramError(var_name,
252  "cannot couple '",
253  var_name,
254  "' to a scalar variable (",
255  cvars,
256  ") where field variable is expected");
257  }
258 
259  if (!isCoupled(var_name, comp))
260  return false; // return false since variable is *not* coupled
261 
262  auto vars_vector_it = _coupled_vars.find(var_name);
263  if (vars_vector_it == _coupled_vars.end())
264  mooseError(_c_name, ": Trying to get a coupled var ", var_name, " that doesn't exist");
265 
266  const auto & vars_vector = vars_vector_it->second;
267 
268  auto bound = comp_bound ? comp_bound : vars_vector.size();
269  checkComponent(_obj, comp, bound, var_name);
270 
271  // We should know we have a variable now
272  const auto * var = vars_vector[comp];
273  if (!var)
274  mooseError(
275  _c_name,
276  ": We did all our checks for the existence of a var, yet we still don't have a var!?");
277 
278  // Only perform the following checks for objects that feed into residuals/Jacobians, e.g. objects
279  // that inherit from the TaggingInterface
280  if (_c_parameters.have_parameter<MultiMooseEnum>("vector_tags"))
281  {
282  // Are we attempting to couple to a non-FV var in an FV object?
283  if (!var->isFV() && _is_fv)
284  mooseError("Attempting to couple non-FV variable ",
285  var->name(),
286  " into an FV object ",
287  _c_name,
288  ". This is not currently supported");
289  }
290 
291  if (!(vars_vector[comp])->isNodal() && _c_nodal && !_c_allow_element_to_nodal_coupling)
292  mooseError(_c_name, ": cannot couple elemental variables into nodal objects");
293 
294  return true;
295 }
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:159
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:439
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1420
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const bool _is_fv
Whether the MooseObject is a finite volume object.
Definition: Coupleable.h:1812
const bool _c_allow_element_to_nodal_coupling
Definition: Coupleable.h:1447
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
Scalar variables coupled into this object (for error checking)
Definition: Coupleable.h:1805
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
const MooseObject *const _obj
Definition: Coupleable.h:1814
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:208
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:1406
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...

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

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

983 {
984  // check domain restrictions for compatibility
985  const auto * br = dynamic_cast<const BlockRestrictable *>(this);
986  const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
987 
988  if (br && !var->hasBlocks(br->blockIDs()))
989  mooseError("The variable '",
990  var->name(),
991  "' must be defined on all blocks '",
992  _obj->name(),
993  "' is defined on.");
994 
995  if (nfc && !var->hasBlocks(nfc->getSecondaryConnectedBlocks()))
996  mooseError("The variable '",
997  var->name(),
998  " must be defined on all blocks '",
999  _obj->name(),
1000  "'s secondary surface is defined on.");
1001 
1002  // make sure only one object can access a variable
1003  for (const auto & ci : _obj->getMooseApp().getInterfaceObjects<Coupleable>())
1004  if (ci != this && ci->_writable_coupled_variables[_c_tid].count(var))
1005  {
1006  // if both this and ci are block restrictable then we check if the block restrictions
1007  // are not overlapping. If they don't we permit the call.
1008  const auto * br_other = dynamic_cast<const BlockRestrictable *>(ci);
1009  if (br && br_other && br->blockRestricted() && br_other->blockRestricted() &&
1010  !MooseUtils::setsIntersect(br->blockIDs(), br_other->blockIDs()))
1011  continue;
1012  else if (nfc)
1013  continue;
1014 
1015  mooseError("'",
1016  ci->_obj->name(),
1017  "' already obtained a writable reference to '",
1018  var->name(),
1019  "'. Only one object can obtain such a reference per variable and subdomain in a "
1020  "simulation.");
1021  }
1022 
1023  // var is unique across threads, so we could forego having a separate set per thread, but we
1024  // need quick access to the list of all variables that need to be inserted into the solution
1025  // vector by a given thread.
1026 
1027  _writable_coupled_variables[_c_tid].insert(var);
1028 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
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:1158
THREAD_ID _c_tid
Thread ID of the thread using this object.
Definition: Coupleable.h:1450
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:1821
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:87
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh...
const MooseObject *const _obj
Definition: Coupleable.h:1814
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:49
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:1678

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

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

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

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

2071 {
2072  auto func = [this, &var_name](unsigned int comp) { return &coupledDofValues(var_name, comp); };
2073  return coupledVectorHelper<const VariableValue *>(var_name, func);
2074 }
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:2057

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

2091 {
2092  auto func = [this, &var_name](unsigned int comp) { return &coupledDofValuesOld(var_name, comp); };
2093  return coupledVectorHelper<const VariableValue *>(var_name, func);
2094 }
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:2077

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

2111 {
2112  auto func = [this, &var_name](unsigned int comp)
2113  { return &coupledDofValuesOlder(var_name, comp); };
2114  return coupledVectorHelper<const VariableValue *>(var_name, func);
2115 }
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:2097

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

2119 {
2120  const auto * var = getArrayVar(var_name, comp);
2121  if (!var)
2122  return *getDefaultArrayValue(var_name);
2124 
2125  if (!_coupleable_neighbor)
2126  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2127  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2128 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:427
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

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

1381 {
1382  const auto * var = getArrayVar(var_name, comp);
1383  if (!var)
1386 
1387  if (!_coupleable_neighbor)
1388  {
1389  if (_c_nodal)
1390  return var->dofValuesDot();
1391  return var->uDot();
1392  }
1393  else
1394  {
1395  if (_c_nodal)
1396  return var->dofValuesDotNeighbor();
1397  return var->uDotNeighbor();
1398  }
1399 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1535

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

1403 {
1404  const auto * var = getArrayVar(var_name, comp);
1405  if (!var)
1408 
1409  if (!_coupleable_neighbor)
1410  {
1411  if (_c_nodal)
1412  return var->dofValuesDotDot();
1413  return var->uDotDot();
1414  }
1415  else
1416  {
1417  if (_c_nodal)
1418  return var->dofValuesDotDotNeighbor();
1419  return var->uDotDotNeighbor();
1420  }
1421 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1535

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

1447 {
1448  const auto * var = getArrayVar(var_name, comp);
1449  if (!var)
1452 
1453  if (!_coupleable_neighbor)
1454  {
1455  if (_c_nodal)
1456  return var->dofValuesDotDotOld();
1457  return var->uDotDotOld();
1458  }
1459  else
1460  {
1461  if (_c_nodal)
1462  return var->dofValuesDotDotOldNeighbor();
1463  return var->uDotDotOldNeighbor();
1464  }
1465 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1535

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

1519 {
1520  const auto * const var = getArrayVar(var_name, comp);
1521  if (!var)
1522  {
1524  return _default_value_zero;
1525  }
1527 
1528  if (!_coupleable_neighbor)
1529  {
1530  if (_c_nodal)
1531  return var->dofValuesDuDotDu();
1532  return var->duDotDu();
1533  }
1534  else
1535  {
1536  if (_c_nodal)
1537  return var->dofValuesDuDotDuNeighbor();
1538  return var->duDotDuNeighbor();
1539  }
1540 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
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:1799

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

1425 {
1426  const auto * var = getArrayVar(var_name, comp);
1427  if (!var)
1430 
1431  if (!_coupleable_neighbor)
1432  {
1433  if (_c_nodal)
1434  return var->dofValuesDotOld();
1435  return var->uDotOld();
1436  }
1437  else
1438  {
1439  if (_c_nodal)
1440  return var->dofValuesDotOldNeighbor();
1441  return var->uDotOldNeighbor();
1442  }
1443 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1535

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

1689 {
1690  const auto * var = getArrayVar(var_name, comp);
1691  if (!var)
1692  return _default_array_gradient;
1694 
1695  if (!_coupleable_neighbor)
1696  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1697  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1698 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1538

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

1728 {
1729  const auto * const var = getArrayVar(var_name, comp);
1730  if (!var)
1731  return _default_array_gradient;
1733 
1734  if (!_coupleable_neighbor)
1735  return var->gradSlnDot();
1736  return var->gradSlnNeighborDot();
1737 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1538

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

1702 {
1703  const auto * var = getArrayVar(var_name, comp);
1704  if (!var)
1705  return _default_array_gradient;
1707 
1708  if (!_coupleable_neighbor)
1709  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1710  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1711 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1538

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

1715 {
1716  const auto * var = getArrayVar(var_name, comp);
1717  if (!var)
1718  return _default_array_gradient;
1720 
1721  if (!_coupleable_neighbor)
1722  return var->gradSlnOlder();
1723  return var->gradSlnOlderNeighbor();
1724 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1538

◆ coupledArrayNeighborGradient()

const ArrayVariableGradient & NeighborCoupleable::coupledArrayNeighborGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 287 of file NeighborCoupleable.C.

289 {
290  if (_neighbor_nodal)
291  mooseError("Gradients are non-sensical with nodal compute objects");
292 
293  const auto * var = getArrayVar(var_name, comp);
294  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
295 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

◆ coupledArrayNeighborGradientOld()

const ArrayVariableGradient & NeighborCoupleable::coupledArrayNeighborGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 298 of file NeighborCoupleable.C.

300 {
301  if (_neighbor_nodal)
302  mooseError("Gradients are non-sensical with nodal compute objects");
303 
304  validateExecutionerType(var_name, "coupledArrayNeighborGradientOld");
305  const auto * var = getArrayVar(var_name, comp);
306  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
307 }
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...
Definition: Coupleable.C:2148
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

◆ coupledArrayNeighborGradientOlder()

const ArrayVariableGradient & NeighborCoupleable::coupledArrayNeighborGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 310 of file NeighborCoupleable.C.

312 {
313  if (_neighbor_nodal)
314  mooseError("Gradients are non-sensical with nodal compute objects");
315 
316  validateExecutionerType(var_name, "coupledArrayNeighborGradientOlder");
317  const auto * var = getArrayVar(var_name, comp);
318  if (_c_is_implicit)
319  return var->gradSlnOlderNeighbor();
320  else
321  mooseError("Older values not available for explicit schemes");
322 }
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...
Definition: Coupleable.C:2148
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

◆ coupledArrayNeighborValue()

const ArrayVariableValue & NeighborCoupleable::coupledArrayNeighborValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 277 of file NeighborCoupleable.C.

278 {
279  const auto * var = getArrayVar(var_name, comp);
280  if (_neighbor_nodal)
281  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
282  else
283  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
284 }
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

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

Referenced by Coupleable::coupledArrayValues().

880 {
881  const auto * var = getArrayVar(var_name, comp);
882  if (!var)
883  return *getDefaultArrayValue(var_name);
885 
887  {
888  if (_c_nodal)
889  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
890  return (_c_is_implicit) ? var->sln() : var->slnOld();
891  }
892  else
893  {
894  if (_c_nodal)
895  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
896  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
897  }
898 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:427
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

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

1127 {
1128  const auto * var = getArrayVar(var_name, comp);
1129  if (!var)
1130  return *getDefaultArrayValue(var_name);
1132 
1133  if (!_coupleable_neighbor)
1134  {
1135  if (_c_nodal)
1136  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1137  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1138  }
1139  else
1140  {
1141  if (_c_nodal)
1142  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1143  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1144  }
1145 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:427
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

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

1149 {
1150  const auto * var = getArrayVar(var_name, comp);
1151  if (!var)
1152  return *getDefaultArrayValue(var_name);
1154 
1155  if (!_coupleable_neighbor)
1156  {
1157  if (_c_nodal)
1158  return var->dofValuesOlder();
1159  return var->slnOlder();
1160  }
1161  else
1162  {
1163  if (_c_nodal)
1164  return var->dofValuesOlderNeighbor();
1165  return var->slnOlderNeighbor();
1166  }
1167 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
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:427
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:1713
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

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

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

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

Referenced by Coupleable::checkFuncType().

146 {}

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

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

189 {
190  const auto var_name = _c_parameters.checkForRename(var_name_in);
191 
192  if (isCoupled(var_name))
193  {
194  mooseAssert(_coupled_vars.find(var_name) != _coupled_vars.end(),
195  var_name << " must not actually be coupled!");
196  return _coupled_vars.at(var_name).size();
197  }
198  else
199  {
201  return _c_parameters.numberDefaultCoupledValues(var_name);
202  else
203  return 0;
204  }
205 }
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:159
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1420
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:1406

◆ 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 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 (_c_is_implicit) ? var->curlSln() : var->curlSlnOld();
1752  return (_c_is_implicit) ? var->curlSlnNeighbor() : var->curlSlnOldNeighbor();
1753 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1526
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1757 {
1758  const auto * var = getVectorVar(var_name, comp);
1759  if (!var)
1760  {
1762  return _default_vector_curl;
1763  }
1765 
1766  if (!_coupleable_neighbor)
1767  return (_c_is_implicit) ? var->curlSlnOld() : var->curlSlnOlder();
1768  return (_c_is_implicit) ? var->curlSlnOldNeighbor() : var->curlSlnOlderNeighbor();
1769 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1526
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1773 {
1774  const auto * var = getVectorVar(var_name, comp);
1775  if (!var)
1776  {
1778  return _default_vector_curl;
1779  }
1781 
1782  if (!_coupleable_neighbor)
1783  return var->curlSlnOlder();
1784  return var->curlSlnOlderNeighbor();
1785 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1526
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

◆ 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 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 (_c_is_implicit) ? var->divSln() : var->divSlnOld();
1817  return (_c_is_implicit) ? var->divSlnNeighbor() : var->divSlnOldNeighbor();
1818 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1529
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1822 {
1823  const auto * var = getVectorVar(var_name, comp);
1824  if (!var)
1825  {
1827  return _default_div;
1828  }
1830 
1831  if (!_coupleable_neighbor)
1832  return (_c_is_implicit) ? var->divSlnOld() : var->divSlnOlder();
1833  return (_c_is_implicit) ? var->divSlnOldNeighbor() : var->divSlnOlderNeighbor();
1834 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1529
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1838 {
1839  const auto * var = getVectorVar(var_name, comp);
1840  if (!var)
1841  {
1843  return _default_div;
1844  }
1846 
1847  if (!_coupleable_neighbor)
1848  return var->divSlnOlder();
1849  return var->divSlnOlderNeighbor();
1850 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1529
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

Referenced by Coupleable::coupledAllDofValues().

2058 {
2059  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2060  if (!var)
2061  return *getDefaultValue(var_name, comp);
2063 
2064  if (!_coupleable_neighbor)
2065  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2066  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2067 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:365
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:1713

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

Referenced by Coupleable::coupledAllDofValuesOld().

2078 {
2079  const auto * var = getVar(var_name, comp);
2080  if (!var)
2081  return *getDefaultValue(var_name, comp);
2083 
2084  if (!_coupleable_neighbor)
2085  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
2086  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
2087 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:365
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:1713

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

Referenced by Coupleable::coupledAllDofValuesOlder().

2098 {
2099  const auto * var = getVar(var_name, comp);
2100  if (!var)
2101  return *getDefaultValue(var_name, comp);
2103 
2104  if (!_coupleable_neighbor)
2105  return var->dofValuesOlder();
2106  return var->dofValuesOlderNeighbor();
2107 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:365
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:1713

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

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

1171 {
1172  const auto * var = getVar(var_name, comp);
1173  if (!var)
1174  {
1176  return _default_value_zero;
1177  }
1179 
1180  if (!_coupleable_neighbor)
1181  {
1182  if (_c_nodal)
1183  return var->dofValuesDot();
1184  return var->uDot();
1185  }
1186  else
1187  {
1188  if (_c_nodal)
1189  return var->dofValuesDotNeighbor();
1190  return var->uDotNeighbor();
1191  }
1192 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

1196 {
1197  const auto * var = getVar(var_name, comp);
1198  if (!var)
1199  {
1201  return _default_value_zero;
1202  }
1204 
1205  if (!_coupleable_neighbor)
1206  {
1207  if (_c_nodal)
1208  return var->dofValuesDotDot();
1209  return var->uDotDot();
1210  }
1211  else
1212  {
1213  if (_c_nodal)
1214  return var->dofValuesDotDotNeighbor();
1215  return var->uDotDotNeighbor();
1216  }
1217 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

1494 {
1495  const auto * var = getVar(var_name, comp);
1496  if (!var)
1497  {
1499  return _default_value_zero;
1500  }
1502 
1503  if (!_coupleable_neighbor)
1504  {
1505  if (_c_nodal)
1506  return var->dofValuesDuDotDotDu();
1507  return var->duDotDotDu();
1508  }
1509  else
1510  {
1511  if (_c_nodal)
1512  return var->dofValuesDuDotDotDuNeighbor();
1513  return var->duDotDotDuNeighbor();
1514  }
1515 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

1260 {
1261  const auto * var = getVar(var_name, comp);
1262  if (!var)
1263  {
1265  return _default_value_zero;
1266  }
1268 
1269  if (!_coupleable_neighbor)
1270  {
1271  if (_c_nodal)
1272  return var->dofValuesDotDotOld();
1273  return var->uDotDotOld();
1274  }
1275  else
1276  {
1277  if (_c_nodal)
1278  return var->dofValuesDotDotOldNeighbor();
1279  return var->uDotDotOldNeighbor();
1280  }
1281 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

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

1469 {
1470  const auto * var = getVar(var_name, comp);
1471  if (!var)
1472  {
1474  return _default_value_zero;
1475  }
1477 
1478  if (!_coupleable_neighbor)
1479  {
1480  if (_c_nodal)
1481  return var->dofValuesDuDotDu();
1482  return var->duDotDu();
1483  }
1484  else
1485  {
1486  if (_c_nodal)
1487  return var->dofValuesDuDotDuNeighbor();
1488  return var->duDotDuNeighbor();
1489  }
1490 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

1235 {
1236  const auto * var = getVar(var_name, comp);
1237  if (!var)
1238  {
1240  return _default_value_zero;
1241  }
1243 
1244  if (!_coupleable_neighbor)
1245  {
1246  if (_c_nodal)
1247  return var->dofValuesDotOld();
1248  return var->uDotOld();
1249  }
1250  else
1251  {
1252  if (_c_nodal)
1253  return var->dofValuesDotOldNeighbor();
1254  return var->uDotOldNeighbor();
1255  }
1256 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

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

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

620 {
621  return coupledDofValues(var_name, comp);
622 }
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:2057

◆ coupledGenericDofValue() [3/3]

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

Definition at line 626 of file Coupleable.C.

627 {
628  return adCoupledDofValues(var_name, comp);
629 }
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:2131

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

2793 {
2794  return coupledDot(var_name, comp);
2795 }
virtual const VariableValue & coupledDot(const std::string &var_name, unsigned int comp=0) const
Time derivative of a coupled variable.
Definition: Coupleable.C:1170

◆ coupledGenericDot() [3/3]

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

Definition at line 2799 of file Coupleable.C.

2800 {
2801  return adCoupledDot(var_name, comp);
2802 }
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:2281

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

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

◆ coupledGenericDotDot() [3/3]

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

Definition at line 1228 of file Coupleable.C.

1229 {
1230  return adCoupledDotDot(var_name, comp);
1231 }
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:2304

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

2495 {
2496  return coupledGradient(var_name, comp);
2497 }
virtual const VariableGradient & coupledGradient(const std::string &var_name, unsigned int comp=0) const
Returns gradient of a coupled variable.
Definition: Coupleable.C:1543

◆ coupledGenericGradient() [3/3]

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

Definition at line 2501 of file Coupleable.C.

2502 {
2503  return adCoupledGradient(var_name, comp);
2504 }
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:2222

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

2750 {
2751  return coupledGradients(var_name);
2752 }
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:2741

◆ coupledGenericGradients() [3/3]

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

Definition at line 2756 of file Coupleable.C.

2757 {
2758  auto func = [this, &var_name](unsigned int comp) { return &adCoupledGradient(var_name, comp); };
2759  return coupledVectorHelper<const GenericVariableGradient<true> *>(var_name, func);
2760 }
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:2222

◆ coupledGenericNeighborGradient()

template<bool is_ad>
const auto & NeighborCoupleable::coupledGenericNeighborGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const

Retrieve the coupled neighbor variable gradient whether AD or not.

Definition at line 147 of file NeighborCoupleable.h.

149 {
150  if constexpr (is_ad)
151  return adCoupledNeighborGradient(var_name, comp);
152  else
153  return coupledNeighborGradient(var_name, comp);
154 }
virtual const ADVariableGradient & adCoupledNeighborGradient(const std::string &var_name, unsigned int comp=0) const
Get the coupled neighbor variable gradient for var_name with derivative information for automatic dif...
virtual const VariableGradient & coupledNeighborGradient(const std::string &var_name, unsigned int comp=0) const

◆ coupledGenericNeighborValue()

template<bool is_ad>
const auto & NeighborCoupleable::coupledGenericNeighborValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const

Retrieve the coupled neighbor variable value whether AD or not.

Definition at line 136 of file NeighborCoupleable.h.

138 {
139  if constexpr (is_ad)
140  return adCoupledNeighborValue(var_name, comp);
141  else
142  return coupledNeighborValue(var_name, comp);
143 }
virtual const VariableValue & coupledNeighborValue(const std::string &var_name, unsigned int comp=0) const
virtual const ADVariableValue & adCoupledNeighborValue(const std::string &var_name, unsigned int comp=0) const
Get the coupled neighbor variable value for var_name with derivative information for automatic differ...

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

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

◆ coupledGenericValue() [3/3]

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

Definition at line 507 of file Coupleable.C.

508 {
509  return adCoupledValue(var_name, comp);
510 }
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:2184

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

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

◆ coupledGenericValues() [3/3]

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

Definition at line 2560 of file Coupleable.C.

2561 {
2562  return adCoupledValues(var_name);
2563 }
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:2566

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

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

◆ coupledGenericVectorValue() [3/3]

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

Definition at line 521 of file Coupleable.C.

522 {
523  return adCoupledVectorValue(var_name, comp);
524 }
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:2337

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

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

1544 {
1545  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
1546  if (!var)
1547  {
1549  return _default_gradient;
1550  }
1552 
1553  if (!_coupleable_neighbor)
1554  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1555  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1556 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1477
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1609 {
1610  const auto * var = getVar(var_name, comp);
1611  if (!var)
1612  {
1614  return _default_gradient;
1615  }
1617 
1618  if (!_coupleable_neighbor)
1619  return var->gradSlnDot();
1620  return var->gradSlnNeighborDot();
1621 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1477
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1625 {
1626  const auto * var = getVar(var_name, comp);
1627  if (!var)
1628  {
1630  return _default_gradient;
1631  }
1633 
1634  if (!_coupleable_neighbor)
1635  return var->gradSlnDotDot();
1636  return var->gradSlnNeighborDotDot();
1637 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1477
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

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

1560 {
1561  const auto * var = getVar(var_name, comp);
1562  if (!var)
1563  {
1565  return _default_gradient;
1566  }
1568 
1569  if (!_coupleable_neighbor)
1570  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1571  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1572 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1477
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

Referenced by NodeFaceConstraint::coupledSecondaryGradientOlder().

1576 {
1577  const auto * var = getVar(var_name, comp);
1578  if (!var)
1579  {
1581  return _default_gradient;
1582  }
1584 
1585  if (!_coupleable_neighbor)
1586  return var->gradSlnOlder();
1587  return var->gradSlnOlderNeighbor();
1588 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1477
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1592 {
1593  const auto * var = getVar(var_name, comp);
1595  if (!var)
1596  {
1598  return _default_gradient;
1599  }
1601 
1602  if (!_coupleable_neighbor)
1603  return var->gradSlnPreviousNL();
1604  return var->gradSlnPreviousNLNeighbor();
1605 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1477
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

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

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

2771 {
2772  auto func = [this, &var_name](unsigned int comp) { return &coupledGradientOld(var_name, comp); };
2773  return coupledVectorHelper<const VariableGradient *>(var_name, func);
2774 }
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:1559

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

2508 {
2509  auto func = [this, &var_name](unsigned int comp) { return coupled(var_name, comp); };
2510  return coupledVectorHelper<unsigned int>(var_name, func);
2511 }
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:472

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

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

824 {
825  const auto * var = getVarHelper<MooseVariableField<Real>>(var_names, index);
826  if (!var)
827  mooseError(var_names, ": invalid variable name for coupledMatrixTagValue");
829 
830  const_cast<Coupleable *>(this)->addFEVariableCoupleableMatrixTag(tag);
831 
832  if (_c_nodal)
833  return var->nodalMatrixTagValue(tag);
834  return var->matrixTagValue(tag);
835 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:49
void addFEVariableCoupleableMatrixTag(TagID tag)
Definition: Coupleable.h:115

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

841 {
842  if (!_c_parameters.isParamValid(tag_name))
843  mooseError("Tag name parameter '", tag_name, "' is invalid");
844 
845  TagName tagname = _c_parameters.get<TagName>(tag_name);
846  if (!_c_fe_problem.matrixTagExists(tagname))
847  mooseError("Matrix tag name '", tagname, "' does not exist");
848 
849  TagID tag = _c_fe_problem.getMatrixTagID(tagname);
850  return coupledMatrixTagValue(var_names, tag, index);
851 }
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:323
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:821
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
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:1406
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 2696 of file Coupleable.C.

Referenced by Coupleable::coupledMatrixTagValues().

2697 {
2698  auto func = [this, &var_names, &tag](unsigned int comp)
2699  { return &coupledMatrixTagValue(var_names, tag, comp); };
2700  return coupledVectorHelper<const VariableValue *>(var_names, func);
2701 }
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:821

◆ coupledMatrixTagValues() [2/2]

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

Definition at line 2704 of file Coupleable.C.

2706 {
2707  if (!_c_parameters.isParamValid(tag_name))
2708  mooseError("Tag name parameter '", tag_name, "' is invalid");
2709 
2710  TagName tagname = _c_parameters.get<TagName>(tag_name);
2711  if (!_c_fe_problem.matrixTagExists(tagname))
2712  mooseError("Matrix tag name '", tagname, "' does not exist");
2713 
2714  TagID tag = _c_fe_problem.getMatrixTagID(tagname);
2715  return coupledMatrixTagValues(var_names, tag);
2716 }
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:323
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:1414
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:2696
const InputParameters & _c_parameters
Definition: Coupleable.h:1406
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 2514 of file Coupleable.C.

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

2515 {
2516  if (getFieldVar(var_name, comp))
2517  return getFieldVar(var_name, comp)->name();
2518  // Detect if we are in the case where a constant was passed in lieu of a variable
2519  else if (isCoupledConstant(var_name))
2521  ": a variable name was queried but a constant was passed for parameter '",
2522  var_name,
2523  "Either pass a true variable or contact a developer to shield the call to "
2524  "'coupledName' with 'isCoupledConstant'");
2525  else
2526  mooseError(
2527  _c_name, ": Variable '", var_name, "' does not exist, yet its coupled name is requested");
2528 }
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:182
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
Definition: Coupleable.C:312

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

2532 {
2533  auto func = [this, &var_name](unsigned int comp) { return coupledName(var_name, comp); };
2534  return coupledVectorHelper<VariableName>(var_name, func);
2535 }
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
Names of the variable in the Coupleable interface.
Definition: Coupleable.C:2514

◆ coupledNeighborDofValues()

const VariableValue & NeighborCoupleable::coupledNeighborDofValues ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 335 of file NeighborCoupleable.C.

336 {
337  if (_neighbor_nodal)
338  mooseError("nodal objects should not call coupledDofValues");
339 
340  const auto * var = getVar(var_name, comp);
341  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
342 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborDofValuesOld()

const VariableValue & NeighborCoupleable::coupledNeighborDofValuesOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 345 of file NeighborCoupleable.C.

347 {
348  if (_neighbor_nodal)
349  mooseError("nodal objects should not call coupledDofValuesOld");
350 
351  validateExecutionerType(var_name, "coupledNeighborDofValuesOld");
352  const auto * var = getVar(var_name, comp);
353  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
354 }
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...
Definition: Coupleable.C:2148
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborDofValuesOlder()

const VariableValue & NeighborCoupleable::coupledNeighborDofValuesOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 357 of file NeighborCoupleable.C.

359 {
360  if (_neighbor_nodal)
361  mooseError("nodal objects should not call coupledDofValuesOlder");
362 
363  validateExecutionerType(var_name, "coupledNeighborDofValuesOlder");
364  const auto * var = getVar(var_name, comp);
365  if (_c_is_implicit)
366  return var->dofValuesOlderNeighbor();
367  else
368  mooseError("Older values not available for explicit schemes");
369 }
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...
Definition: Coupleable.C:2148
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborGradient()

const VariableGradient & NeighborCoupleable::coupledNeighborGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 179 of file NeighborCoupleable.C.

Referenced by coupledGenericNeighborGradient(), coupledNeighborGradients(), and NodeFaceConstraint::coupledPrimaryGradient().

180 {
181  if (_neighbor_nodal)
182  mooseError("Nodal variables do not have gradients");
183 
184  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
185  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
186 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborGradientOld()

const VariableGradient & NeighborCoupleable::coupledNeighborGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 197 of file NeighborCoupleable.C.

Referenced by NodeFaceConstraint::coupledPrimaryGradientOld().

199 {
200  if (_neighbor_nodal)
201  mooseError("Nodal variables do not have gradients");
202 
203  validateExecutionerType(var_name, "coupledNeighborGradientOld");
204  const auto * var = getVar(var_name, comp);
205  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
206 }
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...
Definition: Coupleable.C:2148
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborGradientOlder()

const VariableGradient & NeighborCoupleable::coupledNeighborGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 209 of file NeighborCoupleable.C.

Referenced by NodeFaceConstraint::coupledPrimaryGradientOlder().

211 {
212  if (_neighbor_nodal)
213  mooseError("Nodal variables do not have gradients");
214 
215  validateExecutionerType(var_name, "coupledNeighborGradientOlder");
216  const auto * var = getVar(var_name, comp);
217  if (_c_is_implicit)
218  return var->gradSlnOlderNeighbor();
219  else
220  mooseError("Older values not available for explicit schemes");
221 }
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...
Definition: Coupleable.C:2148
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborGradients()

std::vector< const VariableGradient * > NeighborCoupleable::coupledNeighborGradients ( const std::string &  var_name) const
virtual

Definition at line 189 of file NeighborCoupleable.C.

190 {
191  auto func = [this, &var_name](unsigned int comp)
192  { return &coupledNeighborGradient(var_name, comp); };
193  return coupledVectorHelper<const VariableGradient *>(var_name, func);
194 }
virtual const VariableGradient & coupledNeighborGradient(const std::string &var_name, unsigned int comp=0) const

◆ coupledNeighborSecond()

const VariableSecond & NeighborCoupleable::coupledNeighborSecond ( const std::string &  var_name,
unsigned int  i = 0 
) const
virtual

Definition at line 325 of file NeighborCoupleable.C.

Referenced by NodeFaceConstraint::coupledPrimarySecond().

326 {
327  if (_neighbor_nodal)
328  mooseError("Nodal variables do not have second derivatives");
329 
330  const auto * var = getVar(var_name, comp);
331  return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOldNeighbor();
332 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborValue()

const VariableValue & NeighborCoupleable::coupledNeighborValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 27 of file NeighborCoupleable.C.

Referenced by coupledGenericNeighborValue(), coupledNeighborValues(), and NodeFaceConstraint::coupledPrimaryValue().

28 {
29  const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
30  if (_neighbor_nodal)
31  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
32  else
33  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
34 }
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborValueDot()

const VariableValue & NeighborCoupleable::coupledNeighborValueDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 125 of file NeighborCoupleable.C.

126 {
127  const auto * var = getVar(var_name, comp);
128  if (_neighbor_nodal)
129  return var->dofValuesDotNeighbor();
130  else
131  return var->uDotNeighbor();
132 }
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318

◆ coupledNeighborValueDotDu()

const VariableValue & NeighborCoupleable::coupledNeighborValueDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 135 of file NeighborCoupleable.C.

136 {
137  const auto * var = getVar(var_name, comp);
138  if (_neighbor_nodal)
139  return var->dofValuesDuDotDuNeighbor();
140  else
141  return var->duDotDuNeighbor();
142 }
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318

◆ coupledNeighborValueOld()

const VariableValue & NeighborCoupleable::coupledNeighborValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 145 of file NeighborCoupleable.C.

Referenced by coupledNeighborValuesOld(), and NodeFaceConstraint::coupledPrimaryValueOld().

146 {
147  validateExecutionerType(var_name, "coupledNeighborValueOld");
148 
149  const auto * var = getVar(var_name, comp);
150  if (_neighbor_nodal)
151  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
152  else
153  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
154 }
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...
Definition: Coupleable.C:2148
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborValueOlder()

const VariableValue & NeighborCoupleable::coupledNeighborValueOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 157 of file NeighborCoupleable.C.

Referenced by coupledNeighborValuesOlder(), and NodeFaceConstraint::coupledPrimaryValueOlder().

158 {
159  validateExecutionerType(var_name, "coupledNeighborValueOlder");
160 
161  const auto * var = getVar(var_name, comp);
162  if (_neighbor_nodal)
163  {
164  if (_c_is_implicit)
165  return var->dofValuesOlderNeighbor();
166  else
167  mooseError("Older values not available for explicit schemes");
168  }
169  else
170  {
171  if (_c_is_implicit)
172  return var->slnOlderNeighbor();
173  else
174  mooseError("Older values not available for explicit schemes");
175  }
176 }
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...
Definition: Coupleable.C:2148
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledNeighborValues()

std::vector< const VariableValue * > NeighborCoupleable::coupledNeighborValues ( const std::string &  var_name) const

Definition at line 37 of file NeighborCoupleable.C.

38 {
39  auto func = [this, &var_name](unsigned int comp)
40  { return &coupledNeighborValue(var_name, comp); };
41  return coupledVectorHelper<const VariableValue *>(var_name, func);
42 }
virtual const VariableValue & coupledNeighborValue(const std::string &var_name, unsigned int comp=0) const

◆ coupledNeighborValuesOld()

std::vector< const VariableValue * > NeighborCoupleable::coupledNeighborValuesOld ( const std::string &  var_name) const

Definition at line 45 of file NeighborCoupleable.C.

46 {
47  auto func = [this, &var_name](unsigned int comp)
48  { return &coupledNeighborValueOld(var_name, comp); };
49  return coupledVectorHelper<const VariableValue *>(var_name, func);
50 }
virtual const VariableValue & coupledNeighborValueOld(const std::string &var_name, unsigned int comp=0) const

◆ coupledNeighborValuesOlder()

std::vector< const VariableValue * > NeighborCoupleable::coupledNeighborValuesOlder ( const std::string &  var_name) const

Definition at line 53 of file NeighborCoupleable.C.

54 {
55  auto func = [this, &var_name](unsigned int comp)
56  { return &coupledNeighborValueOlder(var_name, comp); };
57  return coupledVectorHelper<const VariableValue *>(var_name, func);
58 }
virtual const VariableValue & coupledNeighborValueOlder(const std::string &var_name, unsigned int comp=0) const

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

1996 {
1997  static const T zero = 0;
1998  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1999  if (!var)
2000  return zero;
2002 
2003  if (!_coupleable_neighbor)
2004  return var->nodalValueDot();
2005  mooseError("Neighbor version not implemented");
2006 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
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:1713

◆ 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 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->dofValuesDotDot();
2021  return var->dofValuesDotDotNeighbor();
2022 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

2042 {
2043  const auto * var = getVar(var_name, comp);
2044  if (!var)
2045  {
2047  return _default_value_zero;
2048  }
2050 
2051  if (!_coupleable_neighbor)
2052  return var->dofValuesDotDotOld();
2053  return var->dofValuesDotDotOldNeighbor();
2054 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

2026 {
2027  const auto * var = getVar(var_name, comp);
2028  if (!var)
2029  {
2031  return _default_value_zero;
2032  }
2034 
2035  if (!_coupleable_neighbor)
2036  return var->dofValuesDotOld();
2037  return var->dofValuesDotOldNeighbor();
2038 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:1713
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:1799

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

1920 {
1921  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1922  if (!var)
1923  return getDefaultNodalValue<T>(var_name, comp);
1925 
1926  if (!var->isNodal())
1928  ": Trying to get nodal values of variable '",
1929  var->name(),
1930  "', but it is not nodal.");
1931 
1932  if (!_coupleable_neighbor)
1933  return (_c_is_implicit) ? var->nodalValue() : var->nodalValueOld();
1934  return (_c_is_implicit) ? var->nodalValueNeighbor() : var->nodalValueOldNeighbor();
1935 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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:1713

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

1940 {
1941  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1942  if (!var)
1943  return getDefaultNodalValue<T>(var_name, comp);
1945 
1946  if (!var->isNodal())
1948  ": Trying to get old nodal values of variable '",
1949  var->name(),
1950  "', but it is not nodal.");
1951 
1952  if (!_coupleable_neighbor)
1953  return (_c_is_implicit) ? var->nodalValueOld() : var->nodalValueOlder();
1954  return (_c_is_implicit) ? var->nodalValueOldNeighbor() : var->nodalValueOlderNeighbor();
1955 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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:1713

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

1960 {
1961  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1962  if (!var)
1963  return getDefaultNodalValue<T>(var_name, comp);
1965 
1966  if (!var->isNodal())
1968  ": Trying to get older nodal values of variable '",
1969  var->name(),
1970  "', but it is not nodal.");
1971 
1972  if (!_coupleable_neighbor)
1973  return var->nodalValueOlder();
1974  return var->nodalValueOlderNeighbor();
1975 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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:1713

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

1980 {
1981  const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1982  if (!var)
1983  return getDefaultNodalValue<T>(var_name, comp);
1985 
1987 
1988  if (!_coupleable_neighbor)
1989  return var->nodalValuePreviousNL();
1990  return var->nodalValuePreviousNLNeighbor();
1991 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
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:1713

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

Referenced by NodeFaceConstraint::coupledSecondarySecond().

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 (_c_is_implicit) ? var->secondSln() : var->secondSlnOlder();
1865  return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOlderNeighbor();
1866 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1486
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1870 {
1871  const auto * var = getVar(var_name, comp);
1872  if (!var)
1873  {
1875  return _default_second;
1876  }
1878 
1879  if (!_coupleable_neighbor)
1880  return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
1881  return (_c_is_implicit) ? var->secondSlnOldNeighbor() : var->secondSlnOlderNeighbor();
1882 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1486
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1886 {
1887  const auto * var = getVar(var_name, comp);
1888  if (!var)
1889  {
1891  return _default_second;
1892  }
1894 
1895  if (!_coupleable_neighbor)
1896  return var->secondSlnOlder();
1897  return var->secondSlnOlderNeighbor();
1898 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1486
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1902 {
1903  const auto * var = getVar(var_name, comp);
1905  if (!var)
1906  {
1908  return _default_second;
1909  }
1911 
1912  if (!_coupleable_neighbor)
1913  return var->secondSlnPreviousNL();
1914  return var->secondSlnPreviousNLNeighbor();
1915 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1486
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

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

528 {
529  const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
530  if (!var)
531  return *getDefaultValue(var_name, comp);
533 
535  {
536  if (_c_nodal)
537  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
538  else
539  return (_c_is_implicit) ? var->sln() : var->slnOld();
540  }
541  else
542  {
543  if (_c_nodal)
544  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
545  else
546  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
547  }
548 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:365
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:1713

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

633 {
634  const auto * var = getVar(var_name, comp);
635  if (!var)
636  return *getDefaultValue(var_name, comp);
638 
640  mooseError(_c_name, ":coupledValueLower cannot be called in a coupleable neighbor object");
641 
642  if (_c_nodal)
643  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
644  else
645  return (_c_is_implicit) ? var->slnLower() : var->slnLowerOld();
646 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:365
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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:1713

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

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

1032 {
1033  const auto * var = getVar(var_name, comp);
1034  if (!var)
1035  return *getDefaultValue(var_name, comp);
1037 
1038  if (!_coupleable_neighbor)
1039  {
1040  if (_c_nodal)
1041  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1042  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1043  }
1044  else
1045  {
1046  if (_c_nodal)
1047  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1048  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1049  }
1050 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:365
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:1713

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

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

1054 {
1055  const auto * var = getVar(var_name, comp);
1056  if (!var)
1057  return *getDefaultValue(var_name, comp);
1059 
1060  if (!_coupleable_neighbor)
1061  {
1062  if (_c_nodal)
1063  return var->dofValuesOlder();
1064  return var->slnOlder();
1065  }
1066  else
1067  {
1068  if (_c_nodal)
1069  return var->dofValuesOlderNeighbor();
1070  return var->slnOlderNeighbor();
1071  }
1072 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
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:365
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:1713

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

1076 {
1077  const auto * var = getVar(var_name, comp);
1078  if (!var)
1079  return *getDefaultValue(var_name, comp);
1081 
1083  if (!_coupleable_neighbor)
1084  {
1085  if (_c_nodal)
1086  return var->dofValuesPreviousNL();
1087  return var->slnPreviousNL();
1088  }
1089  else
1090  {
1091  if (_c_nodal)
1092  return var->dofValuesPreviousNLNeighbor();
1093  return var->slnPreviousNLNeighbor();
1094  }
1095 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
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:365
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:1713

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

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

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

2720 {
2721  auto func = [this, &var_name](unsigned int comp) { return &coupledValueOld(var_name, comp); };
2722  return coupledVectorHelper<const VariableValue *>(var_name, func);
2723 }
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:1031

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

2727 {
2728  auto func = [this, &var_name](unsigned int comp) { return &coupledValueOlder(var_name, comp); };
2729  return coupledVectorHelper<const VariableValue *>(var_name, func);
2730 }
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:1053

◆ 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 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->uDot();
1296  return var->uDotNeighbor();
1297 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:1713
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1520
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

◆ 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 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->uDotDot();
1312  return var->uDotDotNeighbor();
1313 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:1713
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1520
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1365 {
1366  const auto * var = getVectorVar(var_name, comp);
1367  if (!var)
1368  {
1370  return _default_value_zero;
1371  }
1373 
1374  if (!_coupleable_neighbor)
1375  return var->duDotDotDu();
1376  return var->duDotDotDuNeighbor();
1377 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
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:1713
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:1799

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

1333 {
1334  const auto * var = getVectorVar(var_name, comp);
1335  if (!var)
1336  {
1339  }
1341 
1342  if (!_coupleable_neighbor)
1343  return var->uDotDotOld();
1344  return var->uDotDotOldNeighbor();
1345 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:1713
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1520
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1349 {
1350  const auto * var = getVectorVar(var_name, comp);
1351  if (!var)
1352  {
1354  return _default_value_zero;
1355  }
1357 
1358  if (!_coupleable_neighbor)
1359  return var->duDotDu();
1360  return var->duDotDuNeighbor();
1361 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1474
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:1713
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:1799

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

1317 {
1318  const auto * var = getVectorVar(var_name, comp);
1319  if (!var)
1320  {
1323  }
1325 
1326  if (!_coupleable_neighbor)
1327  return var->uDotOld();
1328  return var->uDotOldNeighbor();
1329 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:1713
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1520
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

◆ 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 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 (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1652  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1653 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1523
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1657 {
1658  const auto * var = getVectorVar(var_name, comp);
1659  if (!var)
1660  {
1662  return _default_vector_gradient;
1663  }
1665 
1666  if (!_coupleable_neighbor)
1667  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1668  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1669 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1523
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

1673 {
1674  const auto * var = getVectorVar(var_name, comp);
1675  if (!var)
1676  {
1678  return _default_vector_gradient;
1679  }
1681 
1682  if (!_coupleable_neighbor)
1683  return var->gradSlnOlder();
1684  return var->gradSlnOlderNeighbor();
1685 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1523
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:1713
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

◆ coupledVectorHelper()

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

Definition at line 1703 of file Coupleable.h.

1704  {
1705  const auto components = coupledComponents(var_name);
1706  std::vector<T> vals(components);
1707  for (MooseIndex(components) comp = 0; comp < components; ++comp)
1708  vals[comp] = func(comp);
1709  return vals;
1710  }
unsigned int coupledComponents(const std::string &var_name) const
Number of coupled components.
Definition: Coupleable.C:188

◆ coupledVectorNeighborGradient()

const VectorVariableGradient & NeighborCoupleable::coupledVectorNeighborGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 239 of file NeighborCoupleable.C.

241 {
242  if (_neighbor_nodal)
243  mooseError("Gradients are non-sensical with nodal compute objects");
244 
245  const auto * var = getVectorVar(var_name, comp);
246  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
247 }
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledVectorNeighborGradientOld()

const VectorVariableGradient & NeighborCoupleable::coupledVectorNeighborGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 250 of file NeighborCoupleable.C.

252 {
253  if (_neighbor_nodal)
254  mooseError("Gradients are non-sensical with nodal compute objects");
255 
256  validateExecutionerType(var_name, "coupledVectorNeighborGradientOld");
257  const auto * var = getVectorVar(var_name, comp);
258  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
259 }
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...
Definition: Coupleable.C:2148
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

◆ coupledVectorNeighborGradientOlder()

const VectorVariableGradient & NeighborCoupleable::coupledVectorNeighborGradientOlder ( const std::string &  var_name,
unsigned int  comp = 0 
) const
virtual

Definition at line 262 of file NeighborCoupleable.C.

264 {
265  if (_neighbor_nodal)
266  mooseError("Gradients are non-sensical with nodal compute objects");
267 
268  validateExecutionerType(var_name, "coupledVectorNeighborGradientOlder");
269  const auto * var = getVectorVar(var_name, comp);
270  if (_c_is_implicit)
271  return var->gradSlnOlderNeighbor();
272  else
273  mooseError("Older values not available for explicit schemes");
274 }
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...
Definition: Coupleable.C:2148
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444

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

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

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

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

722 {
723  const auto * var = getArrayVar(var_names, index);
724  if (!var)
725  mooseError(var_names, ": invalid variable name for coupledVectorTagArrayGradient");
727 
728  if (!_c_fe_problem.vectorTagExists(tag))
729  mooseError("Attempting to couple to vector tag with ID ",
730  tag,
731  "in ",
732  _c_name,
733  ", but a vector tag with that ID does not exist");
734 
735  const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
736 
737  return var->vectorTagGradient(tag);
738 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
void addFEVariableCoupleableVectorTag(TagID tag)
Definition: Coupleable.h:113
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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:49
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:336

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

744 {
745  if (!_c_parameters.isParamValid(tag_name))
746  mooseError("Tag name parameter '", tag_name, "' is invalid");
747 
748  TagName tagname = _c_parameters.get<TagName>(tag_name);
749  if (!_c_fe_problem.vectorTagExists(tagname))
750  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
751 
752  TagID tag = _c_fe_problem.getVectorTagID(tagname);
753  return coupledVectorTagArrayGradient(var_names, tag, index);
754 }
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:323
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:1414
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:719
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:1406
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 2650 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagArrayGradients().

2651 {
2652  auto func = [this, &var_names, &tag](unsigned int index)
2653  { return &coupledVectorTagArrayGradient(var_names, tag, index); };
2654  return coupledVectorHelper<const ArrayVariableGradient *>(var_names, func);
2655 }
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:719

◆ coupledVectorTagArrayGradients() [2/2]

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

Definition at line 2658 of file Coupleable.C.

2660 {
2661  if (!_c_parameters.isParamValid(tag_name))
2662  mooseError("Tag name parameter '", tag_name, "' is invalid");
2663 
2664  TagName tagname = _c_parameters.get<TagName>(tag_name);
2665  if (!_c_fe_problem.vectorTagExists(tagname))
2666  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2667 
2668  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2669  return coupledVectorTagArrayGradients(var_names, tag);
2670 }
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:323
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:1414
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:2650
const InputParameters & _c_parameters
Definition: Coupleable.h:1406
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 665 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagArrayValues().

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

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

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

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

Referenced by Coupleable::coupledVectorTagArrayValues().

2605 {
2606  auto func = [this, &var_names, &tag](unsigned int index)
2607  { return &coupledVectorTagArrayValue(var_names, tag, index); };
2608  return coupledVectorHelper<const ArrayVariableValue *>(var_names, func);
2609 }
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:665

◆ coupledVectorTagArrayValues() [2/2]

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

Definition at line 2612 of file Coupleable.C.

2614 {
2615  if (!_c_parameters.isParamValid(tag_name))
2616  mooseError("Tag name parameter '", tag_name, "' is invalid");
2617 
2618  TagName tagname = _c_parameters.get<TagName>(tag_name);
2619  if (!_c_fe_problem.vectorTagExists(tagname))
2620  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2621 
2622  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2623  return coupledVectorTagArrayValues(var_names, tag);
2624 }
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:323
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:2604
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
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:1406
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 797 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagDofValues().

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

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

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

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

Referenced by Coupleable::coupledVectorTagDofValues().

2674 {
2675  auto func = [this, &var_names, &tag](unsigned int comp)
2676  { return &coupledVectorTagDofValue(var_names, tag, comp); };
2677  return coupledVectorHelper<const VariableValue *>(var_names, func);
2678 }
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:797

◆ coupledVectorTagDofValues() [2/2]

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

Definition at line 2681 of file Coupleable.C.

2683 {
2684  if (!_c_parameters.isParamValid(tag_name))
2685  mooseError("Tag name parameter '", tag_name, "' is invalid");
2686 
2687  TagName tagname = _c_parameters.get<TagName>(tag_name);
2688  if (!_c_fe_problem.vectorTagExists(tagname))
2689  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2690 
2691  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2692  return coupledVectorTagDofValues(var_names, tag);
2693 }
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:323
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:1414
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:2673
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:1406
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 681 of file Coupleable.C.

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

684 {
685  const auto * var = getVar(var_names, index);
686  if (!var)
687  mooseError(var_names, ": invalid variable name for coupledVectorTagGradient");
689 
690  if (!_c_fe_problem.vectorTagExists(tag))
691  mooseError("Attempting to couple to vector tag with ID ",
692  tag,
693  "in ",
694  _c_name,
695  ", but a vector tag with that ID does not exist");
696 
697  const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
698 
699  return var->vectorTagGradient(tag);
700 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
void addFEVariableCoupleableVectorTag(TagID tag)
Definition: Coupleable.h:113
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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:49

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

706 {
707  if (!_c_parameters.isParamValid(tag_name))
708  mooseError("Tag name parameter '", tag_name, "' is invalid");
709 
710  TagName tagname = _c_parameters.get<TagName>(tag_name);
711  if (!_c_fe_problem.vectorTagExists(tagname))
712  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
713 
714  TagID tag = _c_fe_problem.getVectorTagID(tagname);
715  return coupledVectorTagGradient(var_names, tag, index);
716 }
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:681
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:323
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:1414
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:1406
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 2627 of file Coupleable.C.

Referenced by Coupleable::coupledVectorTagGradients().

2628 {
2629  auto func = [this, &var_names, &tag](unsigned int index)
2630  { return &coupledVectorTagGradient(var_names, tag, index); };
2631  return coupledVectorHelper<const VariableGradient *>(var_names, func);
2632 }
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:681

◆ coupledVectorTagGradients() [2/2]

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

Definition at line 2635 of file Coupleable.C.

2637 {
2638  if (!_c_parameters.isParamValid(tag_name))
2639  mooseError("Tag name parameter '", tag_name, "' is invalid");
2640 
2641  TagName tagname = _c_parameters.get<TagName>(tag_name);
2642  if (!_c_fe_problem.vectorTagExists(tagname))
2643  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2644 
2645  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2646  return coupledVectorTagGradients(var_names, tag);
2647 }
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:323
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:2627
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
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:1406
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

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

Referenced by Coupleable::coupledVectorTagValues().

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

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

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

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

Referenced by Coupleable::coupledVectorTagValues().

2582 {
2583  auto func = [this, &var_names, &tag](unsigned int comp)
2584  { return &coupledVectorTagValue(var_names, tag, comp); };
2585  return coupledVectorHelper<const VariableValue *>(var_names, func);
2586 }
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:649

◆ coupledVectorTagValues() [2/2]

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

Definition at line 2589 of file Coupleable.C.

2591 {
2592  if (!_c_parameters.isParamValid(tag_name))
2593  mooseError("Tag name parameter '", tag_name, "' is invalid");
2594 
2595  TagName tagname = _c_parameters.get<TagName>(tag_name);
2596  if (!_c_fe_problem.vectorTagExists(tagname))
2597  mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2598 
2599  TagID tag = _c_fe_problem.getVectorTagID(tagname);
2600  return coupledVectorTagValues(var_names, tag);
2601 }
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:323
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:1414
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:2581
const InputParameters & _c_parameters
Definition: Coupleable.h:1406
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 854 of file Coupleable.C.

Referenced by Coupleable::coupledVectorValues().

855 {
856  const auto * var = getVectorVar(var_name, comp);
857  if (!var)
858  return *getDefaultVectorValue(var_name);
860 
862  {
863  if (_c_nodal)
864  return _c_is_implicit ? var->nodalValueArray() : var->nodalValueOldArray();
865  else
866  return _c_is_implicit ? var->sln() : var->slnOld();
867  }
868  else
869  {
870  if (_c_nodal)
871  // Since this is at a node, I don't feel like there should be any "neighbor" logic
872  return _c_is_implicit ? var->nodalValueArray() : var->nodalValueOldArray();
873  else
874  return _c_is_implicit ? var->slnNeighbor() : var->slnOldNeighbor();
875  }
876 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:392
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713

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

Referenced by Coupleable::coupledVectorValuesOld().

1099 {
1100  const auto * var = getVectorVar(var_name, comp);
1101  if (!var)
1102  return *getDefaultVectorValue(var_name);
1104 
1105  if (_c_nodal)
1106  return (_c_is_implicit) ? var->nodalValueOldArray() : var->nodalValueOlderArray();
1107  if (!_coupleable_neighbor)
1108  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1109  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1110 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:392
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:1444
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:1713

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

1114 {
1115  const auto * var = getVectorVar(var_name, comp);
1116  if (!var)
1117  return *getDefaultVectorValue(var_name);
1119 
1120  if (!_coupleable_neighbor)
1121  return var->slnOlder();
1122  return var->slnOlderNeighbor();
1123 }
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition: Coupleable.C:222
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:324
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:392
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:1713

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

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

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

2734 {
2735  auto func = [this, &var_name](unsigned int comp)
2736  { return &coupledVectorValueOld(var_name, comp); };
2737  return coupledVectorHelper<const VectorVariableValue *>(var_name, func);
2738 }
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:1098

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

2467 {
2468  return _grad_zero;
2469 }
const VariableGradient & _grad_zero
Zero gradient of a variable.
Definition: Coupleable.h:1500

◆ genericZeroGradient() [3/3]

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

Definition at line 2473 of file Coupleable.C.

2474 {
2475  return _ad_grad_zero;
2476 }
const MooseArray< ADRealVectorValue > & _ad_grad_zero
Definition: Coupleable.h:1501

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

2481 {
2482  return _second_zero;
2483 }
const VariableSecond & _second_zero
Zero second derivative of a variable.
Definition: Coupleable.h:1507

◆ genericZeroSecond() [3/3]

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

Definition at line 2487 of file Coupleable.C.

2488 {
2489  return _ad_second_zero;
2490 }
const MooseArray< ADRealTensorValue > & _ad_second_zero
Definition: Coupleable.h:1508

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

2453 {
2454  return _zero;
2455 }
const VariableValue & _zero
Zero value of a variable.
Definition: Coupleable.h:1495

◆ genericZeroValue() [3/3]

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

Definition at line 2459 of file Coupleable.C.

2460 {
2461  return _ad_zero;
2462 }
const MooseArray< ADReal > & _ad_zero
Definition: Coupleable.h:1497

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

Referenced by Coupleable::adCoupledCurl().

2424 {
2426  return _ad_default_curl;
2427 }
MooseArray< ADRealVectorValue > _ad_default_curl
This will always be zero because the default values for optionally coupled vector variables is always...
Definition: Coupleable.h:1492
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

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

2403 {
2405  return _ad_default_gradient;
2406 }
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799
MooseArray< ADRealVectorValue > _ad_default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1480

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

Referenced by Coupleable::adCoupledSecond().

2417 {
2419  return _ad_default_second;
2420 }
MooseArray< ADRealTensorValue > _ad_default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:1489
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

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

2372 {
2373  auto default_value_it = _ad_default_value.find(var_name);
2374  if (default_value_it == _ad_default_value.end())
2375  {
2376  auto value = std::make_unique<ADVariableValue>(_coupleable_max_qps,
2378  default_value_it = _ad_default_value.insert(std::make_pair(var_name, std::move(value))).first;
2379  }
2380 
2381  return default_value_it->second.get();
2382 }
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:1457
const InputParameters & _c_parameters
Definition: Coupleable.h:1406
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

Referenced by Coupleable::adCoupledVectorGradient().

2410 {
2413 }
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:1483
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

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

2386 {
2387  auto default_value_it = _ad_default_vector_value.find(var_name);
2388  if (default_value_it == _ad_default_vector_value.end())
2389  {
2390  RealVectorValue default_vec;
2391  for (unsigned int i = 0; i < _c_parameters.numberDefaultCoupledValues(var_name); ++i)
2392  default_vec(i) = _c_parameters.defaultCoupledValue(var_name, i);
2393  auto value = std::make_unique<ADVectorVariableValue>(_coupleable_max_qps, default_vec);
2394  default_value_it =
2395  _ad_default_vector_value.insert(std::make_pair(var_name, std::move(value))).first;
2396  }
2397 
2398  return default_value_it->second.get();
2399 }
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:1468
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:1406
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.
Definition: Coupleable.h:1799

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

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

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

109  {
111  }
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
Definition: Coupleable.h:1432

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

91  {
93  }
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Definition: Coupleable.h:1426

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

Referenced by InitialConditionBase::InitialConditionBase().

73  {
74  return _coupled_vars;
75  }
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1420

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

100  {
102  }
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
Definition: Coupleable.h:1429

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

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

◆ getFEVariableCoupleableMatrixTags() [1/2]

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

Definition at line 119 of file Coupleable.h.

119 { return _fe_coupleable_matrix_tags; }
std::set< TagID > _fe_coupleable_matrix_tags
Definition: Coupleable.h:1809

◆ getFEVariableCoupleableMatrixTags() [2/2]

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

Definition at line 126 of file Coupleable.h.

127  {
129  }
std::set< TagID > _fe_coupleable_matrix_tags
Definition: Coupleable.h:1809

◆ getFEVariableCoupleableVectorTags() [1/2]

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

◆ getFEVariableCoupleableVectorTags() [2/2]

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

Definition at line 121 of file Coupleable.h.

122  {
124  }
std::set< TagID > _fe_coupleable_vector_tags
Definition: Coupleable.h:1807

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

307 {
308  return getVarHelper<MooseVariableFieldBase>(var_name, comp);
309 }

◆ 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 318 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(), coupledNeighborDofValues(), coupledNeighborDofValuesOld(), coupledNeighborDofValuesOlder(), coupledNeighborGradientOld(), coupledNeighborGradientOlder(), coupledNeighborSecond(), coupledNeighborValueDot(), coupledNeighborValueDotDu(), coupledNeighborValueOld(), 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().

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

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

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

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

1973 {
1974  return const_cast<Coupleable *>(this)->getVarHelper<T>(var_name, comp);
1975 }
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:49

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

1919 {
1920  const auto var_name = _c_parameters.checkForRename(var_name_in);
1921  auto name_to_use = var_name;
1922 
1923  // First check for supplied name
1924  if (!checkVar(var_name, comp, 0))
1925  {
1926  // See if there is an associated deprecated name that the user may have used instead
1927  auto it = _new_to_deprecated_coupled_vars.find(var_name);
1928  if (it == _new_to_deprecated_coupled_vars.end())
1929  return nullptr;
1930  else
1931  {
1932  auto deprecated_name = it->second;
1933  if (checkVar(deprecated_name, comp, 0))
1934  name_to_use = deprecated_name;
1935  else
1936  return nullptr;
1937  }
1938  }
1939 
1940  auto coupled_vars_it = _coupled_vars.find(name_to_use);
1941 
1942  mooseAssert(coupled_vars_it != _coupled_vars.end(),
1943  "Trying to get a coupled var " << name_to_use << " that doesn't exist");
1944 
1945  if (auto coupled_var = dynamic_cast<T *>(coupled_vars_it->second[comp]))
1946  return coupled_var;
1947  else
1948  {
1949  for (auto & var : _coupled_standard_moose_vars)
1950  if (var->name() == name_to_use)
1951  mooseError("The named variable is a standard variable, try a "
1952  "'coupled[Value/Gradient/Dot/etc]...' function instead");
1953  for (auto & var : _coupled_vector_moose_vars)
1954  if (var->name() == name_to_use)
1955  mooseError("The named variable is a vector variable, try a "
1956  "'coupledVector[Value/Gradient/Dot/etc]...' function instead");
1957  for (auto & var : _coupled_array_moose_vars)
1958  if (var->name() == name_to_use)
1959  mooseError("The named variable is an array variable, try a "
1960  "'coupledArray[Value/Gradient/Dot/etc]...' function instead");
1961  for (auto & var : _coupled_fv_moose_vars)
1962  if (var->name() == name_to_use)
1963  mooseError("The named variable is a finite volume variable, which the coupled[...] routine "
1964  "used does not support. Try using the functor system routines instead.");
1965  mooseError(
1966  "Variable '", name_to_use, "' is of a different C++ type than you tried to fetch it as.");
1967  }
1968 }
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:1420
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.
Definition: Coupleable.h:1432
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Definition: Coupleable.h:1426
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
Definition: Coupleable.h:1429
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
Vector of all finite volume coupled variables.
Definition: Coupleable.h:1435
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:239
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:1406
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
map from new to deprecated variable names
Definition: Coupleable.h:1438

◆ 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 324 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(), coupledVectorNeighborGradient(), coupledVectorNeighborGradientOld(), coupledVectorNeighborGradientOlder(), Coupleable::coupledVectorValue(), Coupleable::coupledVectorValueOld(), and Coupleable::coupledVectorValueOlder().

325 {
326  auto * const var =
327  const_cast<VectorMooseVariable *>(getVarHelper<VectorMooseVariable>(var_name, comp));
328 
329  if (_c_nodal && var && var->feType().family != LAGRANGE_VEC)
330  mooseError(_c_name, ": Only LAGRANGE_VEC vector variables are defined at nodes");
331 
332  return var;
333 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
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:323
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409

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

349 {
350  const auto * const var = getVarHelper<VectorMooseVariable>(var_name, comp);
351 
352  if (_c_nodal && var && var->feType().family != LAGRANGE_VEC)
353  mooseError(_c_name, ": Only LAGRANGE_VEC vector variables are defined at nodes");
354 
355  return var;
356 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:1441
LAGRANGE_VEC
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409

◆ getWritableCoupledVariables()

auto& Coupleable::getWritableCoupledVariables ( ) const
inlineinherited

returns a reference to the set of writable coupled variables

Definition at line 134 of file Coupleable.h.

Referenced by Coupleable::hasWritableCoupledVariables().

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

◆ hasWritableCoupledVariables()

bool Coupleable::hasWritableCoupledVariables ( ) const
inlineinherited

Checks whether the object has any writable coupled variables.

Definition at line 139 of file Coupleable.h.

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

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

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

160 {
161  const auto var_name = _c_parameters.checkForRename(var_name_in);
162 
163  auto it = _coupled_vars.find(var_name);
164  if (it != _coupled_vars.end())
165  return (i < it->second.size());
166  else
167  {
168  // Make sure the user originally requested this value in the InputParameter syntax
169  if (!_c_parameters.hasCoupledValue(var_name))
171  ": The coupled variable \"",
172  var_name,
173  "\" was never added to this object's "
174  "InputParameters, please double-check your "
175  "spelling");
176 
177  return false;
178  }
179 }
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:1420
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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:1406

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

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

183 {
184  return _c_parameters.hasDefaultCoupledValue(var_name);
185 }
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:1406

◆ kokkosCoupledDot()

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

◆ kokkosCoupledDotDu()

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

◆ kokkosCoupledDots()

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

◆ kokkosCoupledGradient()

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

◆ kokkosCoupledGradientOld()

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

◆ kokkosCoupledGradientOlder()

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

◆ kokkosCoupledGradients()

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

◆ kokkosCoupledGradientsOld()

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

◆ kokkosCoupledGradientsOlder()

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

◆ kokkosCoupledNodalDot()

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

◆ kokkosCoupledNodalDots()

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

◆ kokkosCoupledNodalValue()

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

◆ kokkosCoupledNodalValueOld()

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

◆ kokkosCoupledNodalValueOlder()

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

◆ kokkosCoupledNodalValues()

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

◆ kokkosCoupledNodalValuesOld()

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

◆ kokkosCoupledNodalValuesOlder()

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

◆ kokkosCoupledValue()

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

◆ kokkosCoupledValueOld()

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

◆ kokkosCoupledValueOlder()

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

◆ kokkosCoupledValues()

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

◆ kokkosCoupledValuesOld()

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

◆ kokkosCoupledValuesOlder()

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

◆ kokkosCoupledVectorTagGradient()

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

◆ kokkosCoupledVectorTagGradientByName()

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

◆ kokkosCoupledVectorTagGradients()

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

◆ kokkosCoupledVectorTagGradientsByName()

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

◆ kokkosCoupledVectorTagNodalValue()

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

◆ kokkosCoupledVectorTagNodalValueByName()

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

◆ kokkosCoupledVectorTagNodalValues()

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

◆ kokkosCoupledVectorTagNodalValuesByName()

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

◆ kokkosCoupledVectorTagValue()

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

◆ kokkosCoupledVectorTagValueByName()

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

◆ kokkosCoupledVectorTagValues()

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

◆ kokkosCoupledVectorTagValuesByName()

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

◆ kokkosZeroGradient()

Moose::Kokkos::VariableGradient Coupleable::kokkosZeroGradient ( )
inherited

◆ kokkosZeroNodalValue()

Moose::Kokkos::VariableNodalValue Coupleable::kokkosZeroNodalValue ( )
inherited

◆ kokkosZeroValue()

Moose::Kokkos::VariableValue Coupleable::kokkosZeroValue ( )
inherited

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

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

2149 {
2150  if (!_c_fe_problem.isTransient())
2152  ": Calling \"",
2153  fn_name,
2154  "\" on variable \"",
2155  name,
2156  "\" when using a \"Steady\" executioner is not allowed. This value is available "
2157  "only in transient simulations.");
2158 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:1409
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 944 of file Coupleable.C.

945 {
946  mooseDeprecated("Coupleable::writableCoupledValue is deprecated, please use "
947  "Coupleable::writableVariable instead. ");
948 
949  // check if the variable exists
950  auto * const var = getVar(var_name, comp);
951  if (!var)
952  mooseError(
953  "Unable to create a writable reference for '", var_name, "', is it a constant expression?");
954 
955  // is the requested variable an AuxiliaryVariable?
956  if (!_c_fe_problem.getAuxiliarySystem().hasVariable(var->name()))
957  mooseError(
958  "'", var->name(), "' must be an auxiliary variable in Coupleable::writableCoupledValue");
959 
960  // check that the variable type (elemental/nodal) is compatible with the object type
961  const auto * aux = dynamic_cast<const AuxKernel *>(this);
962 
963  if (!aux)
964  mooseError("writableCoupledValue() can only be called from AuxKernels, but '",
965  _obj->name(),
966  "' is not an AuxKernel.");
967 
968  if (!aux->isNodal() && var->isNodal())
969  mooseError("The elemental AuxKernel '",
970  _obj->name(),
971  "' cannot obtain a writable reference to the nodal variable '",
972  var->name(),
973  "'.");
974 
975  // make sure only one object can access a variable
976  checkWritableVar(var);
977 
978  return const_cast<VariableValue &>(coupledValue(var_name, comp));
979 }
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain...
Definition: Coupleable.C:982
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:318
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:1414
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
Returns value of a coupled variable.
Definition: Coupleable.C:527
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:374
AuxiliarySystem & getAuxiliarySystem()
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:851
const MooseObject *const _obj
Definition: Coupleable.h:1814
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:315

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

909 {
910  auto * var = getVarHelper<MooseWritableVariable>(var_name, comp);
911 
912  const auto * aux = dynamic_cast<const AuxKernel *>(this);
913  const auto * euo = dynamic_cast<const ElementUserObject *>(this);
914  const auto * nuo = dynamic_cast<const NodalUserObject *>(this);
915  const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
916  const auto * nec = dynamic_cast<const NodeElemConstraintBase *>(this);
917 
918  if (!aux && !euo && !nuo && !nfc && !nec)
919  mooseError("writableVariable() can only be called from AuxKernels, ElementUserObjects, "
920  "NodalUserObjects, NodeFaceConstraints, or NodeElemConstraints. '",
921  _obj->name(),
922  "' is none of those.");
923 
924  if (aux && !aux->isNodal() && var->isNodal())
925  mooseError("The elemental AuxKernel '",
926  _obj->name(),
927  "' cannot obtain a writable reference to the nodal variable '",
928  var->name(),
929  "'.");
930  if (euo && var->isNodal())
931  mooseError("The ElementUserObject '",
932  _obj->name(),
933  "' cannot obtain a writable reference to the nodal variable '",
934  var->name(),
935  "'.");
936 
937  // make sure only one object can access a variable
938  checkWritableVar(var);
939 
940  return *var;
941 }
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain...
Definition: Coupleable.C:982
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
A user object that runs over all the nodes and does an aggregation step to compute a single value...
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh...
const MooseObject *const _obj
Definition: Coupleable.h:1814
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 1492 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 1480 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 1489 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 1457 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 1483 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 1468 of file Coupleable.h.

Referenced by Coupleable::getADDefaultVectorValue().

◆ _ad_grad_zero

const MooseArray<ADRealVectorValue>& Coupleable::_ad_grad_zero
protectedinherited

Definition at line 1501 of file Coupleable.h.

Referenced by Coupleable::adZeroGradient().

◆ _ad_second_zero

const MooseArray<ADRealTensorValue>& Coupleable::_ad_second_zero
protectedinherited

Definition at line 1508 of file Coupleable.h.

Referenced by Coupleable::adZeroSecond().

◆ _ad_zero

const MooseArray<ADReal>& Coupleable::_ad_zero
protectedinherited

Definition at line 1497 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 1447 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 1444 of file Coupleable.h.

Referenced by Coupleable::adCoupledCurl(), Coupleable::adCoupledDofValues(), Coupleable::adCoupledGradient(), Coupleable::adCoupledGradientDot(), Coupleable::adCoupledLowerValue(), adCoupledNeighborGradient(), adCoupledNeighborValue(), adCoupledNeighborValueDot(), Coupleable::adCoupledNodalValue(), Coupleable::adCoupledSecond(), Coupleable::adCoupledValue(), Coupleable::adCoupledVectorGradient(), adCoupledVectorNeighborValue(), Coupleable::adCoupledVectorValue(), Coupleable::checkFuncType(), Coupleable::coupledArrayDofValues(), Coupleable::coupledArrayGradient(), Coupleable::coupledArrayGradientOld(), coupledArrayNeighborGradient(), coupledArrayNeighborGradientOld(), coupledArrayNeighborGradientOlder(), coupledArrayNeighborValue(), Coupleable::coupledArrayValue(), CoupleableMooseVariableDependencyIntermediateInterface::coupledArrayValueByName(), Coupleable::coupledArrayValueOld(), Coupleable::coupledCurl(), Coupleable::coupledCurlOld(), Coupleable::coupledDiv(), Coupleable::coupledDivOld(), Coupleable::coupledDofValues(), Coupleable::coupledDofValuesOld(), Coupleable::coupledGradient(), Coupleable::coupledGradientOld(), coupledNeighborDofValues(), coupledNeighborDofValuesOld(), coupledNeighborDofValuesOlder(), coupledNeighborGradient(), coupledNeighborGradientOld(), coupledNeighborGradientOlder(), coupledNeighborSecond(), coupledNeighborValue(), coupledNeighborValueOld(), coupledNeighborValueOlder(), Coupleable::coupledNodalValue(), Coupleable::coupledNodalValueOld(), Coupleable::coupledSecond(), Coupleable::coupledSecondOld(), Coupleable::coupledValue(), CoupleableMooseVariableDependencyIntermediateInterface::coupledValueByName(), Coupleable::coupledValueLower(), Coupleable::coupledValueOld(), Coupleable::coupledVectorGradient(), Coupleable::coupledVectorGradientOld(), coupledVectorNeighborGradient(), coupledVectorNeighborGradientOld(), 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 1417 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 1411 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 1713 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(), CoupleableMooseVariableDependencyIntermediateInterface::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(), CoupleableMooseVariableDependencyIntermediateInterface::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

◆ _coupled_fv_moose_vars

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

Vector of all finite volume coupled variables.

Definition at line 1435 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 1429 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 1538 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 1464 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 1535 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 1529 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 1477 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 1486 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 1454 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 1526 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 1523 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 1461 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 1520 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 1504 of file Coupleable.h.

◆ _grad_zero

const VariableGradient& Coupleable::_grad_zero
protectedinherited

Zero gradient of a variable.

Definition at line 1500 of file Coupleable.h.

◆ _neighbor_nodal

bool NeighborCoupleable::_neighbor_nodal
protected

◆ _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 1438 of file Coupleable.h.

Referenced by Coupleable::getVarHelper().

◆ _phi_zero

const VariablePhiValue& Coupleable::_phi_zero
protectedinherited

Definition at line 1496 of file Coupleable.h.

◆ _second_phi_zero

const VariablePhiSecond& Coupleable::_second_phi_zero
protectedinherited

Zero second derivative of a test function.

Definition at line 1510 of file Coupleable.h.

◆ _second_zero

const VariableSecond& Coupleable::_second_zero
protectedinherited

Zero second derivative of a variable.

Definition at line 1507 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 1514 of file Coupleable.h.

◆ _vector_zero

const VectorVariableValue& Coupleable::_vector_zero
protectedinherited

Zero value of a vector variable.

Definition at line 1512 of file Coupleable.h.

◆ _zero

const VariableValue& Coupleable::_zero
protectedinherited

Zero value of a variable.

Definition at line 1495 of file Coupleable.h.


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