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

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

#include <NeighborCoupleableMooseVariableDependencyIntermediateInterface.h>

Inheritance diagram for NeighborCoupleableMooseVariableDependencyIntermediateInterface:
[legend]

Public Member Functions

 NeighborCoupleableMooseVariableDependencyIntermediateInterface (const MooseObject *moose_object, bool nodal, bool neighbor_nodal, bool is_fv=false)
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars () const
 Get the list of all coupled variables.
 
const std::vector< MooseVariable * > & getCoupledStandardMooseVars () const
 Get the list of standard coupled variables.
 
const std::vector< VectorMooseVariable * > & getCoupledVectorMooseVars () const
 Get the list of vector coupled variables.
 
const std::vector< ArrayMooseVariable * > & getCoupledArrayMooseVars () const
 Get the list of array coupled variables.
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
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
 
bool hasWritableCoupledVariables () const
 Checks whether the object has any writable coupled variables.
 
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.
 
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.
 
const ADVariableGradientgetADDefaultGradient () const
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled variable.
 
const ADVectorVariableGradientgetADDefaultVectorGradient () const
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled vector variable.
 
const ADVariableSecondgetADDefaultSecond () const
 Helper method to return (and insert if necessary) the default second derivatives for Automatic Differentiation for an uncoupled variable.
 
const ADVectorVariableCurlgetADDefaultCurl () const
 Helper method to return (and insert if necessary) the default curl value for Automatic Differentiation for an uncoupled variable.
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledVectorTagGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledVectorTagDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorTagVectorGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorTagVectorDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValues (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradients (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValues (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValues (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableGradient kokkosCoupledGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledDots (const std::string &var_name) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosCoupledNodalDots (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValues (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradients (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValues (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValues (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableGradient kokkosCoupledVectorGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorDots (const std::string &var_name) const
 
Moose::Kokkos::VectorVariableValue kokkosCoupledVectorNodalDots (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradientsByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValueByName (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValuesByName (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradient (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledVectorTagGradients (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagNodalValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValue (const std::string &var_name, const std::string &tag_param_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledVectorTagDofValues (const std::string &var_name, const std::string &tag_param_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradients (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValue (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValues (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOld (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOld (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableGradient kokkosADCoupledGradientsOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValueOlder (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDofValuesOlder (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledDots (const std::string &var_name) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::ADVariableValue kokkosADCoupledNodalDots (const std::string &var_name) const
 
Moose::Kokkos::Scalar< const Real > kokkosCoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 
Moose::Kokkos::VariableValue kokkosZeroValue () const
 
Moose::Kokkos::VariableGradient kokkosZeroGradient () const
 
Moose::Kokkos::VariableValue kokkosZeroNodalValue () const
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 Get the list of coupled scalar variables.
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const std::set< MooseVariableFieldBase * > & getMooseVariableDependencies () const
 Retrieve the set of MooseVariableFieldBase that this object depends on.
 
template<typename DofObjectType >
std::set< MooseVariableFieldBase * > checkAllVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_omit={})
 Check whether all of the variable dependencies have degree of freedom indices on the supplied degree of freedom object.
 
virtual std::set< MooseVariableFieldBase * > checkVariables (const libMesh::Node &node, const std::set< MooseVariableFieldBase * > &vars_to_check)
 Check whether all of the supplied variables have degree of freedom indices on the supplied node.
 
std::set< MooseVariableFieldBase * > checkVariables (const libMesh::Elem &element, const std::set< MooseVariableFieldBase * > &vars_to_check)
 Check whether all of the supplied variables have degree of freedom indices on the supplied element.
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends on.
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase * > &vars)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void coupledCallback (const std::string &, bool) const
 A call-back function provided by the derived object for actions before coupling a variable with functions such as coupledValue.
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0) const
 Returns true if a variables has been coupled as name.
 
virtual bool isCoupledConstant (const std::string &var_name) const
 Returns true if a variable passed as a coupled value is really a constant.
 
unsigned int coupledComponents (const std::string &var_name) const
 Number of coupled components.
 
VariableName coupledName (const std::string &var_name, unsigned int comp=0) const
 Names of the variable in the Coupleable interface.
 
std::vector< VariableName > coupledNames (const std::string &var_name) const
 Names of the variables in the Coupleable interface.
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0) const
 Returns the index for a coupled variable by name.
 
std::vector< unsigned intcoupledIndices (const std::string &var_name) const
 Returns the indices for a coupled variable's components.
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable.
 
std::vector< const VariableValue * > coupledValues (const std::string &var_name) const
 Returns the values for all of a coupled variable components.
 
std::vector< const VectorVariableValue * > coupledVectorValues (const std::string &var_name) const
 Returns the values for all of a coupled vector variable's components.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & coupledGenericValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable for use in templated automatic differentiation classes.
 
template<>
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
const ADVariableValueadCoupledValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled variable for use in Automatic Differentiation.
 
std::vector< const ADVariableValue * > adCoupledValues (const std::string &var_name) const
 Returns the values for all of a coupled variable's components for use in Automatic Differentiation.
 
const ADVariableValueadCoupledLowerValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled lower-dimensional variable for use in Automatic Differentiation.
 
const ADVectorVariableValueadCoupledVectorValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled vector variable for use in Automatic Differentiation.
 
std::vector< const ADVectorVariableValue * > adCoupledVectorValues (const std::string &var_name) const
 Returns the values for all of a coupled vector variable's components for use in Automatic Differentiation.
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled variable for a given tag.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
std::vector< const VariableValue * > coupledVectorTagDofValues (const std::string &var_names, TagID tag) const
 Returns the dof values for all the coupled variables desired for a given tag.
 
std::vector< const VariableValue * > coupledVectorTagDofValues (const std::string &var_names, const std::string &tag_name) const
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_names, TagID tag, unsigned int index=0) const
 Returns value of a coupled variable for a given tag.
 
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.
 
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.
 
virtual const ArrayVariableValuecoupledArrayValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled array variable.
 
std::vector< const ArrayVariableValue * > coupledArrayValues (const std::string &var_name) const
 Returns the values for all of a coupled array variable's components.
 
MooseWritableVariablewritableVariable (const std::string &var_name, unsigned int comp=0)
 Returns a writable MooseVariable object for a nodal or elemental variable.
 
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.
 
void checkWritableVar (MooseWritableVariable *var)
 Checks that the passed in variable is only accessed writable by one object in a given subdomain.
 
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.
 
std::vector< const VariableValue * > coupledValuesOld (const std::string &var_name) const
 Returns the old values for all of a coupled variable's components.
 
std::vector< const VectorVariableValue * > coupledVectorValuesOld (const std::string &var_name) const
 Returns the old values for all of a coupled vector variable's components.
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old value from two time steps previous of a coupled variable.
 
std::vector< const VariableValue * > coupledValuesOlder (const std::string &var_name) const
 Returns the older values for all of a coupled variable's components.
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns value of previous Newton iterate of a coupled variable.
 
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.
 
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.
 
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.
 
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.
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable.
 
std::vector< const VariableGradient * > coupledGradients (const std::string &var_name) const
 Returns the gradients for all of a coupled variable's components.
 
const ADVariableGradientadCoupledGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for use in Automatic Differentiation.
 
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.
 
std::vector< const ADVariableGradient * > adCoupledGradients (const std::string &var_name) const
 Returns the gradients for all of a coupled variable's components for use in Automatic Differentiation.
 
template<bool is_ad>
const GenericVariableGradient< is_ad > & coupledGenericGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for use in templated automatic differentiation.
 
template<>
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.
 
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.
 
const ADVariableSecondadCoupledSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second derivatives of a coupled variable for use in Automatic Differentiation.
 
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.
 
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.
 
std::vector< const VariableGradient * > coupledGradientsOld (const std::string &var_name) const
 Returns the old gradients for all of a coupled variable's components.
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old gradient from two time steps previous of a coupled variable.
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled variable for previous Newton iterate.
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of the gradient of a coupled variable.
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of the gradient of a coupled variable.
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled vector variable.
 
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.
 
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.
 
virtual const ArrayVariableGradientcoupledArrayGradient (const std::string &var_name, unsigned int comp=0) const
 Returns gradient of a coupled array variable.
 
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.
 
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.
 
virtual const ArrayVariableGradientcoupledArrayGradientDot (const std::string &var_name, unsigned int comp=0) const
 Retun a gradient of a coupled array variable's time derivative.
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0) const
 Returns curl of a coupled variable.
 
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.
 
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.
 
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.
 
virtual const VectorVariableDivergencecoupledDiv (const std::string &var_name, unsigned int comp=0) const
 Returns divergence of a coupled variable.
 
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.
 
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.
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0) const
 Returns second spatial derivatives of a coupled variable.
 
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.
 
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.
 
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.
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable.
 
std::vector< const VariableValue * > coupledDots (const std::string &var_name) const
 Returns the time derivatives for all of a coupled variable's components.
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable.
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled variable.
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled variable.
 
const ADVariableValueadCoupledDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable for ad simulations.
 
std::vector< const ADVariableValue * > adCoupledDots (const std::string &var_name) const
 Returns the time derivatives for all of a coupled variable's components for ad simulations.
 
const ADVariableValueadCoupledDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled variable for ad simulations.
 
const ADVectorVariableValueadCoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a vector coupled variable for ad simulations.
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled vector variable.
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled vector variable.
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled vector variable.
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled vector variable.
 
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.
 
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.
 
virtual const ArrayVariableValuecoupledArrayDot (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled array variable.
 
virtual const ArrayVariableValuecoupledArrayDotDot (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a coupled array variable.
 
virtual const ArrayVariableValuecoupledArrayDotOld (const std::string &var_name, unsigned int comp=0) const
 Old time derivative of a coupled array variable.
 
virtual const ArrayVariableValuecoupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Old second time derivative of a coupled array variable.
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled variable with respect to the coefficients.
 
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.
 
const VariableValuecoupledArrayDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a coupled array variable with respect to the coefficients.
 
template<typename T >
const T & coupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 Returns nodal values of a coupled variable.
 
template<typename T >
const Moose::ADType< T >::type & adCoupledNodalValue (const std::string &var_name, unsigned int comp=0) const
 Returns AD nodal values of a coupled variable.
 
template<typename T >
const T & coupledNodalValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns an old nodal value from previous time step of a coupled variable.
 
template<typename T >
const T & coupledNodalValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns an old nodal value from two time steps previous of a coupled variable.
 
template<typename T >
const T & coupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0) const
 Returns nodal values of a coupled variable for previous Newton iterate.
 
template<typename T >
const T & coupledNodalDot (const std::string &var_name, unsigned int comp=0) const
 Nodal values of time derivative of a coupled variable.
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0) const
 Nodal values of second time derivative of a coupled variable.
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0) const
 Nodal values of old time derivative of a coupled variable.
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Nodal values of old second time derivative of a coupled variable.
 
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.
 
std::vector< const VariableValue * > coupledAllDofValues (const std::string &var_name) const
 Returns DoFs in the current solution vector of all of a coupled variable's components for the local element.
 
virtual const 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.
 
std::vector< const VariableValue * > coupledAllDofValuesOld (const std::string &var_name) const
 Returns DoFs in the old solution vector of all of a coupled variable's components for the local element.
 
virtual const 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.
 
std::vector< const VariableValue * > coupledAllDofValuesOlder (const std::string &var_name) const
 Returns DoFs in the older solution vector of all of a coupled variable's components for the local element.
 
virtual const 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.
 
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.
 
const ADVariableValueadZeroValue () const
 method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects
 
const ADVariableGradientadZeroGradient () const
 method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing objects
 
const ADVariableSecondadZeroSecond () const
 Retrieve a zero second for automatic differentiation.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & genericZeroValue ()
 Returns zero value templated with automatic differentiation boolean.
 
template<>
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.
 
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.
 
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.
 
const MooseVariableFieldBasegetFEVar (const std::string &var_name, unsigned int comp) const
 Deprecated method.
 
const MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp) const
 
MooseVariableFieldBasegetFieldVar (const std::string &var_name, unsigned int comp)
 
std::vector< const MooseVariableFieldBase * > getFieldVars (const std::string &var_name) const
 
template<typename T >
const T * getVarHelper (const std::string &var_name, unsigned int comp) const
 Helper that that be used to retrieve a variable of arbitrary type T.
 
template<typename T >
T * getVarHelper (const std::string &var_name, unsigned int comp)
 Helper that can be used to retrieve a variable of arbitrary type T.
 
template<typename T >
std::vector< const T * > getVarsHelper (const std::string &var_name) const
 Helper that can be used to retrieve all the component variables of a variable of arbitrary type T.
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled variable.
 
const MooseVariablegetVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled variable.
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled vector variable.
 
const VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled vector variable.
 
ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled array variable.
 
const ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a coupled array variable.
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in.
 
template<typename T , typename Func >
std::vector< T > coupledVectorHelper (const std::string &var_name, const Func &func) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 Returns true if a variables has been coupled_as name.
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 Return the number of components to the coupled scalar variable.
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 Returns the index for a scalar coupled variable by name.
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 Returns the order for a scalar coupled variable by name.
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a scalar coupled variable.
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 Returns AD value of a scalar coupled variable.
 
template<bool is_ad>
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 Returns value of a coupled scalar variable for use in templated automatic differentiation classes.
 
template<>
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
template<>
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 Returns value of a scalar coupled variable.
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 Returns value of a scalar coupled variable.
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 Returns the old (previous time step) value of a scalar coupled variable.
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 Returns the older (two time steps previous) value of a scalar coupled variable.
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 Returns the time derivative of a scalar coupled variable.
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 Returns the time derivative of a scalar coupled variable, including its dependence on the nonlinear degrees of freedom through automatic differentiation.
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 Returns the second time derivative of a scalar coupled variable.
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 Returns the old time derivative of a scalar coupled variable.
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 Returns the old second time derivative of a scalar coupled variable.
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 Time derivative of a scalar coupled variable with respect to the coefficients.
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 Second time derivative of a scalar coupled variable with respect to the coefficients.
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 Extract pointer to a scalar coupled variable.
 

Protected Attributes

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

Private Types

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

Private Member Functions

template<typename T >
const OutputTools< T >::VariableValuevectorTagValueHelper (const std::string &var_names, TagID tag, unsigned int index=0) const
 Generic helper method to get vector tag values based on tag ID.
 
template<typename T >
const OutputTools< T >::VariableValuevectorTagValueHelper (const std::string &var_names, const std::string &tag_name, unsigned int index=0) const
 Generic helper method to get vector tag values based on tag name.
 
template<typename T >
const OutputTools< T >::VariableValuevectorTagDofValueHelper (const std::string &var_name, TagID tag, unsigned int comp=0) const
 Generic helper method to get vector tag degree of freedom values based on tag ID.
 
template<typename T >
const OutputTools< T >::VariableValuevectorTagDofValueHelper (const std::string &var_name, const std::string &tag_name, unsigned int comp=0) const
 Generic helper method to get vector tag degree of freedom values based on tag name.
 
template<typename T >
void requestStates (const std::string &var_name, const TagName &tag_name, const unsigned int comp)
 Method that may request additional solution states from the variable's system depending on the value of tag_name.
 
void checkFuncType (const std::string var_name, VarType t, FuncAge age) const
 
const VariableValuegetDefaultValue (const std::string &var_name, unsigned int comp) const
 Helper method to return (and insert if necessary) the default value for an uncoupled variable.
 
const VectorVariableValuegetDefaultVectorValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default value for an uncoupled vector variable.
 
const ArrayVariableValuegetDefaultArrayValue (const std::string &var_name) const
 Helper method to return (and insert if necessary) the default value for an uncoupled array variable.
 
template<typename T >
const T & getDefaultNodalValue (const std::string &var_name, unsigned int comp=0) const
 Get nodal default value.
 
template<>
const RealVectorValue & getDefaultNodalValue (const std::string &var_name, unsigned int) const
 
template<>
const RealEigenVector & getDefaultNodalValue (const std::string &var_name, unsigned int) const
 
template<typename T >
const Moose::Functor< T > & getDefaultFunctor (const std::string &var_name) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVariable (const std::string &var_name, const std::string &tag_name, unsigned int comp) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVariables (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVectorVariable (const std::string &var_name, const std::string &tag_name, unsigned int comp) const
 
Moose::Kokkos::Variable kokkosCoupledVectorTagVectorVariables (const std::string &var_name, const std::string &tag_name) const
 
Moose::Kokkos::Variable kokkosZeroVariable () const
 
template<typename DofObjectType >
std::set< MooseVariableFieldBase * > checkVariablesHelper (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
 Helper method for checking variables for dof indices.
 

Private Attributes

unsigned int _coupleable_max_qps
 Maximum qps for any element in this system.
 
std::unordered_map< std::string, std::vector< unsigned int > > _optional_var_index
 Unique indices for optionally coupled vars that weren't provided.
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
 Scalar variables coupled into this object (for error checking)
 
std::set< TagID_fe_coupleable_vector_tags
 
std::set< TagID_fe_coupleable_matrix_tags
 
const bool _is_fv
 Whether the MooseObject is a finite volume object.
 
const MooseObject *const _obj
 
const std::set< std::string > _older_state_tags
 vector tag names for which we need to request older solution states from the system
 
std::vector< std::set< MooseWritableVariable * > > _writable_coupled_variables
 keep a set of allocated writable variable references to make sure only one object can obtain them per thread
 
const Real _kokkos_default_value_zero = 0
 kokkos-related variables and methods
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 The name of the object this interface is part of.
 
const bool _sc_is_implicit
 True if implicit value is required.
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 Coupled vars whose values we provide.
 
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
 Will hold the default AD value for optional coupled scalar variables.
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 Vector of coupled variables.
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _sc_coupled_vars
 Field variables coupled into this object (for error checking)
 
std::set< TagID_sc_coupleable_vector_tags
 The scalar coupleable vector tags.
 
std::set< TagID_sc_coupleable_matrix_tags
 The scalar coupleable matrix tags.
 
std::set< MooseVariableFieldBase * > _moose_variable_dependencies
 
std::vector< libMesh::dof_id_type_dof_indices
 A container for holding dof indices in order to avoid constant memory reallocation.
 

Detailed Description

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

Definition at line 22 of file NeighborCoupleableMooseVariableDependencyIntermediateInterface.h.

Member Enumeration Documentation

◆ FuncAge

enum class Coupleable::FuncAge
strongprivateinherited
Enumerator
Curr 
Old 
Older 

Definition at line 1590 of file Coupleable.h.

1591 {
1592 Curr,
1593 Old,
1594 Older,
1595 };

◆ VarType

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

Definition at line 1597 of file Coupleable.h.

Constructor & Destructor Documentation

◆ NeighborCoupleableMooseVariableDependencyIntermediateInterface()

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

Definition at line 30 of file NeighborCoupleableMooseVariableDependencyIntermediateInterface.h.

34 : NeighborCoupleable(moose_object, nodal, neighbor_nodal, is_fv),
35 ScalarCoupleable(moose_object),
37 {
38 for (MooseVariableFEBase * coupled_var : getCoupledMooseVars())
39 addMooseVariableDependency(coupled_var);
40 }
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition Coupleable.h:84
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
This class provides an interface for common operations on field variables of both FE and FV types wit...
Enhances Coupleable interface to also couple the values from neighbor elements.
Interface for objects that needs scalar coupling capabilities.

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

1795{
1796 const auto * var = getVectorVar(var_name, comp);
1797
1798 if (!var)
1799 return getADDefaultCurl();
1801
1802 if (!_c_is_implicit)
1803 mooseError("Not implemented");
1804
1806 return var->adCurlSln();
1807 return var->adCurlSlnNeighbor();
1808}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
bool _c_is_implicit
True if implicit value is required.
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition Coupleable.C:325
void checkFuncType(const std::string var_name, VarType t, FuncAge age) const
Definition Coupleable.C:217
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor v...
const ADVectorVariableCurl & getADDefaultCurl() const
Helper method to return (and insert if necessary) the default curl value for Automatic Differentiatio...

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

2139{
2140 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2141
2142 if (!var)
2143 return *getADDefaultValue(var_name);
2145
2146 if (!_c_is_implicit)
2147 mooseError("Not implemented");
2148
2150 return var->adDofValues();
2151 return var->adDofValuesNeighbor();
2152}
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for Automatic Differentiation for...

Referenced by Coupleable::coupledGenericDofValue().

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

2289{
2290 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2291
2292 if (!var)
2293 return *getADDefaultValue(var_name);
2295
2297 {
2298 if (_c_nodal)
2299 return var->adDofValuesDot();
2300 return var->adUDot();
2301 }
2302 else
2303 {
2304 if (_c_nodal)
2305 mooseError("AD neighbor nodal dof dot not implemented");
2306 return var->adUDotNeighbor();
2307 }
2308}
bool _c_nodal
True if we provide coupling to nodal values.

Referenced by Coupleable::adCoupledDots(), and Coupleable::coupledGenericDot().

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

2312{
2313 const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2314
2315 if (!var)
2316 return *getADDefaultValue(var_name);
2318
2319 if (_c_nodal)
2320 mooseError("Not implemented");
2321
2323 return var->adUDotDot();
2324 return var->adUDotDotNeighbor();
2325}

Referenced by Coupleable::coupledGenericDotDot().

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

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

◆ adCoupledGradient()

const ADVariableGradient & Coupleable::adCoupledGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 2229 of file Coupleable.C.

2230{
2231 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2232
2233 if (!var)
2234 return getADDefaultGradient();
2236
2237 if (!_c_is_implicit)
2238 mooseError("Not implemented");
2239
2241 return var->adGradSln();
2242 return var->adGradSlnNeighbor();
2243}
const ADVariableGradient & getADDefaultGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...

Referenced by Coupleable::adCoupledGradients(), and Coupleable::coupledGenericGradient().

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

2247{
2248 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2249
2250 if (!var)
2251 return getADDefaultGradient();
2253
2254 if (!_c_is_implicit)
2255 mooseError("Not implemented");
2256
2258 return var->adGradSlnDot();
2259 return var->adGradSlnNeighborDot();
2260}

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

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

◆ adCoupledLowerValue()

const ADVariableValue & Coupleable::adCoupledLowerValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 2211 of file Coupleable.C.

2212{
2213 auto var = getVarHelper<MooseVariableFE<Real>>(var_name, comp);
2214
2215 if (!var)
2216 return *getADDefaultValue(var_name);
2218
2219 if (!_c_is_implicit)
2220 mooseError("adCoupledLowerValue cannot be called in a coupleable neighbor object");
2221
2222 if (_c_nodal)
2223 return var->adDofValues();
2224 else
2225 return var->adSlnLower();
2226}

◆ adCoupledNeighborGradient()

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

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

Definition at line 224 of file NeighborCoupleable.C.

225{
226 if (_neighbor_nodal)
227 mooseError("Nodal variables do not have gradients");
228 if (!_c_is_implicit)
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}

Referenced by NeighborCoupleable::coupledGenericNeighborGradient().

◆ adCoupledNeighborValue()

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

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

Definition at line 61 of file NeighborCoupleable.C.

62{
63 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
64
65 if (!var)
66 return *getADDefaultValue(var_name);
67
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}

Referenced by NeighborCoupleable::adCoupledNeighborValues(), and NeighborCoupleable::coupledGenericNeighborValue().

◆ adCoupledNeighborValueDot()

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

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)
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
90 mooseError("adCoupledNeighborValueDot cannot be used for nodal compute objects at this time");
91 else
92 return var->adUDotNeighbor();
93}

◆ adCoupledNeighborValues()

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

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

2170{
2171 static const typename Moose::ADType<T>::type zero = 0;
2172 if (!isCoupled(var_name))
2173 return zero;
2174
2175 if (!_c_nodal)
2176 mooseError("The adCoupledNodalValue method should only be called for nodal computing objects");
2178 mooseError(
2179 "The adCoupledNodalValue method shouldn't be called for neighbor computing objects. I "
2180 "don't even know what that would mean, although maybe someone could explain it to me.");
2181 if (!_c_is_implicit)
2182 mooseError("If you're going to use an explicit scheme, then use coupledNodalValue instead of "
2183 "adCoupledNodalValue");
2184
2185 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2186
2187 return var->adNodalValue();
2188}
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled as name.
Definition Coupleable.C:154
const Number zero

◆ adCoupledScalarDot()

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

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

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

Definition at line 267 of file ScalarCoupleable.C.

268{
269 checkVar(var_name);
270 validateExecutionerType(var_name, "adCoupledScalarDot");
271 return getScalarVar(var_name, comp)->adUDot();
272}
const ADVariableValue & adUDot() const
Return the first derivative of the solution with derivative information.
void checkVar(const std::string &var_name) const
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
const MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp) const
Extract pointer to a scalar coupled variable.

◆ adCoupledScalarValue()

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

Returns AD value of a scalar coupled variable.

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

Definition at line 150 of file ScalarCoupleable.C.

151{
152 checkVar(var_name);
153 if (!isCoupledScalar(var_name, comp))
154 return *getADDefaultValue(var_name);
155
156 auto var = getScalarVar(var_name, comp);
157
158 if (_sc_is_implicit)
159 return var->adSln();
160 else
161 mooseError("adCoupledValue for non-implicit calculations is not currently supported. Use "
162 "coupledValue instead for non-implicit");
163}
bool isCoupledScalar(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled_as name.
const bool _sc_is_implicit
True if implicit value is required.
const ADVariableValue * getADDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the AD default value for an uncoupled variable.

Referenced by ScalarCoupleable::coupledGenericScalarValue().

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

2264{
2265 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2266
2267 if (!var)
2268 return getADDefaultSecond();
2270
2271 if (!_c_is_implicit)
2272 mooseError("Not implemented");
2273
2275 return var->adSecondSln();
2276 else
2277 return var->adSecondSlnNeighbor();
2278}
const ADVariableSecond & getADDefaultSecond() const
Helper method to return (and insert if necessary) the default second derivatives for Automatic Differ...

◆ adCoupledValue()

const ADVariableValue & Coupleable::adCoupledValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 2191 of file Coupleable.C.

2192{
2193 const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2194
2195 if (!var)
2196 return *getADDefaultValue(var_name);
2198
2199 if (!_c_is_implicit)
2200 mooseError("Not implemented");
2201
2202 if (_c_nodal)
2203 return var->adDofValues();
2204
2206 return var->adSln();
2207 return var->adSlnNeighbor();
2208}

Referenced by Coupleable::adCoupledValues(), and Coupleable::coupledGenericValue().

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

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

◆ adCoupledVectorDot()

const ADVectorVariableValue & Coupleable::adCoupledVectorDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 2328 of file Coupleable.C.

2329{
2330 const auto * var = getVectorVar(var_name, comp);
2331 if (!var)
2332 return *getADDefaultVectorValue(var_name);
2334
2335 if (_c_nodal)
2336 mooseError("Not implemented");
2337
2339 return var->adUDot();
2340 return var->adUDotNeighbor();
2341}
const ADVectorVariableValue * getADDefaultVectorValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default vector value for Automatic Differentiat...

◆ adCoupledVectorGradient()

const ADVectorVariableGradient & Coupleable::adCoupledVectorGradient ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 2362 of file Coupleable.C.

2363{
2364 const auto * var = getVectorVar(var_name, comp);
2365 if (!var)
2368
2369 if (!_c_is_implicit)
2370 mooseError("Not implemented");
2371
2373 return var->adGradSln();
2374 return var->adGradSlnNeighbor();
2375}
const ADVectorVariableGradient & getADDefaultVectorGradient() const
Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation ...

◆ adCoupledVectorNeighborValue()

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

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)
114 "adCoupledVectorNeighborValue cannot be used for nodal compute objects at this time");
115 if (!_c_is_implicit)
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}

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

2345{
2346 const auto * var = getVectorVar(var_name, comp);
2347 if (!var)
2348 return *getADDefaultVectorValue(var_name);
2350
2351 if (_c_nodal)
2352 mooseError("Not implemented");
2353 if (!_c_is_implicit)
2354 mooseError("Not implemented");
2355
2357 return var->adSln();
2358 return var->adSlnNeighbor();
2359}

Referenced by Coupleable::adCoupledVectorValues(), and Coupleable::coupledGenericVectorValue().

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

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

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 118 of file Coupleable.h.

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

Referenced by Coupleable::coupledMatrixTagValue().

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

◆ addMooseVariableDependency() [1/2]

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

Definition at line 98 of file MooseVariableDependencyInterface.h.

99 {
100 _moose_variable_dependencies.insert(vars.begin(), vars.end());
101 }
char ** vars
std::set< MooseVariableFieldBase * > _moose_variable_dependencies

◆ addMooseVariableDependency() [2/2]

void MooseVariableDependencyInterface::addMooseVariableDependency ( MooseVariableFieldBase var)
inlineinherited

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

Definition at line 94 of file MooseVariableDependencyInterface.h.

95 {
97 }

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

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

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

◆ adZeroSecond()

const ADVariableSecond & Coupleable::adZeroSecond ( ) const
protectedinherited

Retrieve a zero second for automatic differentiation.

Definition at line 2451 of file Coupleable.C.

2452{
2453 mooseDeprecated("Method adZeroSecond() is deprecated. Use '_ad_second_zero' instead.");
2454 return _ad_second_zero;
2455}
const MooseArray< ADRealTensorValue > & _ad_second_zero

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

2438{
2439 mooseDeprecated("Method adZeroValue() is deprecated. Use '_ad_zero' instead.");
2440 return _ad_zero;
2441}
const MooseArray< ADReal > & _ad_zero

◆ checkAllVariables()

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

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

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

Definition at line 119 of file MooseVariableDependencyInterface.h.

121{
122 if (vars_to_omit.empty())
124
125 std::set<MooseVariableFieldBase *> vars_to_check;
126 std::set_difference(_moose_variable_dependencies.begin(),
128 vars_to_omit.begin(),
129 vars_to_omit.end(),
130 std::inserter(vars_to_check, vars_to_check.begin()));
131 return checkVariables(dof_object, vars_to_check);
132}
virtual std::set< MooseVariableFieldBase * > checkVariables(const libMesh::Node &node, const std::set< MooseVariableFieldBase * > &vars_to_check)
Check whether all of the supplied variables have degree of freedom indices on the supplied node.

◆ checkFuncType()

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

Definition at line 217 of file Coupleable.C.

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

Referenced by Coupleable::adCoupledCurl(), Coupleable::adCoupledDofValues(), Coupleable::adCoupledDot(), Coupleable::adCoupledDotDot(), Coupleable::adCoupledGradient(), Coupleable::adCoupledGradientDot(), Coupleable::adCoupledLowerValue(), Coupleable::adCoupledSecond(), Coupleable::adCoupledValue(), Coupleable::adCoupledVectorDot(), Coupleable::adCoupledVectorGradient(), Coupleable::adCoupledVectorValue(), Coupleable::coupled(), Coupleable::coupledAllDofValues(), Coupleable::coupledArrayDofValues(), Coupleable::coupledArrayDot(), Coupleable::coupledArrayDotDot(), Coupleable::coupledArrayDotDotOld(), Coupleable::coupledArrayDotDu(), Coupleable::coupledArrayDotOld(), Coupleable::coupledArrayGradient(), Coupleable::coupledArrayGradientDot(), Coupleable::coupledArrayGradientOld(), Coupleable::coupledArrayGradientOlder(), Coupleable::coupledArrayValue(), 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::coupledMatrixTagValue(), 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(), 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::coupledVectorTagArrayGradient(), Coupleable::coupledVectorTagGradient(), Coupleable::coupledVectorValue(), Coupleable::coupledVectorValueOld(), Coupleable::coupledVectorValueOlder(), Coupleable::vectorTagDofValueHelper(), and Coupleable::vectorTagValueHelper().

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

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

Referenced by Coupleable::getVarHelper().

◆ checkVariables() [1/2]

std::set< MooseVariableFieldBase * > MooseVariableDependencyInterface::checkVariables ( const libMesh::Elem element,
const std::set< MooseVariableFieldBase * > &  vars_to_check 
)
inlineinherited

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

Parameters
elementThe element that we want to check for existence of variable degrees of freedom on
vars_to_checkthe variables to check
Returns
Any variables that do not have degrees of freedom on the supplied degree of freedom object

Definition at line 142 of file MooseVariableDependencyInterface.h.

144{
145 return checkVariablesHelper(element, vars_to_check);
146}
std::set< MooseVariableFieldBase * > checkVariablesHelper(const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
Helper method for checking variables for dof indices.

◆ checkVariables() [2/2]

std::set< MooseVariableFieldBase * > MooseVariableDependencyInterface::checkVariables ( const libMesh::Node node,
const std::set< MooseVariableFieldBase * > &  vars_to_check 
)
inlinevirtualinherited

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

Parameters
nodeThe node that we want to check for existence of variable degrees of freedom on
vars_to_checkthe variables to check
Returns
Any variables that do not have degrees of freedom on the supplied degree of freedom object

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

Definition at line 135 of file MooseVariableDependencyInterface.h.

137{
138 return checkVariablesHelper(node, vars_to_check);
139}

Referenced by MooseVariableDependencyInterface::checkAllVariables(), and AuxKernelTempl< ComputeValueType >::checkVariables().

◆ checkVariablesHelper()

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

Helper method for checking variables for dof indices.

Returns the subset of variables of vars_to_check that do \emph not have dof indices on the provided dof_object

Definition at line 33 of file MooseVariableDependencyInterface.C.

35{
36 std::set<MooseVariableFieldBase *> vars_without_indices;
37 for (auto * const var : vars_to_check)
38 {
39 var->sys().dofMap().dof_indices(&dof_object, _dof_indices, var->number());
40 if (_dof_indices.empty())
41 vars_without_indices.insert(var);
42 }
43
44 return vars_without_indices;
45}
std::vector< libMesh::dof_id_type > _dof_indices
A container for holding dof indices in order to avoid constant memory reallocation.

Referenced by MooseVariableDependencyInterface::checkVariables(), and MooseVariableDependencyInterface::checkVariables().

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

985{
986 // check domain restrictions for compatibility
987 const auto * br = dynamic_cast<const BlockRestrictable *>(this);
988 const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
989 const auto * mat = dynamic_cast<const Material *>(this);
990
991 if (br && !var->hasBlocks(br->blockIDs()))
992 mooseError("The variable '",
993 var->name(),
994 "' must be defined on all blocks '",
995 _obj->name(),
996 "' is defined on.");
997
998 if (nfc && !var->hasBlocks(nfc->getSecondaryConnectedBlocks()))
999 mooseError("The variable '",
1000 var->name(),
1001 " must be defined on all blocks '",
1002 _obj->name(),
1003 "'s secondary surface is defined on.");
1004
1005 // make sure only one object can access a variable
1006 for (const auto & ci : _obj->getMooseApp().getInterfaceObjects<Coupleable>())
1007 if (ci != this && ci->_writable_coupled_variables[_c_tid].count(var))
1008 {
1009 // if both this and ci are block restrictable then we check if the block restrictions
1010 // are not overlapping. If they don't we permit the call.
1011 const auto * br_other = dynamic_cast<const BlockRestrictable *>(ci);
1012 if (br && br_other && br->blockRestricted() && br_other->blockRestricted() &&
1013 !MooseUtils::setsIntersect(br->blockIDs(), br_other->blockIDs()))
1014 continue;
1015 else if (nfc)
1016 continue;
1017 // three materials per material declared
1018 else if (mat)
1019 continue;
1020
1021 mooseError("'",
1022 ci->_obj->name(),
1023 "' already obtained a writable reference to '",
1024 var->name(),
1025 "'. Only one object can obtain such a reference per variable and subdomain in a "
1026 "simulation.");
1027 }
1028
1029 // var is unique across threads, so we could forego having a separate set per thread, but we
1030 // need quick access to the list of all variables that need to be inserted into the solution
1031 // vector by a given thread.
1032
1034}
unsigned int count
Definition MortarUtils.C:53
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
An interface that restricts an object to subdomains via the 'blocks' input parameter.
Interface for objects that needs coupling capabilities.
Definition Coupleable.h:53
THREAD_ID _c_tid
Thread ID of the thread using this object.
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...
Materials compute MaterialProperties.
Definition Material.h:36
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
bool hasBlocks(const SubdomainID id) const override
Returns whether the functor is defined on this block.
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh.

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

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

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

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

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

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

◆ coupledAllDofValuesOld()

std::vector< const VariableValue * > Coupleable::coupledAllDofValuesOld ( const std::string &  var_name) const
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 2097 of file Coupleable.C.

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

◆ coupledAllDofValuesOlder()

std::vector< const VariableValue * > Coupleable::coupledAllDofValuesOlder ( const std::string &  var_name) const
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 2117 of file Coupleable.C.

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

◆ coupledArrayDofValues()

const ArrayVariableValue & Coupleable::coupledArrayDofValues ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 2125 of file Coupleable.C.

2126{
2127 const auto * var = getArrayVar(var_name, comp);
2128 if (!var)
2129 return *getDefaultArrayValue(var_name);
2131
2133 return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2134 return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2135}
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition Coupleable.C:337
const ArrayVariableValue * getDefaultArrayValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled array variable.
Definition Coupleable.C:428

◆ coupledArrayDot()

const ArrayVariableValue & Coupleable::coupledArrayDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1386 of file Coupleable.C.

1387{
1388 const auto * var = getArrayVar(var_name, comp);
1389 if (!var)
1392
1394 {
1395 if (_c_nodal)
1396 return var->dofValuesDot();
1397 return var->uDot();
1398 }
1399 else
1400 {
1401 if (_c_nodal)
1402 return var->dofValuesDotNeighbor();
1403 return var->uDotNeighbor();
1404 }
1405}
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledArrayDotDot()

const ArrayVariableValue & Coupleable::coupledArrayDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1408 of file Coupleable.C.

1409{
1410 const auto * var = getArrayVar(var_name, comp);
1411 if (!var)
1414
1416 {
1417 if (_c_nodal)
1418 return var->dofValuesDotDot();
1419 return var->uDotDot();
1420 }
1421 else
1422 {
1423 if (_c_nodal)
1424 return var->dofValuesDotDotNeighbor();
1425 return var->uDotDotNeighbor();
1426 }
1427}

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

1453{
1454 const auto * var = getArrayVar(var_name, comp);
1455 if (!var)
1458
1460 {
1461 if (_c_nodal)
1462 return var->dofValuesDotDotOld();
1463 return var->uDotDotOld();
1464 }
1465 else
1466 {
1467 if (_c_nodal)
1468 return var->dofValuesDotDotOldNeighbor();
1469 return var->uDotDotOldNeighbor();
1470 }
1471}

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

1525{
1526 const auto * const var = getArrayVar(var_name, comp);
1527 if (!var)
1528 {
1530 return _default_value_zero;
1531 }
1533
1535 {
1536 if (_c_nodal)
1537 return var->dofValuesDuDotDu();
1538 return var->duDotDu();
1539 }
1540 else
1541 {
1542 if (_c_nodal)
1543 return var->dofValuesDuDotDuNeighbor();
1544 return var->duDotDuNeighbor();
1545 }
1546}
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
unsigned int _coupleable_max_qps
Maximum qps for any element in this system.

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

1431{
1432 const auto * var = getArrayVar(var_name, comp);
1433 if (!var)
1436
1438 {
1439 if (_c_nodal)
1440 return var->dofValuesDotOld();
1441 return var->uDotOld();
1442 }
1443 else
1444 {
1445 if (_c_nodal)
1446 return var->dofValuesDotOldNeighbor();
1447 return var->uDotOldNeighbor();
1448 }
1449}

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

1695{
1696 const auto * var = getArrayVar(var_name, comp);
1697 if (!var)
1700
1702 return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1703 return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1704}
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledArrayGradientDot()

const ArrayVariableGradient & Coupleable::coupledArrayGradientDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1733 of file Coupleable.C.

1734{
1735 const auto * const var = getArrayVar(var_name, comp);
1736 if (!var)
1739
1741 return var->gradSlnDot();
1742 return var->gradSlnNeighborDot();
1743}

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

1708{
1709 const auto * var = getArrayVar(var_name, comp);
1710 if (!var)
1713
1715 return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1716 return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1717}

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

1721{
1722 const auto * var = getArrayVar(var_name, comp);
1723 if (!var)
1726
1728 return var->gradSlnOlder();
1729 return var->gradSlnOlderNeighbor();
1730}

◆ coupledArrayNeighborGradient()

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

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}

◆ coupledArrayNeighborGradientOld()

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

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}

◆ coupledArrayNeighborGradientOlder()

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

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}

◆ coupledArrayNeighborValue()

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

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}

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

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

Referenced by Coupleable::coupledArrayValues().

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

1133{
1134 const auto * var = getArrayVar(var_name, comp);
1135 if (!var)
1136 return *getDefaultArrayValue(var_name);
1138
1140 {
1141 if (_c_nodal)
1142 return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1143 return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1144 }
1145 else
1146 {
1147 if (_c_nodal)
1148 return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1149 return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1150 }
1151}

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

1155{
1156 const auto * var = getArrayVar(var_name, comp);
1157 if (!var)
1158 return *getDefaultArrayValue(var_name);
1160
1162 {
1163 if (_c_nodal)
1164 return var->dofValuesOlder();
1165 return var->slnOlder();
1166 }
1167 else
1168 {
1169 if (_c_nodal)
1170 return var->dofValuesOlderNeighbor();
1171 return var->slnOlderNeighbor();
1172 }
1173}

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

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

◆ coupledCallback()

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

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

Reimplemented in AuxKernelBase.

Definition at line 149 of file Coupleable.h.

149{}

Referenced by Coupleable::checkFuncType().

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

184{
185 const auto & var_name = _c_parameters.checkForRename(var_name_in);
186
187 if (isCoupled(var_name))
188 {
189 mooseAssert(_coupled_vars.find(var_name) != _coupled_vars.end(),
190 var_name << " must not actually be coupled!");
191 return _coupled_vars.at(var_name).size();
192 }
193 else
194 {
197 else
198 return 0;
199 }
200}
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.

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

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

1747{
1748 const auto * var = getVectorVar(var_name, comp);
1749 if (!var)
1750 {
1752 return _default_vector_curl;
1753 }
1755
1757 return (_c_is_implicit) ? var->curlSln() : var->curlSlnOld();
1758 return (_c_is_implicit) ? var->curlSlnNeighbor() : var->curlSlnOldNeighbor();
1759}
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledCurlOld()

const VectorVariableCurl & Coupleable::coupledCurlOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1762 of file Coupleable.C.

1763{
1764 const auto * var = getVectorVar(var_name, comp);
1765 if (!var)
1766 {
1768 return _default_vector_curl;
1769 }
1771
1773 return (_c_is_implicit) ? var->curlSlnOld() : var->curlSlnOlder();
1774 return (_c_is_implicit) ? var->curlSlnOldNeighbor() : var->curlSlnOlderNeighbor();
1775}

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

1779{
1780 const auto * var = getVectorVar(var_name, comp);
1781 if (!var)
1782 {
1784 return _default_vector_curl;
1785 }
1787
1789 return var->curlSlnOlder();
1790 return var->curlSlnOlderNeighbor();
1791}

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

1812{
1813 const auto * var = getVectorVar(var_name, comp);
1814 if (!var)
1815 {
1817 return _default_div;
1818 }
1820
1822 return (_c_is_implicit) ? var->divSln() : var->divSlnOld();
1823 return (_c_is_implicit) ? var->divSlnNeighbor() : var->divSlnOldNeighbor();
1824}
VectorVariableDivergence _default_div
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledDivOld()

const VectorVariableDivergence & Coupleable::coupledDivOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1827 of file Coupleable.C.

1828{
1829 const auto * var = getVectorVar(var_name, comp);
1830 if (!var)
1831 {
1833 return _default_div;
1834 }
1836
1838 return (_c_is_implicit) ? var->divSlnOld() : var->divSlnOlder();
1839 return (_c_is_implicit) ? var->divSlnOldNeighbor() : var->divSlnOlderNeighbor();
1840}

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

1844{
1845 const auto * var = getVectorVar(var_name, comp);
1846 if (!var)
1847 {
1849 return _default_div;
1850 }
1852
1854 return var->divSlnOlder();
1855 return var->divSlnOlderNeighbor();
1856}

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

2064{
2065 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
2066 if (!var)
2067 return *getDefaultValue(var_name, comp);
2069
2071 return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
2072 return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
2073}
const VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable.
Definition Coupleable.C:366

Referenced by Coupleable::coupledAllDofValues(), and Coupleable::coupledGenericDofValue().

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

2085{
2086 const auto * var = getVar(var_name, comp);
2087 if (!var)
2088 return *getDefaultValue(var_name, comp);
2090
2092 return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
2093 return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
2094}
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition Coupleable.C:319

Referenced by Coupleable::coupledAllDofValuesOld().

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

2105{
2106 const auto * var = getVar(var_name, comp);
2107 if (!var)
2108 return *getDefaultValue(var_name, comp);
2110
2112 return var->dofValuesOlder();
2113 return var->dofValuesOlderNeighbor();
2114}

Referenced by Coupleable::coupledAllDofValuesOlder().

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

Definition at line 1176 of file Coupleable.C.

1177{
1178 const auto * var = getVar(var_name, comp);
1179 if (!var)
1180 {
1182 return _default_value_zero;
1183 }
1185
1187 {
1188 if (_c_nodal)
1189 return var->dofValuesDot();
1190 return var->uDot();
1191 }
1192 else
1193 {
1194 if (_c_nodal)
1195 return var->dofValuesDotNeighbor();
1196 return var->uDotNeighbor();
1197 }
1198}

Referenced by Coupleable::coupledDots(), and Coupleable::coupledGenericDot().

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

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

Referenced by Coupleable::coupledGenericDotDot().

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

1500{
1501 const auto * var = getVar(var_name, comp);
1502 if (!var)
1503 {
1505 return _default_value_zero;
1506 }
1508
1510 {
1511 if (_c_nodal)
1512 return var->dofValuesDuDotDotDu();
1513 return var->duDotDotDu();
1514 }
1515 else
1516 {
1517 if (_c_nodal)
1518 return var->dofValuesDuDotDotDuNeighbor();
1519 return var->duDotDotDuNeighbor();
1520 }
1521}

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

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

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

Definition at line 1474 of file Coupleable.C.

1475{
1476 const auto * var = getVar(var_name, comp);
1477 if (!var)
1478 {
1480 return _default_value_zero;
1481 }
1483
1485 {
1486 if (_c_nodal)
1487 return var->dofValuesDuDotDu();
1488 return var->duDotDu();
1489 }
1490 else
1491 {
1492 if (_c_nodal)
1493 return var->dofValuesDuDotDuNeighbor();
1494 return var->duDotDuNeighbor();
1495 }
1496}

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

1241{
1242 const auto * var = getVar(var_name, comp);
1243 if (!var)
1244 {
1246 return _default_value_zero;
1247 }
1249
1251 {
1252 if (_c_nodal)
1253 return var->dofValuesDotOld();
1254 return var->uDotOld();
1255 }
1256 else
1257 {
1258 if (_c_nodal)
1259 return var->dofValuesDotOldNeighbor();
1260 return var->uDotOldNeighbor();
1261 }
1262}

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

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

◆ coupledGenericDofValue() [1/3]

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

Definition at line 619 of file Coupleable.C.

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

◆ coupledGenericDofValue() [2/3]

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

Definition at line 626 of file Coupleable.C.

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

◆ coupledGenericDofValue() [3/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::coupledGenericDofValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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

◆ coupledGenericDot() [1/3]

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

Definition at line 2798 of file Coupleable.C.

2800{
2801 return coupledDot(var_name, comp);
2802}

◆ coupledGenericDot() [2/3]

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

Definition at line 2805 of file Coupleable.C.

2807{
2808 return adCoupledDot(var_name, comp);
2809}

◆ coupledGenericDot() [3/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

◆ coupledGenericDotDot() [1/3]

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

Definition at line 1226 of file Coupleable.C.

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

◆ coupledGenericDotDot() [2/3]

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

Definition at line 1233 of file Coupleable.C.

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

◆ coupledGenericDotDot() [3/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::coupledGenericDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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

◆ coupledGenericGradient() [1/3]

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

Definition at line 2500 of file Coupleable.C.

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

◆ coupledGenericGradient() [2/3]

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

Definition at line 2507 of file Coupleable.C.

2509{
2510 return adCoupledGradient(var_name, comp);
2511}

◆ coupledGenericGradient() [3/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

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

Definition at line 2748 of file Coupleable.C.

2764{
2765 auto func = [this, &var_name](unsigned int comp) { return &adCoupledGradient(var_name, comp); };
2766 return coupledVectorHelper<const GenericVariableGradient<true> *>(var_name, func);
2767}

◆ coupledGenericGradients() [3/3]

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

Definition at line 2748 of file Coupleable.C.

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

◆ coupledGenericNeighborGradient()

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

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
inherited

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

◆ coupledGenericScalarValue() [1/3]

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

Definition at line 166 of file ScalarCoupleable.C.

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

◆ coupledGenericScalarValue() [2/3]

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

Definition at line 174 of file ScalarCoupleable.C.

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

◆ coupledGenericScalarValue() [3/3]

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

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

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

◆ coupledGenericValue() [1/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.

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

◆ coupledGenericValue() [2/3]

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

Definition at line 507 of file Coupleable.C.

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

◆ coupledGenericValue() [3/3]

template<bool is_ad>
const GenericVariableValue< is_ad > & Coupleable::coupledGenericValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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

◆ 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< true > * > Coupleable::coupledGenericValues ( const std::string &  var_name) const
protectedinherited

Definition at line 2552 of file Coupleable.C.

2568{
2569 return adCoupledValues(var_name);
2570}
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.

◆ coupledGenericValues() [3/3]

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

Definition at line 2552 of file Coupleable.C.

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

◆ coupledGenericVectorValue() [1/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.

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

◆ coupledGenericVectorValue() [2/3]

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

Definition at line 521 of file Coupleable.C.

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

◆ coupledGenericVectorValue() [3/3]

template<bool is_ad>
const GenericVectorVariableValue< is_ad > & Coupleable::coupledGenericVectorValue ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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

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

1550{
1551 const auto * const var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
1552 if (!var)
1553 {
1555 return _default_gradient;
1556 }
1558
1560 return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1561 return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1562}
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...

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

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

1615{
1616 const auto * var = getVar(var_name, comp);
1617 if (!var)
1618 {
1620 return _default_gradient;
1621 }
1623
1625 return var->gradSlnDot();
1626 return var->gradSlnNeighborDot();
1627}

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

1631{
1632 const auto * var = getVar(var_name, comp);
1633 if (!var)
1634 {
1636 return _default_gradient;
1637 }
1639
1641 return var->gradSlnDotDot();
1642 return var->gradSlnNeighborDotDot();
1643}

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

1566{
1567 const auto * var = getVar(var_name, comp);
1568 if (!var)
1569 {
1571 return _default_gradient;
1572 }
1574
1576 return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1577 return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1578}

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

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

1582{
1583 const auto * var = getVar(var_name, comp);
1584 if (!var)
1585 {
1587 return _default_gradient;
1588 }
1590
1592 return var->gradSlnOlder();
1593 return var->gradSlnOlderNeighbor();
1594}

Referenced by NodeFaceConstraint::coupledSecondaryGradientOlder().

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

1598{
1599 const auto * var = getVar(var_name, comp);
1601 if (!var)
1602 {
1604 return _default_gradient;
1605 }
1607
1609 return var->gradSlnPreviousNL();
1610 return var->gradSlnPreviousNLNeighbor();
1611}
FEProblemBase & _c_fe_problem
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.

◆ coupledGradients()

std::vector< const VariableGradient * > Coupleable::coupledGradients ( const std::string &  var_name) const
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 2748 of file Coupleable.C.

2749{
2750 auto func = [this, &var_name](unsigned int comp) { return &coupledGradient(var_name, comp); };
2751 return coupledVectorHelper<const VariableGradient *>(var_name, func);
2752}

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

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

◆ coupledIndices()

std::vector< unsigned int > Coupleable::coupledIndices ( const std::string &  var_name) const
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 2514 of file Coupleable.C.

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

◆ coupledMatrixTagScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 217 of file ScalarCoupleable.C.

220{
221 checkVar(var_name);
222 if (!isCoupledScalar(var_name, comp))
223 return *getDefaultValue(var_name);
224
225 _sc_coupleable_matrix_tags.insert(tag);
226
227 return getScalarVar(var_name, comp)->matrixTagSln(tag);
228}
const VariableValue & matrixTagSln(TagID tag) const
std::set< TagID > _sc_coupleable_matrix_tags
The scalar coupleable matrix tags.
const VariableValue * getDefaultValue(const std::string &var_name) const
Helper method to return (and insert if necessary) the default value for an uncoupled variable.

◆ coupledMatrixTagValue() [1/2]

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

Definition at line 839 of file Coupleable.C.

842{
843 if (!_c_parameters.isParamValid(tag_name))
844 mooseError("Tag name parameter '", tag_name, "' is invalid");
845
846 TagName tagname = _c_parameters.get<TagName>(tag_name);
847 if (!_c_fe_problem.matrixTagExists(tagname))
848 mooseError("Matrix tag name '", tagname, "' does not exist");
849
850 TagID tag = _c_fe_problem.getMatrixTagID(tagname);
851 return coupledMatrixTagValue(var_names, tag, index);
852}
unsigned int TagID
Definition MooseTypes.h:238
virtual const VariableValue & coupledMatrixTagValue(const std::string &var_names, TagID tag, unsigned int index=0) const
Returns value of a coupled variable for a given tag.
Definition Coupleable.C:822
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.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...
virtual TagID getMatrixTagID(const TagName &tag_name) const
Get a TagID from a TagName.
Definition SubProblem.C:343
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
Definition SubProblem.C:329

◆ coupledMatrixTagValue() [2/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 822 of file Coupleable.C.

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

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

◆ coupledMatrixTagValues() [1/2]

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

Definition at line 2711 of file Coupleable.C.

2713{
2714 if (!_c_parameters.isParamValid(tag_name))
2715 mooseError("Tag name parameter '", tag_name, "' is invalid");
2716
2717 TagName tagname = _c_parameters.get<TagName>(tag_name);
2718 if (!_c_fe_problem.matrixTagExists(tagname))
2719 mooseError("Matrix tag name '", tagname, "' does not exist");
2720
2721 TagID tag = _c_fe_problem.getMatrixTagID(tagname);
2722 return coupledMatrixTagValues(var_names, tag);
2723}
std::vector< const VariableValue * > coupledMatrixTagValues(const std::string &var_names, TagID tag) const
Returns the diagonal matrix values for all the coupled variables desired for a given tag.

◆ coupledMatrixTagValues() [2/2]

std::vector< const VariableValue * > Coupleable::coupledMatrixTagValues ( const std::string &  var_names,
TagID  tag 
) const
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 2703 of file Coupleable.C.

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

Referenced by Coupleable::coupledMatrixTagValues().

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

2522{
2523 if (getFieldVar(var_name, comp))
2524 return getFieldVar(var_name, comp)->name();
2525 // Detect if we are in the case where a constant was passed in lieu of a variable
2526 else if (isCoupledConstant(var_name))
2528 ": a variable name was queried but a constant was passed for parameter '",
2529 var_name,
2530 "Either pass a true variable or contact a developer to shield the call to "
2531 "'coupledName' with 'isCoupledConstant'");
2532 else
2533 mooseError(
2534 _c_name, ": Variable '", var_name, "' does not exist, yet its coupled name is requested");
2535}
virtual bool isCoupledConstant(const std::string &var_name) const
Returns true if a variable passed as a coupled value is really a constant.
Definition Coupleable.C:177

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

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

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

◆ coupledNeighborDofValues()

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

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}

◆ coupledNeighborDofValuesOld()

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

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}

◆ coupledNeighborDofValuesOlder()

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

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}

◆ coupledNeighborGradient()

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

Definition at line 179 of file NeighborCoupleable.C.

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}

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

◆ coupledNeighborGradientOld()

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

Definition at line 197 of file NeighborCoupleable.C.

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}

Referenced by NodeFaceConstraint::coupledPrimaryGradientOld().

◆ coupledNeighborGradientOlder()

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

Definition at line 209 of file NeighborCoupleable.C.

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}

Referenced by NodeFaceConstraint::coupledPrimaryGradientOlder().

◆ coupledNeighborGradients()

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

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}

◆ coupledNeighborSecond()

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

Definition at line 325 of file NeighborCoupleable.C.

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}

Referenced by NodeFaceConstraint::coupledPrimarySecond().

◆ coupledNeighborValue()

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

Definition at line 27 of file NeighborCoupleable.C.

28{
29 const auto * var = getVarHelper<MooseVariableField<Real>>(var_name, comp);
31 return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
32 else
33 return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
34}

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

◆ coupledNeighborValueDot()

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

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}

◆ coupledNeighborValueDotDu()

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

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}

◆ coupledNeighborValueOld()

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

Definition at line 145 of file NeighborCoupleable.C.

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}

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

◆ coupledNeighborValueOlder()

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

Definition at line 157 of file NeighborCoupleable.C.

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}

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

◆ coupledNeighborValues()

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

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}

◆ coupledNeighborValuesOld()

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

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
inherited

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

2002{
2003 static const T zero = 0;
2004 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
2005 if (!var)
2006 return zero;
2008
2010 return var->nodalValueDot();
2011 mooseError("Neighbor version not implemented");
2012}

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

2016{
2017 const auto * var = getVar(var_name, comp);
2018 if (!var)
2019 {
2021 return _default_value_zero;
2022 }
2024
2026 return var->dofValuesDotDot();
2027 return var->dofValuesDotDotNeighbor();
2028}

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

2048{
2049 const auto * var = getVar(var_name, comp);
2050 if (!var)
2051 {
2053 return _default_value_zero;
2054 }
2056
2058 return var->dofValuesDotDotOld();
2059 return var->dofValuesDotDotOldNeighbor();
2060}

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

2032{
2033 const auto * var = getVar(var_name, comp);
2034 if (!var)
2035 {
2037 return _default_value_zero;
2038 }
2040
2042 return var->dofValuesDotOld();
2043 return var->dofValuesDotOldNeighbor();
2044}

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

1926{
1927 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1928 if (!var)
1929 return getDefaultNodalValue<T>(var_name, comp);
1931
1932 if (!var->isNodal())
1934 ": Trying to get nodal values of variable '",
1935 var->name(),
1936 "', but it is not nodal.");
1937
1939 return (_c_is_implicit) ? var->nodalValue() : var->nodalValueOld();
1940 return (_c_is_implicit) ? var->nodalValueNeighbor() : var->nodalValueOldNeighbor();
1941}

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

1946{
1947 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1948 if (!var)
1949 return getDefaultNodalValue<T>(var_name, comp);
1951
1952 if (!var->isNodal())
1954 ": Trying to get old nodal values of variable '",
1955 var->name(),
1956 "', but it is not nodal.");
1957
1959 return (_c_is_implicit) ? var->nodalValueOld() : var->nodalValueOlder();
1960 return (_c_is_implicit) ? var->nodalValueOldNeighbor() : var->nodalValueOlderNeighbor();
1961}

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

1966{
1967 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1968 if (!var)
1969 return getDefaultNodalValue<T>(var_name, comp);
1971
1972 if (!var->isNodal())
1974 ": Trying to get older nodal values of variable '",
1975 var->name(),
1976 "', but it is not nodal.");
1977
1979 return var->nodalValueOlder();
1980 return var->nodalValueOlderNeighbor();
1981}

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

1986{
1987 const auto * var = getVarHelper<MooseVariableFE<T>>(var_name, comp);
1988 if (!var)
1989 return getDefaultNodalValue<T>(var_name, comp);
1991
1993
1995 return var->nodalValuePreviousNL();
1996 return var->nodalValuePreviousNLNeighbor();
1997}

◆ coupledScalar()

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

Returns the index for a scalar coupled variable by name.

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

Definition at line 108 of file ScalarCoupleable.C.

109{
110 checkVar(var_name);
111 return getScalarVar(var_name, comp)->number();
112}
unsigned int number() const
Get variable number coming from libMesh.

Referenced by ParsedODEKernel::ParsedODEKernel().

◆ coupledScalarComponents()

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

Return the number of components to the coupled scalar variable.

Parameters
var_nameThe of the coupled variable

Definition at line 368 of file ScalarCoupleable.C.

369{
370 const auto & var_name = _sc_parameters.checkForRename(var_name_in);
371
372 const auto it = _coupled_scalar_vars.find(var_name);
373 if (it != _coupled_scalar_vars.end())
374 return it->second.size();
375
376 mooseError(_sc_name, ": Trying to get a non-existent variable '", var_name, "'");
377}
const std::string & _sc_name
The name of the object this interface is part of.
const InputParameters & _sc_parameters
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.

◆ coupledScalarDot()

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

Returns the time derivative of a scalar coupled variable.

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

Definition at line 259 of file ScalarCoupleable.C.

260{
261 checkVar(var_name);
262 validateExecutionerType(var_name, "coupledScalarDot");
263 return getScalarVar(var_name, comp)->uDot();
264}
const VariableValue & uDot() const

◆ coupledScalarDotDot()

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

Returns the second time derivative of a scalar coupled variable.

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

Definition at line 275 of file ScalarCoupleable.C.

276{
277 checkVar(var_name);
278 validateExecutionerType(var_name, "coupledScalarDotDot");
279 return getScalarVar(var_name, comp)->uDotDot();
280}
const VariableValue & uDotDot() const

◆ coupledScalarDotDotDu()

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

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

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

Definition at line 307 of file ScalarCoupleable.C.

308{
309 checkVar(var_name);
310 validateExecutionerType(var_name, "coupledScalarDotDotDu");
311 return getScalarVar(var_name, comp)->duDotDotDu();
312}
const VariableValue & duDotDotDu() const

◆ coupledScalarDotDotOld()

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

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

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

Definition at line 291 of file ScalarCoupleable.C.

293{
294 checkVar(var_name);
295 validateExecutionerType(var_name, "coupledScalarDotDotOld");
296 return getScalarVar(var_name, comp)->uDotDotOld();
297}
const VariableValue & uDotDotOld() const

◆ coupledScalarDotDu()

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

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

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

Definition at line 299 of file ScalarCoupleable.C.

300{
301 checkVar(var_name);
302 validateExecutionerType(var_name, "coupledScalarDotDu");
303 return getScalarVar(var_name, comp)->duDotDu();
304}
const VariableValue & duDotDu() const

◆ coupledScalarDotOld()

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

Returns the old time derivative of a scalar coupled variable.

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

Definition at line 283 of file ScalarCoupleable.C.

284{
285 checkVar(var_name);
286 validateExecutionerType(var_name, "coupledScalarDotOld");
287 return getScalarVar(var_name, comp)->uDotOld();
288}
const VariableValue & uDotOld() const

◆ coupledScalarOrder()

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

Returns the order for a scalar coupled variable by name.

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

Definition at line 115 of file ScalarCoupleable.C.

116{
117 checkVar(var_name);
118 if (!isCoupledScalar(var_name, comp))
120
121 return getScalarVar(var_name, comp)->order();
122}
libMesh::Order getMaxScalarOrder() const
libMesh::Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int.
FEProblemBase & _sc_fe_problem

◆ coupledScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 139 of file ScalarCoupleable.C.

140{
141 checkVar(var_name);
142 if (!isCoupledScalar(var_name, comp))
143 return *getDefaultValue(var_name);
144
145 auto var = getScalarVar(var_name, comp);
146 return _sc_is_implicit ? var->sln() : var->slnOld();
147}

Referenced by ScalarCoupleable::coupledGenericScalarValue(), and ParsedODEKernel::ParsedODEKernel().

◆ coupledScalarValueOld()

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

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

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

Definition at line 231 of file ScalarCoupleable.C.

232{
233 checkVar(var_name);
234 if (!isCoupledScalar(var_name, comp))
235 return *getDefaultValue(var_name);
236
237 validateExecutionerType(var_name, "coupledScalarValueOld");
238 auto var = getScalarVar(var_name, comp);
239 return _sc_is_implicit ? var->slnOld() : var->slnOlder();
240}

◆ coupledScalarValueOlder()

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

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

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

Definition at line 243 of file ScalarCoupleable.C.

245{
246 checkVar(var_name);
247 if (!isCoupledScalar(var_name, comp))
248 return *getDefaultValue(var_name);
249
250 validateExecutionerType(var_name, "coupledScalarValueOlder");
251 auto var = getScalarVar(var_name, comp);
252 if (_sc_is_implicit)
253 return var->slnOlder();
254 else
255 mooseError("Older values not available for explicit schemes");
256}

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

1860{
1861 const auto * var = getVar(var_name, comp);
1862 if (!var)
1863 {
1865 return _default_second;
1866 }
1868
1870 return (_c_is_implicit) ? var->secondSln() : var->secondSlnOlder();
1871 return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOlderNeighbor();
1872}
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...

Referenced by NodeFaceConstraint::coupledSecondarySecond().

◆ coupledSecondOld()

const VariableSecond & Coupleable::coupledSecondOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1875 of file Coupleable.C.

1876{
1877 const auto * var = getVar(var_name, comp);
1878 if (!var)
1879 {
1881 return _default_second;
1882 }
1884
1886 return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
1887 return (_c_is_implicit) ? var->secondSlnOldNeighbor() : var->secondSlnOlderNeighbor();
1888}

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

1892{
1893 const auto * var = getVar(var_name, comp);
1894 if (!var)
1895 {
1897 return _default_second;
1898 }
1900
1902 return var->secondSlnOlder();
1903 return var->secondSlnOlderNeighbor();
1904}

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

1908{
1909 const auto * var = getVar(var_name, comp);
1911 if (!var)
1912 {
1914 return _default_second;
1915 }
1917
1919 return var->secondSlnPreviousNL();
1920 return var->secondSlnPreviousNLNeighbor();
1921}

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

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

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

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

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

◆ coupledValueOld()

const VariableValue & Coupleable::coupledValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1037 of file Coupleable.C.

1038{
1039 const auto * var = getVar(var_name, comp);
1040 if (!var)
1041 return *getDefaultValue(var_name, comp);
1043
1045 {
1046 if (_c_nodal)
1047 return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1048 return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1049 }
1050 else
1051 {
1052 if (_c_nodal)
1053 return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1054 return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1055 }
1056}

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

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

1060{
1061 const auto * var = getVar(var_name, comp);
1062 if (!var)
1063 return *getDefaultValue(var_name, comp);
1065
1067 {
1068 if (_c_nodal)
1069 return var->dofValuesOlder();
1070 return var->slnOlder();
1071 }
1072 else
1073 {
1074 if (_c_nodal)
1075 return var->dofValuesOlderNeighbor();
1076 return var->slnOlderNeighbor();
1077 }
1078}

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

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

1082{
1083 const auto * var = getVar(var_name, comp);
1084 if (!var)
1085 return *getDefaultValue(var_name, comp);
1087
1090 {
1091 if (_c_nodal)
1092 return var->dofValuesPreviousNL();
1093 return var->slnPreviousNL();
1094 }
1095 else
1096 {
1097 if (_c_nodal)
1098 return var->dofValuesPreviousNLNeighbor();
1099 return var->slnPreviousNLNeighbor();
1100 }
1101}

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

2546{
2547 auto func = [this, &var_name](unsigned int comp) { return &coupledValue(var_name, comp); };
2548 return coupledVectorHelper<const VariableValue *>(var_name, func);
2549}

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

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

◆ coupledValuesOlder()

std::vector< const VariableValue * > Coupleable::coupledValuesOlder ( const std::string &  var_name) const
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 2733 of file Coupleable.C.

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

◆ coupledVectorDot()

const VectorVariableValue & Coupleable::coupledVectorDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1290 of file Coupleable.C.

1291{
1292 const auto * var = getVectorVar(var_name, comp);
1293 if (!var)
1294 {
1297 }
1299
1301 return var->uDot();
1302 return var->uDotNeighbor();
1303}
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledVectorDotDot()

const VectorVariableValue & Coupleable::coupledVectorDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1306 of file Coupleable.C.

1307{
1308 const auto * var = getVectorVar(var_name, comp);
1309 if (!var)
1310 {
1313 }
1315
1317 return var->uDotDot();
1318 return var->uDotDotNeighbor();
1319}

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

1371{
1372 const auto * var = getVectorVar(var_name, comp);
1373 if (!var)
1374 {
1376 return _default_value_zero;
1377 }
1379
1381 return var->duDotDotDu();
1382 return var->duDotDotDuNeighbor();
1383}

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

1339{
1340 const auto * var = getVectorVar(var_name, comp);
1341 if (!var)
1342 {
1345 }
1347
1349 return var->uDotDotOld();
1350 return var->uDotDotOldNeighbor();
1351}

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

1355{
1356 const auto * var = getVectorVar(var_name, comp);
1357 if (!var)
1358 {
1360 return _default_value_zero;
1361 }
1363
1365 return var->duDotDu();
1366 return var->duDotDuNeighbor();
1367}

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

1323{
1324 const auto * var = getVectorVar(var_name, comp);
1325 if (!var)
1326 {
1329 }
1331
1333 return var->uDotOld();
1334 return var->uDotOldNeighbor();
1335}

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

1647{
1648 const auto * var = getVectorVar(var_name, comp);
1649 if (!var)
1650 {
1653 }
1655
1657 return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1658 return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1659}
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...

◆ coupledVectorGradientOld()

const VectorVariableGradient & Coupleable::coupledVectorGradientOld ( const std::string &  var_name,
unsigned int  comp = 0 
) const
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 1662 of file Coupleable.C.

1663{
1664 const auto * var = getVectorVar(var_name, comp);
1665 if (!var)
1666 {
1669 }
1671
1673 return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1674 return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1675}

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

1679{
1680 const auto * var = getVectorVar(var_name, comp);
1681 if (!var)
1682 {
1685 }
1687
1689 return var->gradSlnOlder();
1690 return var->gradSlnOlderNeighbor();
1691}

◆ coupledVectorHelper()

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

Definition at line 1722 of file Coupleable.h.

1723 {
1724 const auto components = coupledComponents(var_name);
1725 std::vector<T> vals(components);
1726 for (MooseIndex(components) comp = 0; comp < components; ++comp)
1727 vals[comp] = func(comp);
1728 return vals;
1729 }
unsigned int coupledComponents(const std::string &var_name) const
Number of coupled components.
Definition Coupleable.C:183

◆ coupledVectorNeighborGradient()

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

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}

◆ coupledVectorNeighborGradientOld()

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

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}

◆ coupledVectorNeighborGradientOlder()

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

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}

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

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

◆ coupledVectorTagArrayGradient() [1/2]

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

Definition at line 742 of file Coupleable.C.

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

◆ coupledVectorTagArrayGradient() [2/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 720 of file Coupleable.C.

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

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

◆ coupledVectorTagArrayGradients() [1/2]

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

Definition at line 2665 of file Coupleable.C.

2667{
2668 if (!_c_parameters.isParamValid(tag_name))
2669 mooseError("Tag name parameter '", tag_name, "' is invalid");
2670
2671 TagName tagname = _c_parameters.get<TagName>(tag_name);
2672 if (!_c_fe_problem.vectorTagExists(tagname))
2673 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2674
2675 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2676 return coupledVectorTagArrayGradients(var_names, tag);
2677}
std::vector< const ArrayVariableGradient * > coupledVectorTagArrayGradients(const std::string &var_names, TagID tag) const
Returns gradients for all the coupled variables desired for a given tag.

◆ coupledVectorTagArrayGradients() [2/2]

std::vector< const ArrayVariableGradient * > Coupleable::coupledVectorTagArrayGradients ( const std::string &  var_names,
TagID  tag 
) const
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 2657 of file Coupleable.C.

2658{
2659 auto func = [this, &var_names, &tag](unsigned int index)
2660 { return &coupledVectorTagArrayGradient(var_names, tag, index); };
2661 return coupledVectorHelper<const ArrayVariableGradient *>(var_names, func);
2662}

Referenced by Coupleable::coupledVectorTagArrayGradients().

◆ coupledVectorTagArrayValue() [1/2]

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

Definition at line 674 of file Coupleable.C.

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

◆ coupledVectorTagArrayValue() [2/2]

const ArrayVariableValue & Coupleable::coupledVectorTagArrayValue ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
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 666 of file Coupleable.C.

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

Referenced by Coupleable::coupledVectorTagArrayValues().

◆ coupledVectorTagArrayValues() [1/2]

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

Definition at line 2619 of file Coupleable.C.

2621{
2622 if (!_c_parameters.isParamValid(tag_name))
2623 mooseError("Tag name parameter '", tag_name, "' is invalid");
2624
2625 TagName tagname = _c_parameters.get<TagName>(tag_name);
2626 if (!_c_fe_problem.vectorTagExists(tagname))
2627 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2628
2629 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2630 return coupledVectorTagArrayValues(var_names, tag);
2631}
std::vector< const ArrayVariableValue * > coupledVectorTagArrayValues(const std::string &var_names, TagID tag) const
Returns the values for all the coupled variables desired for a given tag.

◆ coupledVectorTagArrayValues() [2/2]

std::vector< const ArrayVariableValue * > Coupleable::coupledVectorTagArrayValues ( const std::string &  var_names,
TagID  tag 
) const
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 2611 of file Coupleable.C.

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

Referenced by Coupleable::coupledVectorTagArrayValues().

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

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

Referenced by Coupleable::coupledVectorTagDofValues().

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

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

◆ coupledVectorTagDofValues() [1/2]

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

Definition at line 2688 of file Coupleable.C.

2690{
2691 if (!_c_parameters.isParamValid(tag_name))
2692 mooseError("Tag name parameter '", tag_name, "' is invalid");
2693
2694 TagName tagname = _c_parameters.get<TagName>(tag_name);
2695 if (!_c_fe_problem.vectorTagExists(tagname))
2696 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2697
2698 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2699 return coupledVectorTagDofValues(var_names, tag);
2700}
std::vector< const VariableValue * > coupledVectorTagDofValues(const std::string &var_names, TagID tag) const
Returns the dof values for all the coupled variables desired for a given tag.

◆ coupledVectorTagDofValues() [2/2]

std::vector< const VariableValue * > Coupleable::coupledVectorTagDofValues ( const std::string &  var_names,
TagID  tag 
) const
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 2680 of file Coupleable.C.

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

Referenced by Coupleable::coupledVectorTagDofValues().

◆ coupledVectorTagGradient() [1/2]

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

Definition at line 704 of file Coupleable.C.

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

◆ coupledVectorTagGradient() [2/2]

const VariableGradient & Coupleable::coupledVectorTagGradient ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
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 682 of file Coupleable.C.

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

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

◆ coupledVectorTagGradients() [1/2]

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

Definition at line 2642 of file Coupleable.C.

2644{
2645 if (!_c_parameters.isParamValid(tag_name))
2646 mooseError("Tag name parameter '", tag_name, "' is invalid");
2647
2648 TagName tagname = _c_parameters.get<TagName>(tag_name);
2649 if (!_c_fe_problem.vectorTagExists(tagname))
2650 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2651
2652 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2653 return coupledVectorTagGradients(var_names, tag);
2654}
std::vector< const VariableGradient * > coupledVectorTagGradients(const std::string &var_names, TagID tag) const
Returns gradients for all the coupled variables desired for a given tag.

◆ coupledVectorTagGradients() [2/2]

std::vector< const VariableGradient * > Coupleable::coupledVectorTagGradients ( const std::string &  var_names,
TagID  tag 
) const
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 2634 of file Coupleable.C.

2635{
2636 auto func = [this, &var_names, &tag](unsigned int index)
2637 { return &coupledVectorTagGradient(var_names, tag, index); };
2638 return coupledVectorHelper<const VariableGradient *>(var_names, func);
2639}

Referenced by Coupleable::coupledVectorTagGradients().

◆ coupledVectorTagScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 196 of file ScalarCoupleable.C.

199{
200 checkVar(var_name);
201 if (!isCoupledScalar(var_name, comp))
202 return *getDefaultValue(var_name);
203
205 mooseError("Attempting to couple to vector tag scalar with ID ",
206 tag,
207 "in ",
208 _sc_name,
209 ", but a vector tag with that ID does not exist");
210
211 _sc_coupleable_vector_tags.insert(tag);
212
213 return getScalarVar(var_name, comp)->vectorTagSln(tag);
214}
const VariableValue & vectorTagSln(TagID tag) const
std::set< TagID > _sc_coupleable_vector_tags
The scalar coupleable vector tags.

◆ coupledVectorTagValue() [1/2]

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

Definition at line 658 of file Coupleable.C.

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

◆ coupledVectorTagValue() [2/2]

const VariableValue & Coupleable::coupledVectorTagValue ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
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 650 of file Coupleable.C.

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

Referenced by Coupleable::coupledVectorTagValues().

◆ coupledVectorTagValues() [1/2]

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

Definition at line 2596 of file Coupleable.C.

2598{
2599 if (!_c_parameters.isParamValid(tag_name))
2600 mooseError("Tag name parameter '", tag_name, "' is invalid");
2601
2602 TagName tagname = _c_parameters.get<TagName>(tag_name);
2603 if (!_c_fe_problem.vectorTagExists(tagname))
2604 mooseError("Tagged vector with tag name '", tagname, "' does not exist");
2605
2606 TagID tag = _c_fe_problem.getVectorTagID(tagname);
2607 return coupledVectorTagValues(var_names, tag);
2608}
std::vector< const VariableValue * > coupledVectorTagValues(const std::string &var_names, TagID tag) const
Returns the values for all the coupled variables desired for a given tag.

◆ coupledVectorTagValues() [2/2]

std::vector< const VariableValue * > Coupleable::coupledVectorTagValues ( const std::string &  var_names,
TagID  tag 
) const
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 2588 of file Coupleable.C.

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

Referenced by Coupleable::coupledVectorTagValues().

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

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

Referenced by Coupleable::coupledGenericValues(), and Coupleable::coupledGenericVectorValue().

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

1105{
1106 const auto * var = getVectorVar(var_name, comp);
1107 if (!var)
1108 return *getDefaultVectorValue(var_name);
1110
1111 if (_c_nodal)
1112 return (_c_is_implicit) ? var->nodalValueOldArray() : var->nodalValueOlderArray();
1114 return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
1115 return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
1116}

Referenced by Coupleable::coupledVectorValuesOld().

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

1120{
1121 const auto * var = getVectorVar(var_name, comp);
1122 if (!var)
1123 return *getDefaultVectorValue(var_name);
1125
1127 return var->slnOlder();
1128 return var->slnOlderNeighbor();
1129}

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

2553{
2554 auto func = [this, &var_name](unsigned int comp) { return &coupledVectorValue(var_name, comp); };
2555 return coupledVectorHelper<const VectorVariableValue *>(var_name, func);
2556}

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

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

◆ genericZeroGradient() [1/3]

template<bool is_ad>
const GenericVariableGradient< is_ad > & Coupleable::genericZeroGradient ( )
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 2472 of file Coupleable.C.

2474{
2475 return _grad_zero;
2476}
const VariableGradient & _grad_zero
Zero gradient of a variable.

◆ genericZeroGradient() [3/3]

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

Definition at line 2479 of file Coupleable.C.

2481{
2482 return _ad_grad_zero;
2483}

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

2488{
2489 return _second_zero;
2490}
const VariableSecond & _second_zero
Zero second derivative of a variable.

◆ genericZeroSecond() [3/3]

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

Definition at line 2493 of file Coupleable.C.

2495{
2496 return _ad_second_zero;
2497}

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

2460{
2461 return _zero;
2462}
const VariableValue & _zero
Zero value of a variable.

◆ genericZeroValue() [3/3]

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

Definition at line 2465 of file Coupleable.C.

2467{
2468 return _ad_zero;
2469}

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

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

Referenced by Coupleable::adCoupledCurl().

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

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

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

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

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

Referenced by Coupleable::adCoupledSecond().

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

2379{
2380 auto default_value_it = _ad_default_value.find(var_name);
2381 if (default_value_it == _ad_default_value.end())
2382 {
2383 auto value = std::make_unique<ADVariableValue>(_coupleable_max_qps,
2385 default_value_it = _ad_default_value.insert(std::make_pair(var_name, std::move(value))).first;
2386 }
2387
2388 return default_value_it->second.get();
2389}
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADReal > > > _ad_default_value
Will hold the default value for optional coupled variables for automatic differentiation.
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

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

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

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

Referenced by Coupleable::adCoupledVectorGradient().

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

2393{
2394 auto default_value_it = _ad_default_vector_value.find(var_name);
2395 if (default_value_it == _ad_default_vector_value.end())
2396 {
2397 RealVectorValue default_vec;
2398 for (unsigned int i = 0; i < _c_parameters.numberDefaultCoupledValues(var_name); ++i)
2399 default_vec(i) = _c_parameters.defaultCoupledValue(var_name, i);
2400 auto value = std::make_unique<ADVectorVariableValue>(_coupleable_max_qps, default_vec);
2401 default_value_it =
2402 _ad_default_vector_value.insert(std::make_pair(var_name, std::move(value))).first;
2403 }
2404
2405 return default_value_it->second.get();
2406}
std::unordered_map< std::string, std::unique_ptr< MooseArray< ADRealVectorValue > > > _ad_default_vector_value
Will hold the default value for optional vector coupled variables for automatic differentiation.
VectorValue< Real > RealVectorValue
Definition SubProblem.h:34

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

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

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

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

112 {
114 }
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
Vector of array coupled variables.

◆ getCoupledMooseScalarVars()

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

Get the list of coupled scalar variables.

Returns
The list of coupled variables

Definition at line 52 of file ScalarCoupleable.h.

53 {
55 }
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
Vector of coupled variables.

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

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

94 {
96 }
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.

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

76 {
77 return _coupled_vars;
78 }

Referenced by InitialConditionBase::InitialConditionBase().

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

103 {
105 }
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.

◆ getDefaultArrayValue()

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

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

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

Definition at line 428 of file Coupleable.C.

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

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

◆ getDefaultFunctor()

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

◆ getDefaultNodalValue() [1/3]

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

Get nodal default value.

Definition at line 450 of file Coupleable.C.

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

◆ getDefaultNodalValue() [2/3]

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

Definition at line 457 of file Coupleable.C.

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

◆ getDefaultNodalValue() [3/3]

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

Definition at line 465 of file Coupleable.C.

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

◆ getDefaultValue()

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

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

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

Definition at line 366 of file Coupleable.C.

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

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

◆ getDefaultVectorValue()

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

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

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

Definition at line 393 of file Coupleable.C.

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

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

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

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

◆ getFEVariableCoupleableMatrixTags() [1/2]

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

Definition at line 122 of file Coupleable.h.

◆ getFEVariableCoupleableMatrixTags() [2/2]

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

Definition at line 129 of file Coupleable.h.

130 {
132 }

◆ getFEVariableCoupleableVectorTags() [1/2]

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

◆ getFEVariableCoupleableVectorTags() [2/2]

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

Definition at line 124 of file Coupleable.h.

125 {
127 }

◆ getFieldVar() [1/2]

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

Definition at line 301 of file Coupleable.C.

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

◆ getFieldVar() [2/2]

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

◆ getFieldVars()

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

Definition at line 313 of file Coupleable.C.

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

◆ getMooseVariableDependencies()

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

Retrieve the set of MooseVariableFieldBase that this object depends on.

Returns
The MooseVariableFieldBase that MUST be reinited before evaluating this object

Definition at line 45 of file MooseVariableDependencyInterface.h.

46 {
48 }

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

◆ getScalarVar()

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

Extract pointer to a scalar coupled variable.

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

Definition at line 336 of file ScalarCoupleable.C.

337{
338 const auto & var_name = _sc_parameters.checkForRename(var_name_in);
339
340 const auto it = _coupled_scalar_vars.find(var_name);
341 if (it != _coupled_scalar_vars.end())
342 {
343 const auto & entry = it->second;
344 if (comp < entry.size())
345 return entry[comp];
346 else
347 mooseError(_sc_name, ": Trying to get a non-existent component of variable '", var_name, "'");
348 }
349 else
350 mooseError(_sc_name, ": Trying to get a non-existent variable '", var_name, "'");
351}

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

◆ getScalarVariableCoupleableMatrixTags()

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

Definition at line 62 of file ScalarCoupleable.h.

63 {
65 }

◆ getScalarVariableCoupleableVectorTags()

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

Definition at line 57 of file ScalarCoupleable.h.

58 {
60 }

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

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

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

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

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

◆ getVarHelper() [1/2]

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

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

Definition at line 2175 of file Coupleable.h.

2176{
2177 const auto & var_name = _c_parameters.checkForRename(var_name_in);
2178 auto name_to_use = var_name;
2179
2180 // First check for supplied name
2181 if (!checkVar(var_name, comp, 0))
2182 {
2183 // See if there is an associated deprecated name that the user may have used instead
2184 auto it = _new_to_deprecated_coupled_vars.find(var_name);
2185 if (it == _new_to_deprecated_coupled_vars.end())
2186 return nullptr;
2187 else
2188 {
2189 auto deprecated_name = it->second;
2190 if (checkVar(deprecated_name, comp, 0))
2191 name_to_use = deprecated_name;
2192 else
2193 return nullptr;
2194 }
2195 }
2196
2197 auto coupled_vars_it = _coupled_vars.find(name_to_use);
2198
2199 mooseAssert(coupled_vars_it != _coupled_vars.end(),
2200 "Trying to get a coupled var " << name_to_use << " that doesn't exist");
2201 mooseAssert(comp < coupled_vars_it->second.size(),
2202 "Component index outside of coupled variables vector");
2203 auto * const base_var = coupled_vars_it->second[comp];
2204
2205 if (auto coupled_var = dynamic_cast<T *>(base_var))
2206 return coupled_var;
2207 else
2208 {
2209 for (auto & var : _coupled_standard_moose_vars)
2210 if (var->name() == base_var->name())
2211 mooseError("The named variable is a standard variable, try a "
2212 "'coupled[Value/Gradient/Dot/etc]...' function instead");
2213 for (auto & var : _coupled_vector_moose_vars)
2214 if (var->name() == base_var->name())
2215 mooseError("The named variable is a vector variable, try a "
2216 "'coupledVector[Value/Gradient/Dot/etc]...' function instead");
2217 for (auto & var : _coupled_array_moose_vars)
2218 if (var->name() == base_var->name())
2219 mooseError("The named variable is an array variable, try a "
2220 "'coupledArray[Value/Gradient/Dot/etc]...' function instead");
2221 for (auto & var : _coupled_fv_moose_vars)
2222 if (var->name() == base_var->name())
2223 mooseError("The named variable is a finite volume variable, which the coupled[...] routine "
2224 "used does not support. Try using the functor system routines instead.");
2225 mooseError("Variable '",
2226 base_var->name(),
2227 "' is of a different C++ type than you tried to fetch it as.");
2228 }
2229}
bool checkVar(const std::string &var_name, unsigned int comp=0, unsigned int comp_bound=0) const
Check that the right kind of variable is being coupled in.
Definition Coupleable.C:234
const std::unordered_map< std::string, std::string > & _new_to_deprecated_coupled_vars
map from new to deprecated variable names
std::vector< MooseVariableField< Real > * > _coupled_fv_moose_vars
Vector of all finite volume coupled variables.

◆ getVarHelper() [2/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 2233 of file Coupleable.h.

2234{
2235 return const_cast<Coupleable *>(this)->getVarHelper<T>(var_name, comp);
2236}

◆ getVarsHelper()

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

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

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

Definition at line 2240 of file Coupleable.h.

2241{
2242 const auto components = coupledComponents(var_name);
2243 std::vector<const T *> vars(components);
2244 for (const auto i : make_range(components))
2245 vars[i] = getVarHelper<T>(var_name, i);
2246 return vars;
2247}
const T * getVarHelper(const std::string &var_name, unsigned int comp) const
Helper that that be used to retrieve a variable of arbitrary type T.

◆ getVectorVar() [1/2]

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

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

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

◆ getWritableCoupledVariables()

auto & Coupleable::getWritableCoupledVariables ( ) const
inlineinherited

returns a reference to the set of writable coupled variables

Definition at line 137 of file Coupleable.h.

Referenced by Coupleable::hasWritableCoupledVariables().

◆ hasWritableCoupledVariables()

bool Coupleable::hasWritableCoupledVariables ( ) const
inlineinherited

Checks whether the object has any writable coupled variables.

Definition at line 142 of file Coupleable.h.

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

Referenced by FEProblemBase::computeUserObjectsInternal().

◆ isCoupled()

bool Coupleable::isCoupled ( const std::string &  var_name,
unsigned int  i = 0 
) const
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 154 of file Coupleable.C.

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

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

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

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

Referenced by Coupleable::coupledName().

◆ isCoupledScalar()

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

Returns true if a variables has been coupled_as name.

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

Definition at line 85 of file ScalarCoupleable.C.

86{
87 const auto & var_name = _sc_parameters.checkForRename(var_name_in);
88
89 auto it = _coupled_scalar_vars.find(var_name);
90 if (it != _coupled_scalar_vars.end())
91 return (i < it->second.size());
92 else
93 {
94 // Make sure the user originally requested this value in the InputParameter syntax
95 if (!_sc_parameters.hasCoupledVar(var_name))
97 ": The coupled scalar variable \"",
98 var_name,
99 "\" was never added to this object's "
100 "InputParameters, please double-check "
101 "your spelling");
102
103 return false;
104 }
105}

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

◆ kokkosADCoupledDofValue()

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

◆ kokkosADCoupledDofValueOld()

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

◆ kokkosADCoupledDofValueOlder()

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

◆ kokkosADCoupledDofValues()

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

◆ kokkosADCoupledDofValuesOld()

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

◆ kokkosADCoupledDofValuesOlder()

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

◆ kokkosADCoupledDot()

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

◆ kokkosADCoupledDots()

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

◆ kokkosADCoupledGradient()

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

◆ kokkosADCoupledGradientOld()

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

◆ kokkosADCoupledGradientOlder()

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

◆ kokkosADCoupledGradients()

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

◆ kokkosADCoupledGradientsOld()

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

◆ kokkosADCoupledGradientsOlder()

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

◆ kokkosADCoupledNodalDot()

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

◆ kokkosADCoupledNodalDots()

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

◆ kokkosADCoupledNodalValue()

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

◆ kokkosADCoupledNodalValueOld()

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

◆ kokkosADCoupledNodalValueOlder()

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

◆ kokkosADCoupledNodalValues()

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

◆ kokkosADCoupledNodalValuesOld()

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

◆ kokkosADCoupledNodalValuesOlder()

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

◆ kokkosADCoupledValue()

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

◆ kokkosADCoupledValueOld()

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

◆ kokkosADCoupledValueOlder()

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

◆ kokkosADCoupledValues()

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

◆ kokkosADCoupledValuesOld()

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

◆ kokkosADCoupledValuesOlder()

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

◆ kokkosADCoupledVectorTagDofValue()

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

◆ kokkosADCoupledVectorTagDofValueByName()

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

◆ kokkosADCoupledVectorTagDofValues()

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

◆ kokkosADCoupledVectorTagDofValuesByName()

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

◆ kokkosADCoupledVectorTagGradient()

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

◆ kokkosADCoupledVectorTagGradientByName()

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

◆ kokkosADCoupledVectorTagGradients()

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

◆ kokkosADCoupledVectorTagGradientsByName()

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

◆ kokkosADCoupledVectorTagNodalValue()

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

◆ kokkosADCoupledVectorTagNodalValueByName()

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

◆ kokkosADCoupledVectorTagNodalValues()

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

◆ kokkosADCoupledVectorTagNodalValuesByName()

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

◆ kokkosADCoupledVectorTagValue()

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

◆ kokkosADCoupledVectorTagValueByName()

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

◆ kokkosADCoupledVectorTagValues()

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

◆ kokkosADCoupledVectorTagValuesByName()

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

◆ kokkosCoupledDofValue()

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

◆ kokkosCoupledDofValueOld()

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

◆ kokkosCoupledDofValueOlder()

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

◆ kokkosCoupledDofValues()

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

◆ kokkosCoupledDofValuesOld()

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

◆ kokkosCoupledDofValuesOlder()

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

◆ kokkosCoupledDot()

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

◆ kokkosCoupledDotDu()

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

◆ kokkosCoupledDots()

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

◆ kokkosCoupledGradient()

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

◆ kokkosCoupledGradientOld()

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

◆ kokkosCoupledGradientOlder()

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

◆ kokkosCoupledGradients()

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

◆ kokkosCoupledGradientsOld()

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

◆ kokkosCoupledGradientsOlder()

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

◆ kokkosCoupledNodalDot()

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

◆ kokkosCoupledNodalDots()

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

◆ kokkosCoupledNodalValue()

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

◆ kokkosCoupledNodalValueOld()

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

◆ kokkosCoupledNodalValueOlder()

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

◆ kokkosCoupledNodalValues()

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

◆ kokkosCoupledNodalValuesOld()

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

◆ kokkosCoupledNodalValuesOlder()

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

◆ kokkosCoupledValue()

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

◆ kokkosCoupledValueOld()

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

◆ kokkosCoupledValueOlder()

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

◆ kokkosCoupledValues()

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

◆ kokkosCoupledValuesOld()

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

◆ kokkosCoupledValuesOlder()

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

◆ kokkosCoupledVectorDofValue()

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

◆ kokkosCoupledVectorDofValueOld()

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

◆ kokkosCoupledVectorDofValueOlder()

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

◆ kokkosCoupledVectorDofValues()

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

◆ kokkosCoupledVectorDofValuesOld()

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

◆ kokkosCoupledVectorDofValuesOlder()

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

◆ kokkosCoupledVectorDot()

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

◆ kokkosCoupledVectorDots()

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

◆ kokkosCoupledVectorGradient()

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

◆ kokkosCoupledVectorGradientOld()

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

◆ kokkosCoupledVectorGradientOlder()

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

◆ kokkosCoupledVectorGradients()

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

◆ kokkosCoupledVectorGradientsOld()

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

◆ kokkosCoupledVectorGradientsOlder()

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

◆ kokkosCoupledVectorNodalDot()

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

◆ kokkosCoupledVectorNodalDots()

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

◆ kokkosCoupledVectorNodalValue()

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

◆ kokkosCoupledVectorNodalValueOld()

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

◆ kokkosCoupledVectorNodalValueOlder()

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

◆ kokkosCoupledVectorNodalValues()

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

◆ kokkosCoupledVectorNodalValuesOld()

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

◆ kokkosCoupledVectorNodalValuesOlder()

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

◆ kokkosCoupledVectorTagDofValue()

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

◆ kokkosCoupledVectorTagDofValueByName()

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

◆ kokkosCoupledVectorTagDofValues()

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

◆ kokkosCoupledVectorTagDofValuesByName()

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

◆ kokkosCoupledVectorTagGradient()

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

◆ kokkosCoupledVectorTagGradientByName()

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

◆ kokkosCoupledVectorTagGradients()

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

◆ kokkosCoupledVectorTagGradientsByName()

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

◆ kokkosCoupledVectorTagNodalValue()

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

◆ kokkosCoupledVectorTagNodalValueByName()

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

◆ kokkosCoupledVectorTagNodalValues()

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

◆ kokkosCoupledVectorTagNodalValuesByName()

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

◆ kokkosCoupledVectorTagValue()

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

◆ kokkosCoupledVectorTagValueByName()

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

◆ kokkosCoupledVectorTagValues()

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

◆ kokkosCoupledVectorTagValuesByName()

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

◆ kokkosCoupledVectorTagVariable()

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

◆ kokkosCoupledVectorTagVariables()

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

◆ kokkosCoupledVectorTagVectorDofValue()

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

◆ kokkosCoupledVectorTagVectorDofValueByName()

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

◆ kokkosCoupledVectorTagVectorDofValues()

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

◆ kokkosCoupledVectorTagVectorDofValuesByName()

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

◆ kokkosCoupledVectorTagVectorGradient()

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

◆ kokkosCoupledVectorTagVectorGradientByName()

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

◆ kokkosCoupledVectorTagVectorGradients()

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

◆ kokkosCoupledVectorTagVectorGradientsByName()

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

◆ kokkosCoupledVectorTagVectorNodalValue()

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

◆ kokkosCoupledVectorTagVectorNodalValueByName()

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

◆ kokkosCoupledVectorTagVectorNodalValues()

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

◆ kokkosCoupledVectorTagVectorNodalValuesByName()

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

◆ kokkosCoupledVectorTagVectorValue()

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

◆ kokkosCoupledVectorTagVectorValueByName()

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

◆ kokkosCoupledVectorTagVectorValues()

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

◆ kokkosCoupledVectorTagVectorValuesByName()

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

◆ kokkosCoupledVectorTagVectorVariable()

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

◆ kokkosCoupledVectorTagVectorVariables()

Moose::Kokkos::Variable Coupleable::kokkosCoupledVectorTagVectorVariables ( const std::string &  var_name,
const std::string &  tag_name 
) const
privateinherited

◆ kokkosCoupledVectorValue()

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

◆ kokkosCoupledVectorValueOld()

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

◆ kokkosCoupledVectorValueOlder()

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

◆ kokkosCoupledVectorValues()

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

◆ kokkosCoupledVectorValuesOld()

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

◆ kokkosCoupledVectorValuesOlder()

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

◆ kokkosZeroGradient()

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

◆ kokkosZeroNodalValue()

Moose::Kokkos::VariableValue Coupleable::kokkosZeroNodalValue ( ) const
inherited

◆ kokkosZeroValue()

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

◆ kokkosZeroVariable()

Moose::Kokkos::Variable Coupleable::kokkosZeroVariable ( ) const
privateinherited

◆ requestStates()

template<typename T >
void Coupleable::requestStates ( const std::string &  var_name,
const TagName &  tag_name,
const unsigned int  comp 
)
privateinherited

Method that may request additional solution states from the variable's system depending on the value of tag_name.

E.g. if the tag name corresponds to old or older variable solution values, then we must request more states

Definition at line 579 of file Coupleable.C.

582{
583 auto var =
584 const_cast<MooseVariableField<T> *>(getVarHelper<MooseVariableField<T>>(var_name, comp));
585 if (!var)
586 mooseError(var_name, ": invalid variable name for tag coupling");
587
588 auto & var_sys = var->sys();
589 if (tag_name == Moose::OLD_SOLUTION_TAG)
590 var_sys.needSolutionState(1);
591 else if (tag_name == Moose::OLDER_SOLUTION_TAG)
592 var_sys.needSolutionState(2);
593}
Class for stuff related to variables.
const TagName OLDER_SOLUTION_TAG
Definition MooseTypes.C:27
const TagName OLD_SOLUTION_TAG
Definition MooseTypes.C:26

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

2156{
2159 ": Calling \"",
2160 fn_name,
2161 "\" on variable \"",
2162 name,
2163 "\" when using a \"Steady\" executioner is not allowed. This value is available "
2164 "only in transient simulations.");
2165}
virtual bool isTransient() const override

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

◆ validParams()

static InputParameters NeighborCoupleableMooseVariableDependencyIntermediateInterface::validParams ( )
inlinestatic

Definition at line 28 of file NeighborCoupleableMooseVariableDependencyIntermediateInterface.h.

28{ return emptyInputParameters(); }
InputParameters emptyInputParameters()

Referenced by FVInterfaceKernel::validParams().

◆ vectorTagDofValueHelper() [1/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagDofValueHelper ( const std::string &  var_name,
const std::string &  tag_name,
unsigned int  comp = 0 
) const
privateinherited

Generic helper method to get vector tag degree of freedom values based on tag name.

Definition at line 775 of file Coupleable.C.

778{
779 if (!_c_parameters.isParamValid(tag_param_name))
780 mooseError("Tag name parameter '", tag_param_name, "' is invalid");
781
782 const TagName tag_name = MooseUtils::toUpper(_c_parameters.get<TagName>(tag_param_name));
783
784 const bool older_state_tag = _older_state_tags.count(tag_name);
785 if (older_state_tag)
786 // We may need to add solution states and create vector tags
787 const_cast<Coupleable *>(this)->requestStates<T>(var_name, tag_name, comp);
788
789 if (!_c_fe_problem.vectorTagExists(tag_name))
790 mooseError("Tagged vector with tag name '", tag_name, "' does not exist");
791
792 TagID tag = _c_fe_problem.getVectorTagID(tag_name);
793
794 return vectorTagDofValueHelper<T>(var_name, tag, comp);
795}
const std::set< std::string > _older_state_tags
vector tag names for which we need to request older solution states from the system
std::string toUpper(std::string name)
Convert supplied string to upper case.

◆ vectorTagDofValueHelper() [2/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagDofValueHelper ( const std::string &  var_name,
TagID  tag,
unsigned int  comp = 0 
) const
privateinherited

Generic helper method to get vector tag degree of freedom values based on tag ID.

Definition at line 759 of file Coupleable.C.

762{
763 const auto * var = getVarHelper<MooseVariableField<T>>(var_name, comp);
764 if (!var)
765 mooseError(var_name, ": invalid variable name for coupledVectorTagDofValue");
767
768 const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
769
770 return var->vectorTagDofValue(tag);
771}

◆ vectorTagValueHelper() [1/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagValueHelper ( const std::string &  var_names,
const std::string &  tag_name,
unsigned int  index = 0 
) const
privateinherited

Generic helper method to get vector tag values based on tag name.

Definition at line 597 of file Coupleable.C.

600{
601 if (!_c_parameters.isParamValid(tag_param_name))
602 mooseError("Tag name parameter '", tag_param_name, "' is invalid");
603
604 const TagName tag_name = MooseUtils::toUpper(_c_parameters.get<TagName>(tag_param_name));
605
606 const bool older_state_tag = _older_state_tags.count(tag_name);
607 if (older_state_tag)
608 // We may need to add solution states and create vector tags
609 const_cast<Coupleable *>(this)->requestStates<T>(var_names, tag_name, index);
610
611 if (!_c_fe_problem.vectorTagExists(tag_name))
612 mooseError("Tagged vector with tag name '", tag_name, "' does not exist");
613
614 TagID tag = _c_fe_problem.getVectorTagID(tag_name);
615 return vectorTagValueHelper<T>(var_names, tag, index);
616}

◆ vectorTagValueHelper() [2/2]

template<typename T >
const OutputTools< T >::VariableValue & Coupleable::vectorTagValueHelper ( const std::string &  var_names,
TagID  tag,
unsigned int  index = 0 
) const
privateinherited

Generic helper method to get vector tag values based on tag ID.

Definition at line 553 of file Coupleable.C.

556{
557 const auto * const var = getVarHelper<MooseVariableField<T>>(var_names, index);
558 if (!var)
559 mooseError(var_names, ": invalid variable name for coupledVectorTagValue");
561
563 mooseError("Attempting to couple to vector tag with ID ",
564 tag,
565 "in ",
566 _c_name,
567 ", but a vector tag with that ID does not exist");
568
569 const_cast<Coupleable *>(this)->addFEVariableCoupleableVectorTag(tag);
570
571 if (_c_nodal)
572 return var->nodalVectorTagValue(tag);
573 else
574 return var->vectorTagValue(tag);
575}

◆ writableCoupledValue()

VariableValue & Coupleable::writableCoupledValue ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 946 of file Coupleable.C.

947{
948 mooseDeprecated("Coupleable::writableCoupledValue is deprecated, please use "
949 "Coupleable::writableVariable instead. ");
950
951 // check if the variable exists
952 auto * const var = getVar(var_name, comp);
953 if (!var)
955 "Unable to create a writable reference for '", var_name, "', is it a constant expression?");
956
957 // is the requested variable an AuxiliaryVariable?
958 if (!_c_fe_problem.getAuxiliarySystem().hasVariable(var->name()))
960 "'", var->name(), "' must be an auxiliary variable in Coupleable::writableCoupledValue");
961
962 // check that the variable type (elemental/nodal) is compatible with the object type
963 const auto * aux = dynamic_cast<const AuxKernel *>(this);
964
965 if (!aux)
966 mooseError("writableCoupledValue() can only be called from AuxKernels, but '",
967 _obj->name(),
968 "' is not an AuxKernel.");
969
970 if (!aux->isNodal() && var->isNodal())
971 mooseError("The elemental AuxKernel '",
972 _obj->name(),
973 "' cannot obtain a writable reference to the nodal variable '",
974 var->name(),
975 "'.");
976
977 // make sure only one object can access a variable
978 checkWritableVar(var);
979
980 return const_cast<VariableValue &>(coupledValue(var_name, comp));
981}
OutputTools< Real >::VariableValue VariableValue
Definition MooseTypes.h:348
void checkWritableVar(MooseWritableVariable *var)
Checks that the passed in variable is only accessed writable by one object in a given subdomain.
Definition Coupleable.C:984
AuxiliarySystem & getAuxiliarySystem()
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition SystemBase.C:850

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

910{
911 auto * var = getVarHelper<MooseWritableVariable>(var_name, comp);
912
913 const auto * aux = dynamic_cast<const AuxKernel *>(this);
914 const auto * euo = dynamic_cast<const ElementUserObject *>(this);
915 const auto * nuo = dynamic_cast<const NodalUserObject *>(this);
916 const auto * nfc = dynamic_cast<const NodeFaceConstraint *>(this);
917 const auto * nec = dynamic_cast<const NodeElemConstraintBase *>(this);
918 const auto * mat = dynamic_cast<const Material *>(this);
919
920 if (!aux && !euo && !nuo && !nfc && !nec && !mat)
921 mooseError("writableVariable() can only be called from AuxKernels, ElementUserObjects, "
922 "NodalUserObjects, NodeFaceConstraints, NodeElemConstraints or Materials. '",
923 _obj->name(),
924 "' is none of those.");
925
926 if (aux && !aux->isNodal() && var->isNodal())
927 mooseError("The elemental AuxKernel '",
928 _obj->name(),
929 "' cannot obtain a writable reference to the nodal variable '",
930 var->name(),
931 "'.");
932 if (euo && var->isNodal())
933 mooseError("The ElementUserObject '",
934 _obj->name(),
935 "' cannot obtain a writable reference to the nodal variable '",
936 var->name(),
937 "'.");
938
939 // make sure only one object can access a variable
940 checkWritableVar(var);
941
942 return *var;
943}
A user object that runs over all the nodes and does an aggregation step to compute a single value.
A NodeElemConstraintBase is used when you need to create constraints between a secondary node and a p...

Member Data Documentation

◆ _ad_default_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 1495 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 1483 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 1492 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 1460 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 1486 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 1471 of file Coupleable.h.

Referenced by Coupleable::getADDefaultVectorValue().

◆ _ad_grad_zero

const MooseArray<ADRealVectorValue>& Coupleable::_ad_grad_zero
protectedinherited

Definition at line 1504 of file Coupleable.h.

Referenced by Coupleable::adZeroGradient(), and Coupleable::genericZeroGradient().

◆ _ad_second_zero

const MooseArray<ADRealTensorValue>& Coupleable::_ad_second_zero
protectedinherited

Definition at line 1511 of file Coupleable.h.

Referenced by Coupleable::adZeroSecond(), and Coupleable::genericZeroSecond().

◆ _ad_zero

const MooseArray<ADReal>& Coupleable::_ad_zero
protectedinherited

Definition at line 1500 of file Coupleable.h.

Referenced by Coupleable::adZeroValue(), and Coupleable::genericZeroValue().

◆ _c_allow_element_to_nodal_coupling

const bool Coupleable::_c_allow_element_to_nodal_coupling
protectedinherited

Definition at line 1450 of file Coupleable.h.

Referenced by Coupleable::checkVar().

◆ _c_coupled_scalar_vars

std::unordered_map<std::string, std::vector<MooseVariableScalar *> > Coupleable::_c_coupled_scalar_vars
privateinherited

Scalar variables coupled into this object (for error checking)

Definition at line 1824 of file Coupleable.h.

Referenced by Coupleable::checkVar(), and Coupleable::Coupleable().

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

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

◆ _c_name

const std::string& Coupleable::_c_name
protectedinherited

◆ _c_nodal

bool Coupleable::_c_nodal
protectedinherited

◆ _c_parameters

const InputParameters& Coupleable::_c_parameters
protectedinherited

◆ _c_sys

const SystemBase* const Coupleable::_c_sys
protectedinherited

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

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

◆ _coupleable_max_qps

unsigned int Coupleable::_coupleable_max_qps
privateinherited

Maximum qps for any element in this system.

Definition at line 1818 of file Coupleable.h.

Referenced by Coupleable::coupledArrayDotDu(), Coupleable::coupledCurl(), Coupleable::coupledCurlOld(), Coupleable::coupledCurlOlder(), Coupleable::coupledDiv(), Coupleable::coupledDivOld(), Coupleable::coupledDivOlder(), 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::coupledNodalDotDot(), Coupleable::coupledNodalDotDotOld(), Coupleable::coupledNodalDotOld(), Coupleable::coupledSecond(), Coupleable::coupledSecondOld(), Coupleable::coupledSecondOlder(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledVectorDot(), Coupleable::coupledVectorDotDot(), Coupleable::coupledVectorDotDotDu(), Coupleable::coupledVectorDotDotOld(), Coupleable::coupledVectorDotDu(), Coupleable::coupledVectorDotOld(), Coupleable::coupledVectorGradient(), Coupleable::coupledVectorGradientOld(), Coupleable::coupledVectorGradientOlder(), Coupleable::getADDefaultCurl(), Coupleable::getADDefaultGradient(), Coupleable::getADDefaultSecond(), Coupleable::getADDefaultValue(), Coupleable::getADDefaultVectorGradient(), Coupleable::getADDefaultVectorValue(), Coupleable::getDefaultArrayValue(), Coupleable::getDefaultValue(), and Coupleable::getDefaultVectorValue().

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

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

◆ _coupled_moose_scalar_vars

std::vector<MooseVariableScalar *> ScalarCoupleable::_coupled_moose_scalar_vars
privateinherited

Vector of coupled variables.

Definition at line 304 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::getCoupledMooseScalarVars(), and ScalarCoupleable::ScalarCoupleable().

◆ _coupled_moose_vars

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

◆ _coupled_scalar_vars

std::unordered_map<std::string, std::vector<MooseVariableScalar *> > ScalarCoupleable::_coupled_scalar_vars
privateinherited

◆ _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 1432 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 1541 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 1467 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 1538 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 1532 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 1480 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 1489 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 1457 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 1529 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 1526 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 1464 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 1523 of file Coupleable.h.

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

◆ _dof_indices

std::vector<libMesh::dof_id_type> MooseVariableDependencyInterface::_dof_indices
privateinherited

A container for holding dof indices in order to avoid constant memory reallocation.

Definition at line 114 of file MooseVariableDependencyInterface.h.

Referenced by MooseVariableDependencyInterface::checkVariablesHelper().

◆ _dual_default_value

std::unordered_map<std::string, std::unique_ptr<ADVariableValue> > ScalarCoupleable::_dual_default_value
mutableprivateinherited

Will hold the default AD value for optional coupled scalar variables.

Definition at line 301 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::getADDefaultValue().

◆ _fe_coupleable_matrix_tags

std::set<TagID> Coupleable::_fe_coupleable_matrix_tags
privateinherited

◆ _fe_coupleable_vector_tags

std::set<TagID> Coupleable::_fe_coupleable_vector_tags
privateinherited

◆ _grad_phi_zero

const VariablePhiGradient& Coupleable::_grad_phi_zero
protectedinherited

Zero gradient of trial function.

Definition at line 1507 of file Coupleable.h.

◆ _grad_zero

const VariableGradient& Coupleable::_grad_zero
protectedinherited

Zero gradient of a variable.

Definition at line 1503 of file Coupleable.h.

Referenced by Coupleable::genericZeroGradient().

◆ _is_fv

const bool Coupleable::_is_fv
privateinherited

Whether the MooseObject is a finite volume object.

Definition at line 1831 of file Coupleable.h.

Referenced by Coupleable::checkVar().

◆ _kokkos_default_value_zero

const Real Coupleable::_kokkos_default_value_zero = 0
privateinherited

kokkos-related variables and methods

Definition at line 1846 of file Coupleable.h.

◆ _moose_variable_dependencies

std::set<MooseVariableFieldBase *> MooseVariableDependencyInterface::_moose_variable_dependencies
privateinherited

◆ _neighbor_nodal

bool NeighborCoupleable::_neighbor_nodal
protectedinherited

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

Referenced by Coupleable::getVarHelper().

◆ _obj

const MooseObject* const Coupleable::_obj
privateinherited

◆ _older_state_tags

const std::set<std::string> Coupleable::_older_state_tags
privateinherited
Initial value:

vector tag names for which we need to request older solution states from the system

Definition at line 1836 of file Coupleable.h.

Referenced by Coupleable::vectorTagDofValueHelper(), and Coupleable::vectorTagValueHelper().

◆ _optional_var_index

std::unordered_map<std::string, std::vector<unsigned int> > Coupleable::_optional_var_index
privateinherited

Unique indices for optionally coupled vars that weren't provided.

Definition at line 1821 of file Coupleable.h.

Referenced by Coupleable::Coupleable(), and Coupleable::coupled().

◆ _phi_zero

const VariablePhiValue& Coupleable::_phi_zero
protectedinherited

Definition at line 1499 of file Coupleable.h.

◆ _point_zero

const Point& ScalarCoupleable::_point_zero
protectedinherited

◆ _real_zero

const Real& ScalarCoupleable::_real_zero
protectedinherited

Scalar zero.

Definition at line 245 of file ScalarCoupleable.h.

◆ _sc_coupleable_matrix_tags

std::set<TagID> ScalarCoupleable::_sc_coupleable_matrix_tags
mutableprivateinherited

The scalar coupleable matrix tags.

Definition at line 312 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledMatrixTagScalarValue(), and ScalarCoupleable::getScalarVariableCoupleableMatrixTags().

◆ _sc_coupleable_vector_tags

std::set<TagID> ScalarCoupleable::_sc_coupleable_vector_tags
mutableprivateinherited

The scalar coupleable vector tags.

Definition at line 310 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledVectorTagScalarValue(), and ScalarCoupleable::getScalarVariableCoupleableVectorTags().

◆ _sc_coupled_vars

std::unordered_map<std::string, std::vector<MooseVariableFieldBase *> > ScalarCoupleable::_sc_coupled_vars
privateinherited

Field variables coupled into this object (for error checking)

Definition at line 307 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::checkVar(), and ScalarCoupleable::ScalarCoupleable().

◆ _sc_fe_problem

FEProblemBase& ScalarCoupleable::_sc_fe_problem
protectedinherited

◆ _sc_is_implicit

const bool ScalarCoupleable::_sc_is_implicit
privateinherited

◆ _sc_name

const std::string& ScalarCoupleable::_sc_name
privateinherited

◆ _sc_parameters

const InputParameters& ScalarCoupleable::_sc_parameters
privateinherited

◆ _sc_tid

const THREAD_ID ScalarCoupleable::_sc_tid
protectedinherited

Thread ID of the thread using this object.

Definition at line 242 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::ScalarCoupleable().

◆ _scalar_zero

const VariableValue& ScalarCoupleable::_scalar_zero
protectedinherited

Zero value of a scalar variable.

Definition at line 248 of file ScalarCoupleable.h.

◆ _second_phi_zero

const VariablePhiSecond& Coupleable::_second_phi_zero
protectedinherited

Zero second derivative of a test function.

Definition at line 1513 of file Coupleable.h.

◆ _second_zero

const VariableSecond& Coupleable::_second_zero
protectedinherited

Zero second derivative of a variable.

Definition at line 1510 of file Coupleable.h.

Referenced by Coupleable::genericZeroSecond().

◆ _vector_curl_zero

const VectorVariableCurl& Coupleable::_vector_curl_zero
protectedinherited

Zero value of the curl of a vector variable.

Definition at line 1517 of file Coupleable.h.

◆ _vector_zero

const VectorVariableValue& Coupleable::_vector_zero
protectedinherited

Zero value of a vector variable.

Definition at line 1515 of file Coupleable.h.

◆ _writable_coupled_variables

std::vector<std::set<MooseWritableVariable *> > Coupleable::_writable_coupled_variables
privateinherited

keep a set of allocated writable variable references to make sure only one object can obtain them per thread

Definition at line 1840 of file Coupleable.h.

Referenced by Coupleable::checkWritableVar(), and Coupleable::getWritableCoupledVariables().

◆ _zero

const VariableValue& Coupleable::_zero
protectedinherited

Zero value of a variable.

Definition at line 1498 of file Coupleable.h.

Referenced by Coupleable::genericZeroValue().


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