www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
VectorFunctionIC Class Reference

IC that calls vectorValue method of a Function object. More...

#include <VectorFunctionIC.h>

Inheritance diagram for VectorFunctionIC:
[legend]

Public Types

typedef OutputTools< T >::OutputShape ValueType
 
typedef OutputTools< T >::OutputGradient GradientType
 
typedef OutputTools< T >::OutputShapeGradient GradientShapeType
 
typedef OutputTools< T >::OutputData DataType
 
typedef FEGenericBase< ValueTypeFEBaseType
 
enum  TEST_TYPE { ALL, ANY }
 A flag changing the behavior of hasBoundary. More...
 

Public Member Functions

 VectorFunctionIC (const InputParameters &parameters)
 
virtual RealVectorValue value (const Point &p) override
 The value of the variable at a point. More...
 
virtual MooseVariableFEBasevariable () override
 retrieves the MOOSE variable that this initial condition acts upon More...
 
virtual void compute () override
 Workhorse method for projecting the initial conditions for block initial conditions. More...
 
virtual void computeNodal (const Point &p) override
 Workhorse method for projecting the initial conditions for boundary restricted initial conditions. More...
 
virtual GradientType gradient (const Point &)
 The gradient of the variable at a point. More...
 
gradientComponent (GradientType grad, unsigned int i)
 
template<>
RealVectorValue gradientComponent (GradientType grad, unsigned int i)
 
template<>
RealEigenVector gradientComponent (GradientType grad, unsigned int i)
 
void setCZeroVertices ()
 set the temporary solution vector for node projections of C0 variables More...
 
template<>
void setCZeroVertices ()
 
void setHermiteVertices ()
 set the temporary solution vector for node projections of Hermite variables More...
 
template<>
void setHermiteVertices ()
 
void setOtherCOneVertices ()
 set the temporary solution vector for node projections of non-Hermitian C1 variables More...
 
template<>
void setOtherCOneVertices ()
 
Real dotHelper (const RealGradient &op1, const RealGradient &op2)
 Helps perform multiplication of GradientTypes: a normal dot product for vectors and a contraction for tensors. More...
 
Real dotHelper (const RealTensor &op1, const RealTensor &op2)
 
RealEigenVector dotHelper (const RealVectorArrayValue &op1, const RealGradient &op2)
 
void choleskySolve (bool is_volume)
 Perform the cholesky solves for edge, side, and interior projections. More...
 
template<>
void choleskySolve (bool is_volume)
 
void choleskyAssembly (bool is_volume)
 Assemble a small local system for cholesky solve. More...
 
const std::set< std::string > & getDependObjects () const
 getter method for dependent user objects More...
 
virtual void initialSetup ()
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual const std::set< std::string > & getRequestedItems () override
 Return a set containing the names of items requested by the object. More...
 
virtual const std::set< std::string > & getSuppliedItems () override
 Return a set containing the names of items owned by the object. More...
 
template<typename T2 >
const T2 & getUserObjectTempl (const std::string &name)
 reimplements the getUserObject method from UserObjectInterface More...
 
template<typename T >
const T & getUserObjectTempl (const std::string &name)
 
template<typename T2 >
const T2 & getUserObjectByNameTempl (const UserObjectName &name)
 reimplements the getUserObjectByName method from UserObjectInterface More...
 
template<typename T >
const T & getUserObjectByNameTempl (const UserObjectName &name)
 
template<class T >
const T & getUserObjectByNameTempl (const std::string &name)
 Get an user object with a given name. More...
 
const UserObjectgetUserObjectBase (const std::string &name)
 reimplements the getUserObjectBase method from UserObjectInterface More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParamTempl (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
const std::vector< SubdomainName > & blocks () const
 Return the block names for this object. More...
 
unsigned int numBlocks () const
 Return the number of blocks for this object. More...
 
virtual const std::set< SubdomainID > & blockIDs () const
 Return the block subdomain ids for this object. More...
 
bool hasBlocks (const SubdomainName &name) const
 Test if the supplied block name is valid for this object. More...
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 Test if the supplied vector of block names are valid for this object. More...
 
bool hasBlocks (const SubdomainID &id) const
 Test if the supplied block ids are valid for this object. More...
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 Test if the supplied vector block ids are valid for this object. More...
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 Test if the supplied set of block ids are valid for this object. More...
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects. More...
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects. More...
 
template<typename T >
bool hasBlockMaterialProperty (const std::string &prop_name)
 Check if a material property is valid for all blocks of this object. More...
 
const std::set< SubdomainID > & meshBlockIDs () const
 Return all of the SubdomainIDs for the mesh. More...
 
virtual bool blockRestricted () const
 Returns true if this object has been restricted to a boundary. More...
 
void checkVariable (const MooseVariableFEBase &variable) const
 Helper for checking that the ids for this object are in agreement with the variables on the supplied variable. More...
 
const std::unordered_map< std::string, std::vector< MooseVariableFEBase * > > & getCoupledVars ()
 Get the list of coupled variables. More...
 
const std::vector< MooseVariableFEBase * > & getCoupledMooseVars () const
 Get the list of all coupled variables. More...
 
const std::vector< MooseVariable * > & getCoupledStandardMooseVars () const
 Get the list of standard coupled variables. More...
 
const std::vector< VectorMooseVariable * > & getCoupledVectorMooseVars () const
 Get the list of vector coupled variables. More...
 
const std::vector< ArrayMooseVariable * > & getCoupledArratMooseVars () const
 Get the list of array coupled variables. More...
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
template<ComputeStage compute_stage>
ADVariableValue * getADDefaultValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default value for Automatic Differentiation for an uncoupled variable. More...
 
template<>
VariableValuegetADDefaultValue (const std::string &var_name)
 
template<>
VariableValuegetADDefaultValue (const std::string &var_name)
 
template<ComputeStage compute_stage>
ADVectorVariableValue * getADDefaultVectorValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default vector value for Automatic Differentiation for an uncoupled variable. More...
 
template<>
VectorVariableValuegetADDefaultVectorValue (const std::string &var_name)
 
template<>
VectorVariableValuegetADDefaultVectorValue (const std::string &var_name)
 
template<ComputeStage compute_stage>
ADVariableGradient & getADDefaultGradient ()
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled variable. More...
 
template<>
VariableGradientgetADDefaultGradient ()
 
template<>
VariableGradientgetADDefaultGradient ()
 
template<ComputeStage compute_stage>
ADVectorVariableGradient & getADDefaultVectorGradient ()
 Helper method to return (and insert if necessary) the default gradient for Automatic Differentiation for an uncoupled vector variable. More...
 
template<>
VectorVariableGradientgetADDefaultVectorGradient ()
 
template<>
VectorVariableGradientgetADDefaultVectorGradient ()
 
template<ComputeStage compute_stage>
ADVariableSecond & getADDefaultSecond ()
 Helper method to return (and insert if necessary) the default second derivatives for Automatic Differentiation for an uncoupled variable. More...
 
template<>
VariableSecondgetADDefaultSecond ()
 
template<>
VariableSecondgetADDefaultSecond ()
 
const FunctiongetFunction (const std::string &name) const
 Get a function with a given name. More...
 
const FunctiongetFunctionByName (const FunctionName &name) const
 Get a function with a given name. More...
 
const UserObjectgetUserObjectBaseByName (const std::string &name)
 Get an user object with a given name. More...
 
virtual const std::set< BoundaryID > & boundaryIDs () const
 Return the boundary IDs for this object. More...
 
const std::vector< BoundaryName > & boundaryNames () const
 Return the boundary names for this object. More...
 
unsigned int numBoundaryIDs () const
 Return the number of boundaries for this object. More...
 
bool hasBoundary (const BoundaryName &name) const
 Test if the supplied boundary name is valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 Test if the supplied vector of boundary names are valid for this object. More...
 
bool hasBoundary (const BoundaryID &id) const
 Test if the supplied boundary ids are valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 Test if the supplied vector boundary ids are valid for this object. More...
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 Test if the supplied set of boundary ids are valid for this object. More...
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 Test if the class boundary ids are a subset of the supplied objects. More...
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
template<typename T >
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 Check if a material property is valid for all boundaries of this object. More...
 
virtual bool boundaryRestricted () const
 Returns true if this object has been restricted to a boundary. More...
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 Returns the set of all boundary ids for the entire mesh. More...
 

Static Public Member Functions

static bool restricted (const std::set< BoundaryID > &ids)
 Helper for determining if the object is boundary restricted. More...
 
template<typename T >
static void sort (typename std::vector< T > &vector)
 Given a vector, sort using the getRequested/SuppliedItems sets. More...
 
template<typename T >
static void cyclicDependencyError (CyclicDependencyException< T > &e, const std::string &header)
 A helper method for cyclic errors. More...
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 

Protected Member Functions

virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty. More...
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 An initialization routine needed for dual constructors. More...
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 Check if the blocks this object operates on all have the same coordinate system, and if so return it. More...
 
virtual void coupledCallback (const std::string &, bool)
 A call-back function provided by the derived object for actions before coupling a variable with functions such as coupledValue. More...
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled as name. More...
 
unsigned int coupledComponents (const std::string &var_name)
 Number of coupled components. More...
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0)
 Returns the index for a coupled variable by name. More...
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled variable. More...
 
template<ComputeStage compute_stage>
const ADVariableValue & adCoupledValueTemplate (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled variable for use in Automatic Differentiation. More...
 
template<ComputeStage compute_stage>
const ADVectorVariableValue & adCoupledVectorValueTemplate (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled vector variable for use in Automatic Differentiation. More...
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a coupled variable for a given tag. More...
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a coupled variable for a given tag. More...
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled vector variable. More...
 
virtual const ArrayVariableValuecoupledArrayValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled array variable. More...
 
virtual VariableValuewritableCoupledValue (const std::string &var_name, unsigned int comp=0)
 Returns a writable reference to a coupled variable. More...
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old value from previous time step of a coupled variable. More...
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old value from two time steps previous of a coupled variable. More...
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns value of previous Newton iterate of a coupled variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old value from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old value from two time steps previous of a coupled vector variable. More...
 
virtual const ArrayVariableValuecoupledArrayValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old value from previous time step of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old value from two time steps previous of a coupled array variable. More...
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable. More...
 
template<ComputeStage compute_stage>
const ADVariableGradient & adCoupledGradientTemplate (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable for use in Automatic Differentation. More...
 
template<ComputeStage compute_stage>
const ADVectorVariableGradient & adCoupledVectorGradientTemplate (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled vector variable for use in Automatic Differentation. More...
 
template<ComputeStage compute_stage>
const ADVariableSecond & adCoupledSecondTemplate (const std::string &var_name, unsigned int comp=0)
 Returns second derivatives of a coupled variable for use in Automatic Differentation. More...
 
template<ComputeStage compute_stage>
const ADVectorVariableSecond & adCoupledVectorSecondTemplate (const std::string &var_name, unsigned int comp=0)
 Returns second derivatives of a coupled vector variable for use in Automatic Differentation. More...
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from previous time step of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from two time steps previous of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable for previous Newton iterate. More...
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of the gradient of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of the gradient of a coupled variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from two time steps previous of a coupled vector variable. More...
 
virtual const ArrayVariableGradientcoupledArrayGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled array variable. More...
 
virtual const ArrayVariableGradientcoupledArrayGradientOld (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from previous time step of a coupled array variable. More...
 
virtual const ArrayVariableGradientcoupledArrayGradientOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from two time steps previous of a coupled array variable. More...
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0)
 Returns curl of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0)
 Returns an old curl from previous time step of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old curl from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0)
 Returns second derivative of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0)
 Returns an old second derivative from previous time step of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old second derivative from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns second derivative of a coupled variable for the previous Newton iterate. More...
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0)
 Old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0)
 Old second time derivative of a coupled variable. More...
 
template<ComputeStage compute_stage>
const ADVariableValue & adCoupledDotTemplate (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled variable for ad simulations. More...
 
template<ComputeStage compute_stage>
const ADVectorVariableValue & adCoupledVectorDotTemplate (const std::string &var_name, unsigned int comp=0)
 Time derivative of a vector coupled variable for ad simulations. More...
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0)
 Old time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0)
 Old second time derivative of a coupled vector variable. More...
 
virtual const ArrayVariableValuecoupledArrayDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayDotOld (const std::string &var_name, unsigned int comp=0)
 Old time derivative of a coupled array variable. More...
 
virtual const ArrayVariableValuecoupledArrayDotDotOld (const std::string &var_name, unsigned int comp=0)
 Old second time derivative of a coupled array variable. More...
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled variable with respect to the coefficients. More...
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled variable with respect to the coefficients. More...
 
template<typename T >
const T & coupledNodalValue (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable. More...
 
template<typename T , ComputeStage compute_stage>
const Moose::ValueType< T, compute_stage >::typeadCoupledNodalValueTemplate (const std::string &var_name, unsigned int comp=0)
 Returns AD nodal values of a coupled variable. More...
 
template<typename T >
const T & coupledNodalValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from previous time step of a coupled variable. More...
 
template<typename T >
const T & coupledNodalValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from two time steps previous of a coupled variable. More...
 
template<typename T >
const T & coupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable for previous Newton iterate. More...
 
template<typename T >
const T & coupledNodalDot (const std::string &var_name, unsigned int comp=0)
 Nodal values of time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0)
 Nodal values of second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0)
 Nodal values of old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0)
 Nodal values of old second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDofValues (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the current solution vector of a coupled variable for the local element. More...
 
virtual const VariableValuecoupledDofValuesOld (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the old solution vector of a coupled variable for the local element. More...
 
virtual const VariableValuecoupledDofValuesOlder (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the older solution vector of a coupled variable for the local element. More...
 
template<ComputeStage compute_stage>
const ADVariableValue & adZeroValueTemplate ()
 Template method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects. More...
 
template<>
const VariableValueadZeroValueTemplate ()
 
template<>
const VariableValueadZeroValueTemplate ()
 
template<ComputeStage compute_stage>
const ADVariableGradient & adZeroGradientTemplate ()
 Template method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing objects. More...
 
template<>
const VariableGradientadZeroGradientTemplate ()
 
template<>
const VariableGradientadZeroGradientTemplate ()
 
template<ComputeStage compute_stage>
const ADVariableSecond & adZeroSecondTemplate ()
 Retrieve a zero second for automatic differentiation. More...
 
template<>
const VariableSecondadZeroSecondTemplate ()
 
template<>
const VariableSecondadZeroSecondTemplate ()
 
void checkVar (const std::string &var_name)
 Check that the right kind of variable is being coupled in. More...
 
MooseVariableFEBasegetFEVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a base finite element coupled variable. More...
 
template<typename T >
MooseVariableFE< T > * getVarHelper (const std::string &var_name, unsigned int comp)
 Helper that segues off to either getVar of getVectorVar depending on template paramter. More...
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled variable. More...
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled vector variable. More...
 
ArrayMooseVariablegetArrayVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled array variable. More...
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in. More...
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 A helper method to avoid circular #include problems. More...
 
template<typename T >
T & declareRestartableDataTempl (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataTempl (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 

Protected Attributes

const Function_function
 Optional vectorValue function. More...
 
const Function_function_x
 Optional component function value. More...
 
const Function_function_y
 
const Function_function_z
 
FEProblemBase_fe_problem
 
THREAD_ID _tid
 
Assembly_assembly
 
Real & _t
 Time. More...
 
const Moose::CoordinateSystemType_coord_sys
 The coordinate system type for this problem, references the value in Assembly. More...
 
MooseVariableFE< T > & _var
 The variable that this initial condition is acting upon. More...
 
const Elem *const & _current_elem
 The current element we are on will retrieving values at specific points in the domain. More...
 
const Node * _current_node
 The current node if the point we are evaluating at also happens to be a node. More...
 
unsigned int _qp
 The current quadrature point, contains the "nth" node number when visiting nodes. More...
 
DenseMatrix< Real > _Ke
 Matrix storage member. More...
 
DenseVector< DataType_Fe
 Linear b vector. More...
 
DenseVector< DataType_Ue
 Linear solution vector. More...
 
const FEType & _fe_type
 The finite element type for the IC variable. More...
 
FEContinuity _cont
 The type of continuity, e.g. C0, C1. More...
 
std::vector< dof_id_type > _dof_indices
 The global DOF indices. More...
 
std::vector< unsigned int > _side_dofs
 Side/edge DOF indices. More...
 
unsigned int _n_qp
 The number of quadrature points for a given element. More...
 
unsigned int _n_nodes
 The number of nodes for a given element. More...
 
std::vector< char > _dof_is_fixed
 Whether the degree of freedom is fixed (true/false) More...
 
std::vector< int > _free_dof
 Stores the ids of the free dofs. More...
 
dof_id_type _free_dofs
 The number of free dofs. More...
 
dof_id_type _current_dof
 The current dof being operated on. More...
 
dof_id_type _nc
 number of dofs per node per variable More...
 
const std::vector< std::vector< ValueType > > * _phi
 pointers to shape functions More...
 
const std::vector< std::vector< GradientShapeType > > * _dphi
 pointers to shape function gradients More...
 
const std::vector< Real > * _JxW
 pointers to the Jacobian * quadrature weights for current element More...
 
const std::vector< Point > * _xyz_values
 pointers to the xyz coordinates of the quadrature points for the current element More...
 
unsigned int _n
 node counter More...
 
unsigned int _dim
 the mesh dimension More...
 
SystemBase_sys
 The system object. More...
 
std::set< std::string > _depend_vars
 Dependent variables. More...
 
std::set< std::string > _supplied_vars
 Supplied variables. More...
 
std::set< std::string > _depend_uo
 Depend UserObjects. More...
 
const bool _ignore_uo_dependency
 If set, UOs retrieved by this IC will not be executed before this IC. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
std::shared_ptr< MaterialData_blk_material_data
 Pointer to the MaterialData class for this object. More...
 
const InputParameters_c_parameters
 
const std::string & _c_name
 The name of the object this interface is part of. More...
 
FEProblemBase_c_fe_problem
 
std::unordered_map< std::string, std::vector< MooseVariableFEBase * > > _coupled_vars
 Coupled vars whose values we provide. More...
 
std::vector< MooseVariableFEBase * > _coupled_moose_vars
 Vector of all coupled variables. More...
 
std::vector< MooseVariable * > _coupled_standard_moose_vars
 Vector of standard coupled variables. More...
 
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
 Vector of vector coupled variables. More...
 
std::vector< ArrayMooseVariable * > _coupled_array_moose_vars
 Vector of array coupled variables. More...
 
bool _c_nodal
 True if we provide coupling to nodal values. More...
 
bool _c_is_implicit
 True if implicit value is required. More...
 
THREAD_ID _c_tid
 Thread ID of the thread using this object. More...
 
std::unordered_map< std::string, std::vector< std::unique_ptr< VariableValue > > > _default_value
 Will hold the default value for optional coupled variables. More...
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< DualReal > > > _ad_default_value
 Will hold the default value for optional coupled variables for automatic differentiation. More...
 
std::unordered_map< std::string, std::unique_ptr< VectorVariableValue > > _default_vector_value
 Will hold the default value for optional vector coupled variables. More...
 
std::map< std::string, ArrayVariableValue * > _default_array_value
 Will hold the default value for optional array coupled variables. More...
 
std::unordered_map< std::string, std::unique_ptr< MooseArray< DualRealVectorValue > > > _ad_default_vector_value
 Will hold the default value for optional vector coupled variables for automatic differentiation. More...
 
VariableValue _default_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info. More...
 
VariableGradient _default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< DualRealVectorValue_ad_default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< DualRealTensorValue_ad_default_vector_gradient
 This will always be zero because the default values for optionally coupled vector variables is always constant. More...
 
VariableSecond _default_second
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< DualRealTensorValue_ad_default_second
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
const VariableValue_zero
 Zero value of a variable. More...
 
const MooseArray< DualReal > & _ad_zero
 
const VariableGradient_grad_zero
 Zero gradient of a variable. More...
 
const MooseArray< DualRealVectorValue > & _ad_grad_zero
 
const VariableSecond_second_zero
 Zero second derivative of a variable. More...
 
const MooseArray< DualRealTensorValue > & _ad_second_zero
 
const VariablePhiSecond_second_phi_zero
 Zero second derivative of a test function. More...
 
const VectorVariableValue_vector_zero
 Zero value of a vector variable. More...
 
const VectorVariableCurl_vector_curl_zero
 Zero value of the curl of a vector variable. More...
 
VectorVariableValue _default_vector_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info. More...
 
VectorVariableGradient _default_vector_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
VectorVariableCurl _default_vector_curl
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
ArrayVariableValue _default_array_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info. More...
 
ArrayVariableGradient _default_array_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
ArrayVariableCurl _default_array_curl
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
bool _coupleable_neighbor
 Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor values. More...
 

Detailed Description

IC that calls vectorValue method of a Function object.

Definition at line 33 of file VectorFunctionIC.h.

Member Typedef Documentation

◆ DataType

template<typename T >
typedef OutputTools<T>::OutputData InitialConditionTempl< T >::DataType
inherited

Definition at line 45 of file InitialConditionTempl.h.

◆ FEBaseType

template<typename T >
typedef FEGenericBase<ValueType> InitialConditionTempl< T >::FEBaseType
inherited

Definition at line 46 of file InitialConditionTempl.h.

◆ GradientShapeType

template<typename T >
typedef OutputTools<T>::OutputShapeGradient InitialConditionTempl< T >::GradientShapeType
inherited

Definition at line 44 of file InitialConditionTempl.h.

◆ GradientType

template<typename T >
typedef OutputTools<T>::OutputGradient InitialConditionTempl< T >::GradientType
inherited

Definition at line 43 of file InitialConditionTempl.h.

◆ ValueType

template<typename T >
typedef OutputTools<T>::OutputShape InitialConditionTempl< T >::ValueType
inherited

Definition at line 42 of file InitialConditionTempl.h.

Member Enumeration Documentation

◆ TEST_TYPE

A flag changing the behavior of hasBoundary.

Enumerator
ALL 
ANY 

Definition at line 34 of file BoundaryRestrictable.h.

Constructor & Destructor Documentation

◆ VectorFunctionIC()

VectorFunctionIC::VectorFunctionIC ( const InputParameters parameters)

Definition at line 35 of file VectorFunctionIC.C.

37  _function(isParamValid("function") ? &getFunction("function") : nullptr),
38  _function_x(getFunction("function_x")),
39  _function_y(getFunction("function_y")),
40  _function_z(getFunction("function_z"))
41 {
42  if (_function && parameters.isParamSetByUser("function_x"))
43  paramError("function_x", "The 'function' and 'function_x' parameters cannot both be set.");
44  if (_function && parameters.isParamSetByUser("function_y"))
45  paramError("function_y", "The 'function' and 'function_y' parameters cannot both be set.");
46  if (_function && parameters.isParamSetByUser("function_z"))
47  paramError("function_z", "The 'function' and 'function_z' parameters cannot both be set.");
48 }
const Function & _function_z
const Function & getFunction(const std::string &name) const
Get a function with a given name.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:64
InitialConditionTempl< RealVectorValue > VectorInitialCondition
void paramError(const std::string &param, Args... args)
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseObject.h:107
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
const Function & _function_x
Optional component function value.
const Function & _function_y
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:88
const Function * _function
Optional vectorValue function.

Member Function Documentation

◆ adCoupledDotTemplate()

template<ComputeStage compute_stage>
const ADVariableValue & Coupleable::adCoupledDotTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1192 of file Coupleable.h.

1193 {
1194  checkVar(var_name);
1195  if (!isCoupled(var_name)) // Return default 0
1196  return *getADDefaultValue<compute_stage>(var_name);
1197 
1198  MooseVariable * var = getVar(var_name, comp);
1199  if (var == nullptr)
1200  mooseError("Call corresponding vector variable method");
1201 
1202  if (!_coupleable_neighbor)
1203  {
1204  if (_c_nodal)
1205  mooseError("Not implemented");
1206  else
1207  return var->adUDot<compute_stage>();
1208  }
1209  else
1210  {
1211  if (_c_nodal)
1212  mooseError("Not implemented");
1213  else
1214  return var->adUDotNeighbor<compute_stage>();
1215  }
1216 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ adCoupledGradientTemplate()

template<ComputeStage compute_stage>
const ADVariableGradient & Coupleable::adCoupledGradientTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedinherited

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

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

1127 {
1128  if (!isCoupled(var_name)) // Return default 0
1129  return getADDefaultGradient<compute_stage>();
1130 
1131  coupledCallback(var_name, false);
1132  if (_c_nodal)
1133  mooseError("Nodal variables do not have gradients");
1134 
1135  MooseVariable * var = getVar(var_name, comp);
1136 
1137  if (!_coupleable_neighbor)
1138  {
1139  if (_c_is_implicit)
1140  return var->adGradSln<compute_stage>();
1141  else
1142  mooseError("Not implemented");
1143  }
1144  else
1145  {
1146  if (_c_is_implicit)
1147  return var->adGradSlnNeighbor<compute_stage>();
1148  else
1149  mooseError("Not implemented");
1150  }
1151 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const VariableGradientType< OutputType, compute_stage >::type & adGradSlnNeighbor() const
const VariableGradientType< OutputType, compute_stage >::type & adGradSln() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995

◆ adCoupledNodalValueTemplate()

template<typename T , ComputeStage compute_stage>
template const libMesh::VectorValue< DualReal > & Coupleable::adCoupledNodalValueTemplate< RealVectorValue, JACOBIAN > ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1777 of file Coupleable.C.

1778 {
1779  static const typename Moose::ValueType<T, compute_stage>::type zero = 0;
1780  if (!isCoupled(var_name))
1781  return zero;
1782 
1783  if (!_c_nodal)
1784  mooseError("The adCoupledNodalValue method should only be called for nodal computing objects");
1786  mooseError(
1787  "The adCoupledNodalValue method shouldn't be called for neighbor computing objects. I "
1788  "don't even know what that would mean, although maybe someone could explain it to me.");
1789  if (!_c_is_implicit)
1790  mooseError("If you're going to use an explicit scheme, then use coupledNodalValue instead of "
1791  "adCoupledNodalValue");
1792 
1793  coupledCallback(var_name, false);
1794  MooseVariableFE<T> * var = getVarHelper<T>(var_name, comp);
1795 
1796  return var->template adNodalValue<compute_stage>();
1797 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
RealType< compute_stage >::type type
Definition: MooseTypes.h:219
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995

◆ adCoupledSecondTemplate()

template<ComputeStage compute_stage>
const ADVariableSecond & Coupleable::adCoupledSecondTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedinherited

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

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

1156 {
1157  if (!isCoupled(var_name)) // Return default 0
1158  return getADDefaultSecond<compute_stage>();
1159 
1160  coupledCallback(var_name, false);
1161  if (_c_nodal)
1162  mooseError("Nodal variables do not have second derivatives");
1163 
1164  MooseVariable * var = getVar(var_name, comp);
1165 
1166  if (!_coupleable_neighbor)
1167  {
1168  if (_c_is_implicit)
1169  return var->adSecondSln<compute_stage>();
1170  else
1171  mooseError("Not implemented");
1172  }
1173  else
1174  {
1175  if (_c_is_implicit)
1176  return var->adSecondSlnNeighbor<compute_stage>();
1177  else
1178  mooseError("Not implemented");
1179  }
1180 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const VariableSecondType< OutputType, compute_stage >::type & adSecondSln() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const VariableSecondType< OutputType, compute_stage >::type & adSecondSlnNeighbor() const

◆ adCoupledValueTemplate()

template<ComputeStage compute_stage>
const ADVariableValue & Coupleable::adCoupledValueTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 VariableValue for the coupled variable
See also
Kernel::value

Definition at line 1090 of file Coupleable.h.

1091 {
1092  if (!isCoupled(var_name))
1093  return *getADDefaultValue<compute_stage>(var_name);
1094 
1095  coupledCallback(var_name, false);
1096  MooseVariable * var = getVar(var_name, comp);
1097 
1098  if (!_coupleable_neighbor)
1099  {
1100  if (_c_nodal)
1101  mooseError("Not implemented");
1102  else
1103  {
1104  if (_c_is_implicit)
1105  return var->adSln<compute_stage>();
1106  else
1107  mooseError("Not implemented");
1108  }
1109  }
1110  else
1111  {
1112  if (_c_nodal)
1113  mooseError("Not implemented");
1114  else
1115  {
1116  if (_c_is_implicit)
1117  return var->adSlnNeighbor<compute_stage>();
1118  else
1119  mooseError("Not implemented");
1120  }
1121  }
1122 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const VariableValueType< OutputType, compute_stage >::type & adSln() const
AD.
const VariableValueType< OutputType, compute_stage >::type & adSlnNeighbor() const
neighbor AD
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995

◆ adCoupledVectorDotTemplate()

template<ComputeStage compute_stage>
const ADVectorVariableValue & Coupleable::adCoupledVectorDotTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1220 of file Coupleable.h.

1221 {
1222  checkVar(var_name);
1223  if (!isCoupled(var_name)) // Return default 0
1224  return *getADDefaultVectorValue<compute_stage>(var_name);
1225 
1226  VectorMooseVariable * var = getVectorVar(var_name, comp);
1227  if (var == nullptr)
1228  mooseError("Try calling corresponding standard variable method");
1229 
1230  if (!_coupleable_neighbor)
1231  {
1232  if (_c_nodal)
1233  mooseError("Not implemented");
1234  else
1235  return var->adUDot<compute_stage>();
1236  }
1237  else
1238  {
1239  if (_c_nodal)
1240  mooseError("Not implemented");
1241  else
1242  return var->adUDotNeighbor<compute_stage>();
1243  }
1244 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:211
Class for stuff related to variables.
Definition: Adaptivity.h:31
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ adCoupledVectorGradientTemplate()

template<ComputeStage compute_stage>
const ADVectorVariableGradient & Coupleable::adCoupledVectorGradientTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedinherited

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

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

1285 {
1286 
1287  if (!isCoupled(var_name)) // Return default 0
1288  return getADDefaultVectorGradient<compute_stage>();
1289 
1290  coupledCallback(var_name, false);
1291  if (_c_nodal)
1292  mooseError("Nodal variables do not have gradients");
1293 
1294  VectorMooseVariable * var = getVectorVar(var_name, comp);
1295 
1296  if (!_coupleable_neighbor)
1297  {
1298  if (_c_is_implicit)
1299  return var->adGradSln<compute_stage>();
1300  else
1301  mooseError("Not implemented");
1302  }
1303  else
1304  {
1305  if (_c_is_implicit)
1306  return var->adGradSlnNeighbor<compute_stage>();
1307  else
1308  mooseError("Not implemented");
1309  }
1310 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:211
Class for stuff related to variables.
Definition: Adaptivity.h:31
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const VariableGradientType< OutputType, compute_stage >::type & adGradSlnNeighbor() const
const VariableGradientType< OutputType, compute_stage >::type & adGradSln() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995

◆ adCoupledVectorSecondTemplate()

template<ComputeStage compute_stage>
const ADVectorVariableSecond& Coupleable::adCoupledVectorSecondTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedinherited

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

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

◆ adCoupledVectorValueTemplate()

template<ComputeStage compute_stage>
const ADVectorVariableValue & Coupleable::adCoupledVectorValueTemplate ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1248 of file Coupleable.h.

1249 {
1250  if (!isCoupled(var_name))
1251  return *getADDefaultVectorValue<compute_stage>(var_name);
1252 
1253  coupledCallback(var_name, false);
1254  VectorMooseVariable * var = getVectorVar(var_name, comp);
1255 
1256  if (!_coupleable_neighbor)
1257  {
1258  if (_c_nodal)
1259  mooseError("Not implemented");
1260  else
1261  {
1262  if (_c_is_implicit)
1263  return var->adSln<compute_stage>();
1264  else
1265  mooseError("Not implemented");
1266  }
1267  }
1268  else
1269  {
1270  if (_c_nodal)
1271  mooseError("Not implemented");
1272  else
1273  {
1274  if (_c_is_implicit)
1275  return var->adSlnNeighbor<compute_stage>();
1276  else
1277  mooseError("Not implemented");
1278  }
1279  }
1280 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:211
Class for stuff related to variables.
Definition: Adaptivity.h:31
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const VariableValueType< OutputType, compute_stage >::type & adSln() const
AD.
const VariableValueType< OutputType, compute_stage >::type & adSlnNeighbor() const
neighbor AD
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 119 of file Coupleable.h.

Referenced by Coupleable::coupledMatrixTagValue().

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

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

Definition at line 117 of file Coupleable.h.

Referenced by Coupleable::coupledVectorTagValue().

117 { _fe_coupleable_vector_tags.insert(tag); }
std::set< TagID > _fe_coupleable_vector_tags
Definition: Coupleable.h:1083

◆ adZeroGradientTemplate() [1/3]

template<ComputeStage compute_stage>
const ADVariableGradient & Coupleable::adZeroGradientTemplate ( )
protectedinherited

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

Definition at line 1390 of file Coupleable.h.

1391 {
1392  return _ad_grad_zero;
1393 }
const MooseArray< DualRealVectorValue > & _ad_grad_zero
Definition: Coupleable.h:905

◆ adZeroGradientTemplate() [2/3]

template<>
const VariableGradient& Coupleable::adZeroGradientTemplate ( )
protectedinherited

◆ adZeroGradientTemplate() [3/3]

template<>
const VariableGradient& Coupleable::adZeroGradientTemplate ( )
protectedinherited

Definition at line 1763 of file Coupleable.C.

1764 {
1765  return _grad_zero;
1766 }
const VariableGradient & _grad_zero
Zero gradient of a variable.
Definition: Coupleable.h:904

◆ adZeroSecondTemplate() [1/3]

template<ComputeStage compute_stage>
const ADVariableSecond & Coupleable::adZeroSecondTemplate ( )
protectedinherited

Retrieve a zero second for automatic differentiation.

Definition at line 1397 of file Coupleable.h.

1398 {
1399  return _ad_second_zero;
1400 }
const MooseArray< DualRealTensorValue > & _ad_second_zero
Definition: Coupleable.h:909

◆ adZeroSecondTemplate() [2/3]

template<>
const VariableSecond& Coupleable::adZeroSecondTemplate ( )
protectedinherited

◆ adZeroSecondTemplate() [3/3]

template<>
const VariableSecond& Coupleable::adZeroSecondTemplate ( )
protectedinherited

Definition at line 1770 of file Coupleable.C.

1771 {
1772  return _second_zero;
1773 }
const VariableSecond & _second_zero
Zero second derivative of a variable.
Definition: Coupleable.h:908

◆ adZeroValueTemplate() [1/3]

template<ComputeStage compute_stage>
const ADVariableValue & Coupleable::adZeroValueTemplate ( )
protectedinherited

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

Definition at line 1383 of file Coupleable.h.

1384 {
1385  return _ad_zero;
1386 }
const MooseArray< DualReal > & _ad_zero
Definition: Coupleable.h:901

◆ adZeroValueTemplate() [2/3]

template<>
const VariableValue& Coupleable::adZeroValueTemplate ( )
protectedinherited

◆ adZeroValueTemplate() [3/3]

template<>
const VariableValue& Coupleable::adZeroValueTemplate ( )
protectedinherited

Definition at line 1756 of file Coupleable.C.

1757 {
1758  return _zero;
1759 }
const VariableValue & _zero
Zero value of a variable.
Definition: Coupleable.h:900

◆ blockIDs()

const std::set< SubdomainID > & BlockRestrictable::blockIDs ( ) const
virtualinherited

Return the block subdomain ids for this object.

Returns
a set of SudomainIDs that are valid for this object

Definition at line 171 of file BlockRestrictable.C.

Referenced by BlockRestrictable::getBlockCoordSystem(), Material::getZeroMaterialProperty(), BlockRestrictable::hasBlockMaterialPropertyHelper(), and Material::registerPropName().

172 {
173  return _blk_ids;
174 }
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error reporting)

◆ blockRestricted()

bool BlockRestrictable::blockRestricted ( ) const
virtualinherited

Returns true if this object has been restricted to a boundary.

See also
MooseObject

Definition at line 159 of file BlockRestrictable.C.

Referenced by MooseObjectWarehouseBase< Indicator >::addObject(), BlockRestrictable::checkVariable(), BlockRestrictable::getBlockCoordSystem(), and BlockRestrictable::hasBlockMaterialPropertyHelper().

160 {
161  return _blk_ids.find(Moose::ANY_BLOCK_ID) == _blk_ids.end();
162 }
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:15
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error reporting)

◆ blocks()

const std::vector< SubdomainName > & BlockRestrictable::blocks ( ) const
inherited

Return the block names for this object.

Note, if the 'blocks' input parameter was not utilized this will return an empty vector.

Returns
vector of SubdomainNames that are valid for this object

Definition at line 165 of file BlockRestrictable.C.

Referenced by MaterialOutputAction::getParams().

166 {
167  return _blocks;
168 }
std::vector< SubdomainName > _blocks
Vector the block names supplied by the user via the input file.

◆ boundaryIDs()

const std::set< BoundaryID > & BoundaryRestrictable::boundaryIDs ( ) const
virtualinherited

Return the boundary IDs for this object.

Returns
A set of all boundary ids for which the object is restricted

Definition at line 168 of file BoundaryRestrictable.C.

Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addInterfaceKernel(), Material::getZeroMaterialProperty(), BoundaryRestrictable::hasBoundaryMaterialPropertyHelper(), InterfaceQpValueUserObject::initialize(), and Material::registerPropName().

169 {
170  return _bnd_ids;
171 }
std::set< BoundaryID > _bnd_ids
Set of the boundary ids.

◆ boundaryNames()

const std::vector< BoundaryName > & BoundaryRestrictable::boundaryNames ( ) const
inherited

Return the boundary names for this object.

Returns
A set of all boundary names for which the object is restricted

Definition at line 174 of file BoundaryRestrictable.C.

Referenced by MaterialOutputAction::getParams(), NearestNodeDistanceAux::NearestNodeDistanceAux(), and NearestNodeValueAux::NearestNodeValueAux().

175 {
176  return _boundary_names;
177 }
std::vector< BoundaryName > _boundary_names
Vector the the boundary names.

◆ boundaryRestricted()

bool BoundaryRestrictable::boundaryRestricted ( ) const
virtualinherited

Returns true if this object has been restricted to a boundary.

See also
MooseObject

Definition at line 186 of file BoundaryRestrictable.C.

Referenced by MaterialOutputAction::getParams(), and DerivativeMaterialInterface< Material >::haveMaterialProperty().

187 {
189 }
static bool restricted(const std::set< BoundaryID > &ids)
Helper for determining if the object is boundary restricted.
std::set< BoundaryID > _bnd_ids
Set of the boundary ids.

◆ checkVar()

void Coupleable::checkVar ( const std::string &  var_name)
protectedinherited

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

Parameters
var_nameThe name of the coupled variable

Definition at line 141 of file Coupleable.C.

Referenced by Coupleable::adCoupledDotTemplate(), Coupleable::adCoupledVectorDotTemplate(), Coupleable::coupled(), Coupleable::coupledArrayDot(), Coupleable::coupledArrayDotDot(), Coupleable::coupledArrayDotDotOld(), Coupleable::coupledArrayDotOld(), Coupleable::coupledArrayGradient(), Coupleable::coupledArrayGradientOld(), Coupleable::coupledArrayGradientOlder(), 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::coupledValueOld(), Coupleable::coupledValueOlder(), Coupleable::coupledValuePreviousNL(), Coupleable::coupledVectorDot(), Coupleable::coupledVectorDotDot(), Coupleable::coupledVectorDotDotOld(), Coupleable::coupledVectorDotOld(), Coupleable::coupledVectorGradient(), Coupleable::coupledVectorGradientOld(), Coupleable::coupledVectorGradientOlder(), and Coupleable::coupledVectorTagValue().

142 {
143  auto it = _c_coupled_scalar_vars.find(var_name);
144  if (it != _c_coupled_scalar_vars.end())
145  {
146  std::string cvars;
147  for (auto jt : it->second)
148  cvars += " " + jt->name();
150  ": Trying to couple a scalar variable where field variable is expected, '",
151  var_name,
152  " =",
153  cvars,
154  "'");
155  }
156  // NOTE: non-existent variables are handled in the constructor
157 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
Scalar variables coupled into this object (for error checking)
Definition: Coupleable.h:1081
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833

◆ checkVariable()

void BlockRestrictable::checkVariable ( const MooseVariableFEBase variable) const
inherited

Helper for checking that the ids for this object are in agreement with the variables on the supplied variable.

Parameters
variableThe variable to check against.

Definition at line 311 of file BlockRestrictable.C.

312 {
313  if (!isBlockSubset(variable.activeSubdomains()))
314  {
315  std::string var_ids = Moose::stringify(variable.activeSubdomains(), ", ");
316  std::string obj_ids = Moose::stringify(blockRestricted() ? _blk_ids : meshBlockIDs(), ", ");
317  mooseError("The 'block' parameter of the object '",
318  _blk_name,
319  "' must be a subset of the 'block' parameter of the variable '",
320  variable.name(),
321  "':\n Object '",
322  _blk_name,
323  "': ",
324  obj_ids,
325  "\n Variable '",
326  variable.name(),
327  "': ",
328  var_ids);
329  }
330 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual bool blockRestricted() const
Returns true if this object has been restricted to a boundary.
virtual const std::set< SubdomainID > & activeSubdomains() const =0
The subdomains the variable is active on.
bool isBlockSubset(const std::set< SubdomainID > &ids) const
Test if the class block ids are a subset of the supplied objects.
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:60
const std::string & name() const
Get the variable name.
const std::set< SubdomainID > & meshBlockIDs() const
Return all of the SubdomainIDs for the mesh.
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error reporting)
const std::string & _blk_name
Name of the object.

◆ choleskyAssembly()

template<typename T >
void InitialConditionTempl< T >::choleskyAssembly ( bool  is_volume)
inherited

Assemble a small local system for cholesky solve.

Definition at line 414 of file InitialConditionTempl.C.

415 {
416  // Loop over the quadrature points
417  for (_qp = 0; _qp < _n_qp; _qp++)
418  {
419  // solution at the quadrature point
420  auto fineval = value((*_xyz_values)[_qp]);
421  // solution grad at the quadrature point
422  GradientType finegrad;
423  if (_cont == C_ONE)
424  finegrad = gradient((*_xyz_values)[_qp]);
425 
426  auto dofs_size = is_volume ? _dof_indices.size() : _side_dofs.size();
427 
428  // Form edge projection matrix
429  for (decltype(dofs_size) geomi = 0, freei = 0; geomi != dofs_size; ++geomi)
430  {
431  auto i = is_volume ? geomi : _side_dofs[geomi];
432 
433  // fixed DoFs aren't test functions
434  if (_dof_is_fixed[i])
435  continue;
436  for (decltype(dofs_size) geomj = 0, freej = 0; geomj != dofs_size; ++geomj)
437  {
438  auto j = is_volume ? geomj : _side_dofs[geomj];
439  if (_dof_is_fixed[j])
440  _Fe(freei) -= (*_phi)[i][_qp] * (*_phi)[j][_qp] * (*_JxW)[_qp] * _Ue(j);
441  else
442  _Ke(freei, freej) += (*_phi)[i][_qp] * (*_phi)[j][_qp] * (*_JxW)[_qp];
443  if (_cont == C_ONE)
444  {
445  if (_dof_is_fixed[j])
446  _Fe(freei) -= dotHelper((*_dphi)[i][_qp], (*_dphi)[j][_qp]) * (*_JxW)[_qp] * _Ue(j);
447  else
448  _Ke(freei, freej) += dotHelper((*_dphi)[i][_qp], (*_dphi)[j][_qp]) * (*_JxW)[_qp];
449  }
450  if (!_dof_is_fixed[j])
451  freej++;
452  }
453  _Fe(freei) += (*_phi)[i][_qp] * fineval * (*_JxW)[_qp];
454  if (_cont == C_ONE)
455  _Fe(freei) += dotHelper(finegrad, (*_dphi)[i][_qp]) * (*_JxW)[_qp];
456  freei++;
457  }
458  }
459 }
DenseVector< DataType > _Fe
Linear b vector.
std::vector< unsigned int > _side_dofs
Side/edge DOF indices.
OutputTools< T >::OutputGradient GradientType
DenseMatrix< Real > _Ke
Matrix storage member.
std::vector< char > _dof_is_fixed
Whether the degree of freedom is fixed (true/false)
unsigned int _qp
The current quadrature point, contains the "nth" node number when visiting nodes. ...
unsigned int _n_qp
The number of quadrature points for a given element.
const std::vector< Point > * _xyz_values
pointers to the xyz coordinates of the quadrature points for the current element
const std::vector< std::vector< GradientShapeType > > * _dphi
pointers to shape function gradients
Real dotHelper(const RealGradient &op1, const RealGradient &op2)
Helps perform multiplication of GradientTypes: a normal dot product for vectors and a contraction for...
virtual T value(const Point &p)=0
The value of the variable at a point.
FEContinuity _cont
The type of continuity, e.g. C0, C1.
DenseVector< DataType > _Ue
Linear solution vector.
std::vector< dof_id_type > _dof_indices
The global DOF indices.
virtual GradientType gradient(const Point &)
The gradient of the variable at a point.

◆ choleskySolve() [1/2]

template<typename T >
void InitialConditionTempl< T >::choleskySolve ( bool  is_volume)
inherited

Perform the cholesky solves for edge, side, and interior projections.

Definition at line 463 of file InitialConditionTempl.C.

464 {
465  _Ke.resize(_free_dofs, _free_dofs);
466  _Ke.zero();
467  _Fe.resize(_free_dofs);
468  _Fe.zero();
469 
470  choleskyAssembly(is_volume);
471 
472  // The new edge coefficients
473  DenseVector<DataType> U(_free_dofs);
474 
475  _Ke.cholesky_solve(_Fe, U);
476 
477  // Transfer new edge solutions to element
478  for (unsigned int i = 0; i != _free_dofs; ++i)
479  {
480  auto the_dof = is_volume ? _free_dof[i] : _side_dofs[_free_dof[i]];
481  DataType & ui = _Ue(the_dof);
482  libmesh_assert(std::abs(ui) < TOLERANCE || std::abs(ui - U(i)) < TOLERANCE);
483  ui = U(i);
484  _dof_is_fixed[the_dof] = true;
485  }
486 }
DenseVector< DataType > _Fe
Linear b vector.
OutputTools< T >::OutputData DataType
std::vector< unsigned int > _side_dofs
Side/edge DOF indices.
MetaPhysicL::DualNumber< T, D > abs(const MetaPhysicL::DualNumber< T, D > &in)
DenseMatrix< Real > _Ke
Matrix storage member.
void choleskyAssembly(bool is_volume)
Assemble a small local system for cholesky solve.
std::vector< char > _dof_is_fixed
Whether the degree of freedom is fixed (true/false)
std::vector< int > _free_dof
Stores the ids of the free dofs.
dof_id_type _free_dofs
The number of free dofs.
DenseVector< DataType > _Ue
Linear solution vector.

◆ choleskySolve() [2/2]

template<>
void InitialConditionTempl< RealEigenVector >::choleskySolve ( bool  is_volume)
inherited

Definition at line 490 of file InitialConditionTempl.C.

491 {
492  _Ke.resize(_free_dofs, _free_dofs);
493  _Ke.zero();
494  _Fe.resize(_free_dofs);
495  for (unsigned int i = 0; i < _free_dofs; ++i)
496  _Fe(i).setZero(_var.count());
497 
498  choleskyAssembly(is_volume);
499 
500  // The new edge coefficients
501  DenseVector<DataType> U = _Fe;
502 
503  for (unsigned int i = 0; i < _var.count(); ++i)
504  {
505  DenseVector<Real> v(_free_dofs), x(_free_dofs);
506  for (unsigned int j = 0; j < _free_dofs; ++j)
507  v(j) = _Fe(j)(i);
508 
509  _Ke.cholesky_solve(v, x);
510 
511  for (unsigned int j = 0; j < _free_dofs; ++j)
512  U(j)(i) = x(j);
513  }
514 
515  // Transfer new edge solutions to element
516  for (unsigned int i = 0; i != _free_dofs; ++i)
517  {
518  auto the_dof = is_volume ? _free_dof[i] : _side_dofs[_free_dof[i]];
519  DataType & ui = _Ue(the_dof);
520  libmesh_assert(ui.matrix().norm() < TOLERANCE || (ui - U(i)).matrix().norm() < TOLERANCE);
521  ui = U(i);
522  _dof_is_fixed[the_dof] = true;
523  }
524 }
DenseVector< DataType > _Fe
Linear b vector.
OutputTools< T >::OutputData DataType
std::vector< unsigned int > _side_dofs
Side/edge DOF indices.
MooseVariableFE< T > & _var
The variable that this initial condition is acting upon.
DenseMatrix< Real > _Ke
Matrix storage member.
void choleskyAssembly(bool is_volume)
Assemble a small local system for cholesky solve.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
std::vector< char > _dof_is_fixed
Whether the degree of freedom is fixed (true/false)
std::vector< int > _free_dof
Stores the ids of the free dofs.
static PetscErrorCode Vec x
dof_id_type _free_dofs
The number of free dofs.
DenseVector< DataType > _Ue
Linear solution vector.

◆ compute()

template<typename T >
void InitialConditionTempl< T >::compute ( )
overridevirtualinherited

Workhorse method for projecting the initial conditions for block initial conditions.

Implements InitialConditionBase.

Definition at line 62 of file InitialConditionTempl.C.

63 {
64  // -- NOTE ----
65  // The following code is a copy from libMesh project_vector.C plus it adds some features, so we
66  // can couple variable values
67  // and we also do not call any callbacks, but we use our initial condition system directly.
68  // ------------
69 
70  // The dimension of the current element
71  _dim = _current_elem->dim();
72  // The element type
73  const ElemType elem_type = _current_elem->type();
74  // The number of nodes on the new element
75  const unsigned int n_nodes = _current_elem->n_nodes();
76 
77  // Get FE objects of the appropriate type
78  // We cannot use the FE object in Assembly, since the following code is messing with the
79  // quadrature rules
80  // for projections and would screw it up. However, if we implement projections from one mesh to
81  // another,
82  // this code should use that implementation.
83  std::unique_ptr<FEBaseType> fe(FEBaseType::build(_dim, _fe_type));
84 
85  // Prepare variables for projection
86  std::unique_ptr<QBase> qrule(_fe_type.default_quadrature_rule(_dim));
87  std::unique_ptr<QBase> qedgerule(_fe_type.default_quadrature_rule(1));
88  std::unique_ptr<QBase> qsiderule(_fe_type.default_quadrature_rule(_dim - 1));
89 
90  // The values of the shape functions at the quadrature points
91  _phi = &fe->get_phi();
92 
93  // The gradients of the shape functions at the quadrature points on the child element.
94  _dphi = nullptr;
95 
96  _cont = fe->get_continuity();
97 
98  if (_cont == C_ONE)
99  {
100  const std::vector<std::vector<GradientShapeType>> & ref_dphi = fe->get_dphi();
101  _dphi = &ref_dphi;
102  }
103 
104  // The Jacobian * quadrature weight at the quadrature points
105  _JxW = &fe->get_JxW();
106  // The XYZ locations of the quadrature points
107  _xyz_values = &fe->get_xyz();
108 
109  // Update the DOF indices for this element based on the current mesh
110  _var.prepareIC();
112 
113  // The number of DOFs on the element
114  const unsigned int n_dofs = _dof_indices.size();
115  if (n_dofs == 0)
116  return;
117 
118  // Fixed vs. free DoFs on edge/face projections
119  _dof_is_fixed.clear();
120  _dof_is_fixed.resize(n_dofs, false);
121  _free_dof.clear();
122  _free_dof.resize(n_dofs, 0);
123 
124  // Zero the interpolated values
125  _Ue.resize(n_dofs);
126  _Ue.zero();
127 
128  // In general, we need a series of
129  // projections to ensure a unique and continuous
130  // solution. We start by interpolating nodes, then
131  // hold those fixed and project edges, then
132  // hold those fixed and project faces, then
133  // hold those fixed and project interiors
134 
135  // Interpolate node values first
136  _current_dof = 0;
137  for (_n = 0; _n != n_nodes; ++_n)
138  {
139  // FIXME: this should go through the DofMap,
140  // not duplicate _dof_indices code badly!
141  _nc = FEInterface::n_dofs_at_node(_dim, _fe_type, elem_type, _n);
142  if (!_current_elem->is_vertex(_n))
143  {
144  _current_dof += _nc;
145  continue;
146  }
147  if (_cont == DISCONTINUOUS)
148  libmesh_assert(_nc == 0);
149  else if (_cont == C_ZERO)
151  else if (_fe_type.family == HERMITE)
153  else if (_cont == C_ONE)
155  else
156  libmesh_error();
157  } // loop over nodes
158 
159  // From here on out we won't be sampling at nodes anymore
160  _current_node = nullptr;
161 
162  // In 3D, project any edge values next
163  if (_dim > 2 && _cont != DISCONTINUOUS)
164  for (unsigned int e = 0; e != _current_elem->n_edges(); ++e)
165  {
166  FEInterface::dofs_on_edge(_current_elem, _dim, _fe_type, e, _side_dofs);
167 
168  // Some edge dofs are on nodes and already
169  // fixed, others are free to calculate
170  _free_dofs = 0;
171  for (unsigned int i = 0; i != _side_dofs.size(); ++i)
172  if (!_dof_is_fixed[_side_dofs[i]])
173  _free_dof[_free_dofs++] = i;
174 
175  // There may be nothing to project
176  if (!_free_dofs)
177  continue;
178 
179  // Initialize FE data on the edge
180  fe->attach_quadrature_rule(qedgerule.get());
181  fe->edge_reinit(_current_elem, e);
182  _n_qp = qedgerule->n_points();
183 
184  choleskySolve(false);
185  }
186 
187  // Project any side values (edges in 2D, faces in 3D)
188  if (_dim > 1 && _cont != DISCONTINUOUS)
189  for (unsigned int s = 0; s != _current_elem->n_sides(); ++s)
190  {
191  FEInterface::dofs_on_side(_current_elem, _dim, _fe_type, s, _side_dofs);
192 
193  // Some side dofs are on nodes/edges and already
194  // fixed, others are free to calculate
195  _free_dofs = 0;
196  for (unsigned int i = 0; i != _side_dofs.size(); ++i)
197  if (!_dof_is_fixed[_side_dofs[i]])
198  _free_dof[_free_dofs++] = i;
199 
200  // There may be nothing to project
201  if (!_free_dofs)
202  continue;
203 
204  // Initialize FE data on the side
205  fe->attach_quadrature_rule(qsiderule.get());
206  fe->reinit(_current_elem, s);
207  _n_qp = qsiderule->n_points();
208 
209  choleskySolve(false);
210  }
211 
212  // Project the interior values, finally
213 
214  // Some interior dofs are on nodes/edges/sides and
215  // already fixed, others are free to calculate
216  _free_dofs = 0;
217  for (unsigned int i = 0; i != n_dofs; ++i)
218  if (!_dof_is_fixed[i])
219  _free_dof[_free_dofs++] = i;
220 
221  // There may be nothing to project
222  if (_free_dofs)
223  {
224  // Initialize FE data
225  fe->attach_quadrature_rule(qrule.get());
226  fe->reinit(_current_elem);
227  _n_qp = qrule->n_points();
228 
229  choleskySolve(true);
230  } // if there are free interior dofs
231 
232  // Make sure every DoF got reached!
233  for (unsigned int i = 0; i != n_dofs; ++i)
234  libmesh_assert(_dof_is_fixed[i]);
235 
236  NumericVector<Number> & solution = _var.sys().solution();
237 
238  // Lock the new_vector since it is shared among threads.
239  {
240  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
241 
243  _var.insert(solution);
244  }
245 }
std::vector< unsigned int > _side_dofs
Side/edge DOF indices.
MooseVariableFE< T > & _var
The variable that this initial condition is acting upon.
const std::vector< std::vector< ValueType > > * _phi
pointers to shape functions
void setDofValues(const DenseVector< OutputData > &value)
Set local DOF values and evaluate the values on quadrature points.
void setOtherCOneVertices()
set the temporary solution vector for node projections of non-Hermitian C1 variables ...
std::vector< char > _dof_is_fixed
Whether the degree of freedom is fixed (true/false)
std::vector< int > _free_dof
Stores the ids of the free dofs.
const std::vector< Real > * _JxW
pointers to the Jacobian * quadrature weights for current element
const FEType & _fe_type
The finite element type for the IC variable.
virtual void prepareIC() override
Prepare the initial condition.
unsigned int _n_qp
The number of quadrature points for a given element.
const std::vector< Point > * _xyz_values
pointers to the xyz coordinates of the quadrature points for the current element
const Node * _current_node
The current node if the point we are evaluating at also happens to be a node.
const std::vector< std::vector< GradientShapeType > > * _dphi
pointers to shape function gradients
const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.
void setCZeroVertices()
set the temporary solution vector for node projections of C0 variables
void insert(NumericVector< Number > &residual) override
Set the current local DOF values to the input vector.
unsigned int _n
node counter
void setHermiteVertices()
set the temporary solution vector for node projections of Hermite variables
unsigned int _dim
the mesh dimension
dof_id_type _current_dof
The current dof being operated on.
FEContinuity _cont
The type of continuity, e.g. C0, C1.
dof_id_type _free_dofs
The number of free dofs.
DenseVector< DataType > _Ue
Linear solution vector.
dof_id_type _nc
number of dofs per node per variable
void choleskySolve(bool is_volume)
Perform the cholesky solves for edge, side, and interior projections.
virtual NumericVector< Number > & solution()=0
std::vector< dof_id_type > _dof_indices
The global DOF indices.
const Elem *const & _current_elem
The current element we are on will retrieving values at specific points in the domain.
SystemBase & sys()
Get the system this variable is part of.

◆ computeNodal()

template<typename T >
void InitialConditionTempl< T >::computeNodal ( const Point &  p)
overridevirtualinherited

Workhorse method for projecting the initial conditions for boundary restricted initial conditions.

Implements InitialConditionBase.

Definition at line 528 of file InitialConditionTempl.C.

529 {
530  _var.reinitNode();
531  _var.computeNodalValues(); // has to call this to resize the internal array
532  auto return_value = value(p);
533 
534  _var.setNodalValue(return_value); // update variable data, which is referenced by others, so the
535  // value is up-to-date
536 
537  // We are done, so update the solution vector
538  {
539  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
540  _var.insert(_var.sys().solution());
541  }
542 }
MooseVariableFE< T > & _var
The variable that this initial condition is acting upon.
virtual void computeNodalValues() override
Compute nodal values of this variable.
void setNodalValue(const OutputType &value, unsigned int idx=0)
Set nodal value.
void insert(NumericVector< Number > &residual) override
Set the current local DOF values to the input vector.
virtual T value(const Point &p)=0
The value of the variable at a point.
virtual NumericVector< Number > & solution()=0
void reinitNode() override
SystemBase & sys()
Get the system this variable is part of.

◆ coupled()

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

Referenced by FunctionMaterialBase::FunctionMaterialBase(), KernelBase::KernelBase(), and NodalEqualValueConstraint::NodalEqualValueConstraint().

224 {
225  checkVar(var_name);
226 
227  if (!isCoupled(var_name))
228  {
229  // make sure we don't try to access default var ids that were not provided
230  if (comp + 1 > _optional_var_index[var_name].size())
232  ": Requested component ",
233  comp,
234  " of coupled value ",
235  var_name,
236  " is out of range.");
237  return _optional_var_index[var_name][comp];
238  }
239 
240  MooseVariableFEBase * var = getFEVar(var_name, comp);
241  switch (var->kind())
242  {
244  return var->number();
246  return std::numeric_limits<unsigned int>::max() - var->number();
247  default:
248  mooseError(_c_name, ": Unknown variable kind. Corrupted binary?");
249  }
250 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
unsigned int number() const
Get variable number coming from libMesh.
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
Moose::VarKindType kind() const
Kind of the variable (Nonlinear, Auxiliary, ...)
std::unordered_map< std::string, std::vector< unsigned int > > _optional_var_index
Unique indices for optionally coupled vars that weren&#39;t provided.
Definition: Coupleable.h:1078
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
MooseVariableFEBase * getFEVar(const std::string &var_name, unsigned int comp)
Extract pointer to a base finite element coupled variable.
Definition: Coupleable.C:160

◆ coupledArrayDot()

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

936 {
937  checkVar(var_name);
938  if (!isCoupled(var_name)) // Return default 0
940 
941  validateExecutionerType(var_name, "coupledArrayDot");
942  ArrayMooseVariable * var = getArrayVar(var_name, comp);
943 
945  {
946  if (_c_nodal)
947  return var->dofValuesDot();
948  else
949  return var->uDot();
950  }
951  else
952  {
953  if (_c_nodal)
954  return var->dofValuesDotNeighbor();
955  else
956  return var->uDotNeighbor();
957  }
958 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const DoFValue & dofValuesDotNeighbor()
const FieldVariableValue & uDot() const
element dots
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & uDotNeighbor() const
neighbor dots
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
const DoFValue & dofValuesDot()
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:933
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledArrayDotDot()

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

962 {
963  checkVar(var_name);
964  if (!isCoupled(var_name)) // Return default 0
966 
967  validateExecutionerType(var_name, "coupledArrayDotDot");
968  ArrayMooseVariable * var = getArrayVar(var_name, comp);
969 
971  {
972  if (_c_nodal)
973  return var->dofValuesDotDot();
974  else
975  return var->uDotDot();
976  }
977  else
978  {
979  if (_c_nodal)
980  return var->dofValuesDotDotNeighbor();
981  else
982  return var->uDotDotNeighbor();
983  }
984 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
const FieldVariableValue & uDotDotNeighbor() const
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & uDotDot() const
const DoFValue & dofValuesDotDot()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:933
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesDotDotNeighbor()

◆ coupledArrayDotDotOld()

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

1014 {
1015  checkVar(var_name);
1016  if (!isCoupled(var_name)) // Return default 0
1018 
1019  validateExecutionerType(var_name, "coupledArrayDotDotOld");
1020  ArrayMooseVariable * var = getArrayVar(var_name, comp);
1021 
1022  if (!_coupleable_neighbor)
1023  {
1024  if (_c_nodal)
1025  return var->dofValuesDotDotOld();
1026  else
1027  return var->uDotDotOld();
1028  }
1029  else
1030  {
1031  if (_c_nodal)
1032  return var->dofValuesDotDotOldNeighbor();
1033  else
1034  return var->uDotDotOldNeighbor();
1035  }
1036 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & uDotDotOldNeighbor() const
const DoFValue & dofValuesDotDotOldNeighbor()
const FieldVariableValue & uDotDotOld() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:933
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesDotDotOld()

◆ coupledArrayDotOld()

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

988 {
989  checkVar(var_name);
990  if (!isCoupled(var_name)) // Return default 0
992 
993  validateExecutionerType(var_name, "coupledArrayDotOld");
994  ArrayMooseVariable * var = getArrayVar(var_name, comp);
995 
997  {
998  if (_c_nodal)
999  return var->dofValuesDotOld();
1000  else
1001  return var->uDotOld();
1002  }
1003  else
1004  {
1005  if (_c_nodal)
1006  return var->dofValuesDotOldNeighbor();
1007  else
1008  return var->uDotOldNeighbor();
1009  }
1010 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableValue & uDotOld() const
const DoFValue & dofValuesDotOld()
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesDotOldNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
const FieldVariableValue & uDotOldNeighbor() const
ArrayVariableValue _default_array_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:933
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledArrayGradient()

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

1278 {
1279  checkVar(var_name);
1280  if (!isCoupled(var_name)) // Return default 0
1281  return _default_array_gradient;
1282 
1283  coupledCallback(var_name, false);
1284  if (_c_nodal)
1285  mooseError(_c_name, ": Gradients are non-sensical with nodal compute objects");
1286 
1287  ArrayMooseVariable * var = getArrayVar(var_name, comp);
1288 
1289  if (!_coupleable_neighbor)
1290  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1291  else
1292  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1293 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const FieldVariableGradient & gradSlnOldNeighbor() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const FieldVariableGradient & gradSlnOld() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:936
const FieldVariableGradient & gradSlnNeighbor() const
neighbor solution gradients
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const FieldVariableGradient & gradSln() const
element gradients

◆ coupledArrayGradientOld()

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

1297 {
1298  checkVar(var_name);
1299  if (!isCoupled(var_name)) // Return default 0
1300  return _default_array_gradient;
1301 
1302  coupledCallback(var_name, true);
1303  if (_c_nodal)
1304  mooseError(_c_name, ": Gradients are non-sensical with nodal compute objects");
1305 
1306  validateExecutionerType(var_name, "coupledArrayGradientOld");
1307  ArrayMooseVariable * var = getArrayVar(var_name, comp);
1308 
1309  if (!_coupleable_neighbor)
1310  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1311  else
1312  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1313 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const FieldVariableGradient & gradSlnOlderNeighbor() const
const FieldVariableGradient & gradSlnOldNeighbor() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const FieldVariableGradient & gradSlnOld() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
const FieldVariableGradient & gradSlnOlder() const
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:936
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledArrayGradientOlder()

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

1317 {
1318  checkVar(var_name);
1319  if (!isCoupled(var_name)) // Return default 0
1320  return _default_array_gradient;
1321 
1322  coupledCallback(var_name, true);
1323  if (_c_nodal)
1324  mooseError(_c_name, ": Gradients are non-sensical with nodal compute objects");
1325 
1326  validateExecutionerType(var_name, "coupledArrayGradientOlder");
1327  ArrayMooseVariable * var = getArrayVar(var_name, comp);
1328 
1329  if (_c_is_implicit)
1330  {
1331  if (!_coupleable_neighbor)
1332  return var->gradSlnOlder();
1333  else
1334  return var->gradSlnOlderNeighbor();
1335  }
1336  else
1337  mooseError(_c_name, ": Older values not available for explicit schemes");
1338 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const FieldVariableGradient & gradSlnOlderNeighbor() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
const FieldVariableGradient & gradSlnOlder() const
ArrayVariableGradient _default_array_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:936
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledArrayValue()

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

Returns value of a coupled array variable.

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

Definition at line 449 of file Coupleable.C.

450 {
451  if (!isCoupled(var_name))
452  return *getDefaultArrayValue(var_name);
453 
454  coupledCallback(var_name, false);
455  ArrayMooseVariable * var = getArrayVar(var_name, comp);
456 
458  {
459  if (_c_nodal)
460  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
461  else
462  return (_c_is_implicit) ? var->sln() : var->slnOld();
463  }
464  else
465  {
466  if (_c_nodal)
467  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
468  else
469  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
470  }
471 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const DoFValue & dofValuesNeighbor()
const DoFValue & dofValuesOld()
const FieldVariableValue & sln() const
element solutions
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesOldNeighbor()
const DoFValue & dofValues()
const FieldVariableValue & slnOld() const
const FieldVariableValue & slnNeighbor() const
neighbor solutions
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
const FieldVariableValue & slnOldNeighbor() const
ArrayVariableValue * getDefaultArrayValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled array variable...
Definition: Coupleable.C:314

◆ coupledArrayValueOld()

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

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

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

Definition at line 647 of file Coupleable.C.

648 {
649  if (!isCoupled(var_name))
650  return *getDefaultArrayValue(var_name);
651 
652  validateExecutionerType(var_name, "coupledArrayValueOld");
653  coupledCallback(var_name, true);
654  ArrayMooseVariable * var = getArrayVar(var_name, comp);
655 
657  {
658  if (_c_nodal)
659  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
660  else
661  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
662  }
663  else
664  {
665  if (_c_nodal)
667  else
668  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
669  }
670 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableValue & slnOlderNeighbor() const
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const DoFValue & dofValuesOld()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesOldNeighbor()
const FieldVariableValue & slnOld() const
const DoFValue & dofValuesOlderNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
const FieldVariableValue & slnOldNeighbor() const
const FieldVariableValue & slnOlder() const
const DoFValue & dofValuesOlder()
ArrayVariableValue * getDefaultArrayValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled array variable...
Definition: Coupleable.C:314

◆ coupledArrayValueOlder()

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

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

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

Definition at line 673 of file Coupleable.C.

674 {
675  if (!isCoupled(var_name))
676  return *getDefaultArrayValue(var_name);
677 
678  validateExecutionerType(var_name, "coupledArrayValueOlder");
679  coupledCallback(var_name, true);
680  ArrayMooseVariable * var = getArrayVar(var_name, comp);
681 
683  {
684  if (_c_nodal)
685  {
686  if (_c_is_implicit)
687  return var->dofValuesOlder();
688  else
689  mooseError(_c_name, ": Older values not available for explicit schemes");
690  }
691  else
692  {
693  if (_c_is_implicit)
694  return var->slnOlder();
695  else
696  mooseError("Older values not available for explicit schemes");
697  }
698  }
699  else
700  {
701  if (_c_nodal)
702  {
703  if (_c_is_implicit)
704  return var->dofValuesOlderNeighbor();
705  else
706  mooseError(_c_name, ": Older values not available for explicit schemes");
707  }
708  else
709  {
710  if (_c_is_implicit)
711  return var->slnOlderNeighbor();
712  else
713  mooseError("Older values not available for explicit schemes");
714  }
715  }
716 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
const FieldVariableValue & slnOlderNeighbor() const
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const DoFValue & dofValuesOlderNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Definition: Coupleable.C:217
const FieldVariableValue & slnOlder() const
const DoFValue & dofValuesOlder()
ArrayVariableValue * getDefaultArrayValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled array variable...
Definition: Coupleable.C:314

◆ coupledCallback()

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

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

Reimplemented in AuxKernelTempl< ComputeValueType >.

Definition at line 130 of file Coupleable.h.

Referenced by Coupleable::adCoupledGradientTemplate(), Coupleable::adCoupledNodalValueTemplate(), Coupleable::adCoupledSecondTemplate(), Coupleable::adCoupledValueTemplate(), Coupleable::adCoupledVectorGradientTemplate(), Coupleable::adCoupledVectorValueTemplate(), Coupleable::coupledArrayGradient(), Coupleable::coupledArrayGradientOld(), Coupleable::coupledArrayGradientOlder(), Coupleable::coupledArrayValue(), Coupleable::coupledArrayValueOld(), Coupleable::coupledArrayValueOlder(), Coupleable::coupledCurl(), Coupleable::coupledCurlOld(), Coupleable::coupledCurlOlder(), Coupleable::coupledDofValues(), Coupleable::coupledDofValuesOld(), Coupleable::coupledDofValuesOlder(), 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::coupledValueOld(), Coupleable::coupledValueOlder(), Coupleable::coupledValuePreviousNL(), Coupleable::coupledVectorGradient(), Coupleable::coupledVectorGradientOld(), Coupleable::coupledVectorGradientOlder(), Coupleable::coupledVectorTagValue(), Coupleable::coupledVectorValue(), Coupleable::coupledVectorValueOld(), and Coupleable::coupledVectorValueOlder().

130 {}

◆ coupledComponents()

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

Number of coupled components.

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

Definition at line 127 of file Coupleable.C.

Referenced by KernelBase::KernelBase(), NodalEqualValueConstraint::NodalEqualValueConstraint(), SpatialAverageBase::SpatialAverageBase(), and VolumeHistogram::VolumeHistogram().

128 {
129  if (isCoupled(var_name))
130  return _coupled_vars[var_name].size();
131  else
132  {
134  return _c_parameters.numberDefaultCoupledValues(var_name);
135  else
136  return 0;
137  }
138 }
std::unordered_map< std::string, std::vector< MooseVariableFEBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:839
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
const InputParameters & _c_parameters
Definition: Coupleable.h:830

◆ coupledCurl()

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

1342 {
1343  if (!isCoupled(var_name)) // Return default 0
1344  return _default_vector_curl;
1345 
1346  coupledCallback(var_name, false);
1347  if (_c_nodal)
1348  mooseError("Nodal variables do not have curls");
1349 
1350  VectorMooseVariable * var = getVectorVar(var_name, comp);
1351 
1352  if (!_coupleable_neighbor)
1353  return (_c_is_implicit) ? var->curlSln() : var->curlSlnOld();
1354  else
1355  return (_c_is_implicit) ? var->curlSlnNeighbor() : var->curlSlnOldNeighbor();
1356 }
const FieldVariableCurl & curlSlnNeighbor() const
neighbor solution curls
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:927
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:211
Class for stuff related to variables.
Definition: Adaptivity.h:31
const FieldVariableCurl & curlSlnOldNeighbor() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const FieldVariableCurl & curlSlnOld() const
const FieldVariableCurl & curlSln() const
element curls
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995

◆ coupledCurlOld()

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

1360 {
1361  if (!isCoupled(var_name)) // Return default 0
1362  return _default_vector_curl;
1363 
1364  coupledCallback(var_name, true);
1365  if (_c_nodal)
1366  mooseError("Nodal variables do not have curls");
1367 
1368  validateExecutionerType(var_name, "coupledCurlOld");
1369  VectorMooseVariable * var = getVectorVar(var_name, comp);
1370 
1371  if (!_coupleable_neighbor)
1372  return (_c_is_implicit) ? var->curlSlnOld() : var->curlSlnOlder();
1373  else
1374  return (_c_is_implicit) ? var->curlSlnOldNeighbor() : var->curlSlnOlderNeighbor();
1375 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:927
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:211
Class for stuff related to variables.
Definition: Adaptivity.h:31
const FieldVariableCurl & curlSlnOldNeighbor() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const FieldVariableCurl & curlSlnOld() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableCurl & curlSlnOlder() const
const FieldVariableCurl & curlSlnOlderNeighbor() const

◆ coupledCurlOlder()

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

1379 {
1380  if (!isCoupled(var_name)) // Return default 0
1381  return _default_vector_curl;
1382 
1383  coupledCallback(var_name, true);
1384  if (_c_nodal)
1385  mooseError("Nodal variables do not have curls");
1386 
1387  validateExecutionerType(var_name, "coupledCurlOlder");
1388  VectorMooseVariable * var = getVectorVar(var_name, comp);
1389 
1390  if (_c_is_implicit)
1391  {
1392  if (!_coupleable_neighbor)
1393  return var->curlSlnOlder();
1394  else
1395  return var->curlSlnOlderNeighbor();
1396  }
1397  else
1398  mooseError("Older values not available for explicit schemes");
1399 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:927
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:211
Class for stuff related to variables.
Definition: Adaptivity.h:31
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableCurl & curlSlnOlder() const
const FieldVariableCurl & curlSlnOlderNeighbor() const

◆ coupledDofValues()

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

1650 {
1651  checkVar(var_name);
1652 
1653  if (!isCoupled(var_name))
1654  return *getDefaultValue(var_name, comp);
1655 
1656  coupledCallback(var_name, false);
1657  MooseVariable * var = getVar(var_name, comp);
1658 
1659  if (!_coupleable_neighbor)
1660  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
1661  else
1662  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
1663 }
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const DoFValue & dofValuesNeighbor()
const DoFValue & dofValuesOld()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:253
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesOldNeighbor()
const DoFValue & dofValues()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledDofValuesOld()

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

1667 {
1668  checkVar(var_name);
1669 
1670  if (!isCoupled(var_name))
1671  return *getDefaultValue(var_name, comp);
1672 
1673  validateExecutionerType(var_name, "coupledDofValuesOld");
1674  coupledCallback(var_name, true);
1675  MooseVariable * var = getVar(var_name, comp);
1676 
1677  if (!_coupleable_neighbor)
1678  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1679  else
1680  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1681 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const DoFValue & dofValuesOld()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:253
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesOldNeighbor()
const DoFValue & dofValuesOlderNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesOlder()

◆ coupledDofValuesOlder()

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

1685 {
1686  checkVar(var_name);
1687 
1688  if (!isCoupled(var_name))
1689  return *getDefaultValue(var_name, comp);
1690 
1691  validateExecutionerType(var_name, "coupledDofValuesOlder");
1692  coupledCallback(var_name, true);
1693  MooseVariable * var = getVar(var_name, comp);
1694 
1695  if (_c_is_implicit)
1696  {
1697  if (!_coupleable_neighbor)
1698  return var->dofValuesOlder();
1699  else
1700  return var->dofValuesOlderNeighbor();
1701  }
1702  else
1703  mooseError(_c_name, ": Older values not available for explicit schemes");
1704 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:253
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const DoFValue & dofValuesOlderNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesOlder()

◆ coupledDot()

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

Definition at line 719 of file Coupleable.C.

Referenced by AuxKernelTempl< ComputeValueType >::coupledDot().

720 {
721  checkVar(var_name);
722  if (!isCoupled(var_name)) // Return default 0
723  return _default_value_zero;
724 
725  validateExecutionerType(var_name, "coupledDot");
726  MooseVariable * var = getVar(var_name, comp);
727 
729  {
730  if (_c_nodal)
731  return var->dofValuesDot();
732  else
733  return var->uDot();
734  }
735  else
736  {
737  if (_c_nodal)
738  return var->dofValuesDotNeighbor();
739  else
740  return var->uDotNeighbor();
741  }
742 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const DoFValue & dofValuesDotNeighbor()
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const FieldVariableValue & uDot() const
element dots
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & uDotNeighbor() const
neighbor dots
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const DoFValue & dofValuesDot()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledDotDot()

const VariableValue & Coupleable::coupledDotDot ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 time derivative of the coupled variable

Definition at line 745 of file Coupleable.C.

746 {
747  checkVar(var_name);
748  if (!isCoupled(var_name)) // Return default 0
749  return _default_value_zero;
750 
751  validateExecutionerType(var_name, "coupledDotDot");
752  MooseVariable * var = getVar(var_name, comp);
753 
755  {
756  if (_c_nodal)
757  return var->dofValuesDotDot();
758  else
759  return var->uDotDot();
760  }
761  else
762  {
763  if (_c_nodal)
764  return var->dofValuesDotDotNeighbor();
765  else
766  return var->uDotDotNeighbor();
767  }
768 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
const FieldVariableValue & uDotDotNeighbor() const
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & uDotDot() const
const DoFValue & dofValuesDotDot()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesDotDotNeighbor()

◆ coupledDotDotDu()

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

1066 {
1067  checkVar(var_name);
1068  if (!isCoupled(var_name)) // Return default 0
1069  return _default_value_zero;
1070 
1071  validateExecutionerType(var_name, "coupledDotDotDu");
1072  MooseVariable * var = getVar(var_name, comp);
1073 
1074  if (!_coupleable_neighbor)
1075  {
1076  if (_c_nodal)
1077  return var->dofValuesDuDotDotDu();
1078  else
1079  return var->duDotDotDu();
1080  }
1081  else
1082  {
1083  if (_c_nodal)
1084  return var->dofValuesDuDotDotDuNeighbor();
1085  else
1086  return var->duDotDotDu();
1087  }
1088 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const MooseArray< Number > & dofValuesDuDotDotDu()
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const VariableValue & duDotDotDu() const
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const MooseArray< Number > & dofValuesDuDotDotDuNeighbor()

◆ coupledDotDotOld()

const VariableValue & Coupleable::coupledDotDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 time derivative of the coupled variable

Definition at line 797 of file Coupleable.C.

798 {
799  checkVar(var_name);
800  if (!isCoupled(var_name)) // Return default 0
801  return _default_value_zero;
802 
803  validateExecutionerType(var_name, "coupledDotDotOld");
804  MooseVariable * var = getVar(var_name, comp);
805 
807  {
808  if (_c_nodal)
809  return var->dofValuesDotDotOld();
810  else
811  return var->uDotDotOld();
812  }
813  else
814  {
815  if (_c_nodal)
816  return var->dofValuesDotDotOldNeighbor();
817  else
818  return var->uDotDotOldNeighbor();
819  }
820 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & uDotDotOldNeighbor() const
const DoFValue & dofValuesDotDotOldNeighbor()
const FieldVariableValue & uDotDotOld() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesDotDotOld()

◆ coupledDotDu()

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

Definition at line 1039 of file Coupleable.C.

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

1040 {
1041  checkVar(var_name);
1042  if (!isCoupled(var_name)) // Return default 0
1043  return _default_value_zero;
1044 
1045  validateExecutionerType(var_name, "coupledDotDu");
1046  MooseVariable * var = getVar(var_name, comp);
1047 
1048  if (!_coupleable_neighbor)
1049  {
1050  if (_c_nodal)
1051  return var->dofValuesDuDotDu();
1052  else
1053  return var->duDotDu();
1054  }
1055  else
1056  {
1057  if (_c_nodal)
1058  return var->dofValuesDuDotDuNeighbor();
1059  else
1060  return var->duDotDuNeighbor();
1061  }
1062 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const VariableValue & duDotDuNeighbor() const
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const MooseArray< Number > & dofValuesDuDotDu()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const VariableValue & duDotDu() const
const MooseArray< Number > & dofValuesDuDotDuNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledDotOld()

const VariableValue & Coupleable::coupledDotOld ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 time derivative of the coupled variable

Definition at line 771 of file Coupleable.C.

772 {
773  checkVar(var_name);
774  if (!isCoupled(var_name)) // Return default 0
775  return _default_value_zero;
776 
777  validateExecutionerType(var_name, "coupledDotOld");
778  MooseVariable * var = getVar(var_name, comp);
779 
781  {
782  if (_c_nodal)
783  return var->dofValuesDotOld();
784  else
785  return var->uDotOld();
786  }
787  else
788  {
789  if (_c_nodal)
790  return var->dofValuesDotOldNeighbor();
791  else
792  return var->uDotOldNeighbor();
793  }
794 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const FieldVariableValue & uDotOld() const
const DoFValue & dofValuesDotOld()
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesDotOldNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableValue & uDotOldNeighbor() const
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledGradient()

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

Referenced by NodeElemConstraint::coupledSlaveGradient(), and NodeFaceConstraint::coupledSlaveGradient().

1092 {
1093  checkVar(var_name);
1094  if (!isCoupled(var_name)) // Return default 0
1095  return _default_gradient;
1096 
1097  coupledCallback(var_name, false);
1098  if (_c_nodal)
1099  mooseError(_c_name, ": Nodal variables do not have gradients");
1100 
1101  MooseVariable * var = getVar(var_name, comp);
1102 
1103  if (!_coupleable_neighbor)
1104  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1105  else
1106  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1107 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const FieldVariableGradient & gradSlnOldNeighbor() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:885
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const FieldVariableGradient & gradSlnOld() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableGradient & gradSlnNeighbor() const
neighbor solution gradients
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const FieldVariableGradient & gradSln() const
element gradients

◆ coupledGradientDot()

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

1176 {
1177  checkVar(var_name);
1178  if (!isCoupled(var_name)) // Return default 0
1179  return _default_gradient;
1180 
1181  coupledCallback(var_name, false);
1182  if (_c_nodal)
1183  mooseError(_c_name, ": Nodal variables do not have gradients");
1184 
1185  MooseVariable * var = getVar(var_name, comp);
1186 
1187  if (!_coupleable_neighbor)
1188  return var->gradSlnDot();
1189  else
1190  return var->gradSlnNeighborDot();
1191 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:885
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableGradient & gradSlnNeighborDot() const
neighbor grad dots
const FieldVariableGradient & gradSlnDot() const
element gradient dots
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledGradientDotDot()

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

1195 {
1196  checkVar(var_name);
1197  if (!isCoupled(var_name)) // Return default 0
1198  return _default_gradient;
1199 
1200  coupledCallback(var_name, false);
1201  if (_c_nodal)
1202  mooseError(_c_name, ": Nodal variables do not have gradients");
1203 
1204  MooseVariable * var = getVar(var_name, comp);
1205 
1206  if (!_coupleable_neighbor)
1207  return var->gradSlnDotDot();
1208  else
1209  return var->gradSlnNeighborDotDot();
1210 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
const FieldVariableGradient & gradSlnNeighborDotDot() const
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:885
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableGradient & gradSlnDotDot() const
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledGradientOld()

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

Referenced by NodeElemConstraint::coupledSlaveGradientOld(), and NodeFaceConstraint::coupledSlaveGradientOld().

1111 {
1112  checkVar(var_name);
1113  if (!isCoupled(var_name)) // Return default 0
1114  return _default_gradient;
1115 
1116  coupledCallback(var_name, true);
1117  if (_c_nodal)
1118  mooseError(_c_name, ": Nodal compute objects do not support gradients");
1119 
1120  validateExecutionerType(var_name, "coupledGradientOld");
1121  MooseVariable * var = getVar(var_name, comp);
1122 
1123  if (!_coupleable_neighbor)
1124  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1125  else
1126  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1127 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const FieldVariableGradient & gradSlnOlderNeighbor() const
const FieldVariableGradient & gradSlnOldNeighbor() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:885
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const FieldVariableGradient & gradSlnOld() const
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableGradient & gradSlnOlder() const
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledGradientOlder()

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

Referenced by NodeElemConstraint::coupledSlaveGradientOlder(), and NodeFaceConstraint::coupledSlaveGradientOlder().

1131 {
1132  checkVar(var_name);
1133  if (!isCoupled(var_name)) // Return default 0
1134  return _default_gradient;
1135 
1136  coupledCallback(var_name, true);
1137  if (_c_nodal)
1138  mooseError(_c_name, ": Nodal compute objects do not support gradients");
1139 
1140  validateExecutionerType(var_name, "coupledGradientOlder");
1141  MooseVariable * var = getVar(var_name, comp);
1142 
1143  if (_c_is_implicit)
1144  {
1145  if (!_coupleable_neighbor)
1146  return var->gradSlnOlder();
1147  else
1148  return var->gradSlnOlderNeighbor();
1149  }
1150  else
1151  mooseError(_c_name, ": Older values not available for explicit schemes");
1152 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const FieldVariableGradient & gradSlnOlderNeighbor() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:885
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableGradient & gradSlnOlder() const
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledGradientPreviousNL()

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

1156 {
1157  checkVar(var_name);
1158  if (!isCoupled(var_name)) // Return default 0
1159  return _default_gradient;
1160 
1162  coupledCallback(var_name, true);
1163  if (_c_nodal)
1164  mooseError(_c_name, ": Nodal compute objects do not support gradients");
1165 
1166  MooseVariable * var = getVar(var_name, comp);
1167 
1168  if (!_coupleable_neighbor)
1169  return var->gradSlnPreviousNL();
1170  else
1171  return var->gradSlnPreviousNLNeighbor();
1172 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableGradient & gradSlnPreviousNL() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const FieldVariableGradient & gradSlnPreviousNLNeighbor() const
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:836
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:885
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledMatrixTagValue()

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

Returns value of a coupled variable for a given tag.

This couples the diag vector of matrix

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

Definition at line 404 of file Coupleable.C.

405 {
406  checkVar(var_name);
407  if (!isCoupled(var_name))
408  mooseError(var_name, ": invalid variable name for coupledMatrixTagValue");
409 
411 
412  coupledCallback(var_name, false);
413  MooseVariable * var = getVar(var_name, comp);
414 
415  if (_c_nodal)
416  return var->nodalMatrixTagValue(tag);
417  else
418  return var->matrixTagValue(tag);
419 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const DoFValue & nodalMatrixTagValue(TagID tag)
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & matrixTagValue(TagID tag)
void addFEVariableCoupleableMatrixTag(TagID tag)
Definition: Coupleable.h:119
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledNodalDot()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalDot< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1580 of file Coupleable.C.

1581 {
1582  checkVar(var_name);
1583  static const T zero = 0;
1584  if (!isCoupled(var_name)) // Return default 0
1585  return zero;
1586 
1587  validateExecutionerType(var_name, "coupledNodalDot");
1588  coupledCallback(var_name, false);
1589  MooseVariableFE<T> * var = getVarHelper<T>(var_name, comp);
1590 
1591  if (!_coupleable_neighbor)
1592  return var->nodalValueDot();
1593  else
1594  mooseError("Neighbor version not implemented");
1595 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const OutputType & nodalValueDot()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledNodalDotDot()

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

1599 {
1600  checkVar(var_name);
1601  if (!isCoupled(var_name)) // Return default 0
1602  return _default_value_zero;
1603 
1604  validateExecutionerType(var_name, "coupledNodalDotDot");
1605  coupledCallback(var_name, false);
1606  MooseVariable * var = getVar(var_name, comp);
1607 
1608  if (!_coupleable_neighbor)
1609  return var->dofValuesDotDot();
1610  else
1611  return var->dofValuesDotDotNeighbor();
1612 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesDotDot()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesDotDotNeighbor()

◆ coupledNodalDotDotOld()

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

1633 {
1634  checkVar(var_name);
1635  if (!isCoupled(var_name)) // Return default 0
1636  return _default_value_zero;
1637 
1638  validateExecutionerType(var_name, "coupledNodalDotDotOld");
1639  coupledCallback(var_name, false);
1640  MooseVariable * var = getVar(var_name, comp);
1641 
1642  if (!_coupleable_neighbor)
1643  return var->dofValuesDotDotOld();
1644  else
1645  return var->dofValuesDotDotOldNeighbor();
1646 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesDotDotOldNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesDotDotOld()

◆ coupledNodalDotOld()

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

1616 {
1617  checkVar(var_name);
1618  if (!isCoupled(var_name)) // Return default 0
1619  return _default_value_zero;
1620 
1621  validateExecutionerType(var_name, "coupledNodalDotOld");
1622  coupledCallback(var_name, false);
1623  MooseVariable * var = getVar(var_name, comp);
1624 
1625  if (!_coupleable_neighbor)
1626  return var->dofValuesDotOld();
1627  else
1628  return var->dofValuesDotOldNeighbor();
1629 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:882
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const DoFValue & dofValuesDotOld()
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesDotOldNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledNodalValue()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValue< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1487 of file Coupleable.C.

1488 {
1489  checkVar(var_name);
1490  if (!isCoupled(var_name))
1491  return getNodalDefaultValue<T>(var_name, comp);
1492 
1493  coupledCallback(var_name, false);
1494  MooseVariableFE<T> * var = getVarHelper<T>(var_name, comp);
1495 
1496  if (!var->isNodal())
1498  ": Trying to get nodal values of variable '",
1499  var->name(),
1500  "', but it is not nodal.");
1501 
1502  if (!_coupleable_neighbor)
1503  return (_c_is_implicit) ? var->nodalValue() : var->nodalValueOld();
1504  else
1505  return (_c_is_implicit) ? var->nodalValueNeighbor() : var->nodalValueOldNeighbor();
1506 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
const OutputType & nodalValueOld()
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const OutputType & nodalValueNeighbor()
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const OutputType & nodalValue()
Methods for retrieving values of variables at the nodes.
const OutputType & nodalValueOldNeighbor()
bool isNodal() const override
Is this variable nodal.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const std::string & name() const
Get the variable name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledNodalValueOld()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValueOld< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1510 of file Coupleable.C.

1511 {
1512  checkVar(var_name);
1513  if (!isCoupled(var_name))
1514  return getNodalDefaultValue<T>(var_name, comp);
1515 
1516  validateExecutionerType(var_name, "coupledNodalValueOld");
1517  coupledCallback(var_name, true);
1518  MooseVariableFE<T> * var = getVarHelper<T>(var_name, comp);
1519 
1520  if (!var->isNodal())
1522  ": Trying to get old nodal values of variable '",
1523  var->name(),
1524  "', but it is not nodal.");
1525 
1526  if (!_coupleable_neighbor)
1527  return (_c_is_implicit) ? var->nodalValueOld() : var->nodalValueOlder();
1528  else
1530 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
const OutputType & nodalValueOlderNeighbor()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
const OutputType & nodalValueOld()
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const OutputType & nodalValueOldNeighbor()
bool isNodal() const override
Is this variable nodal.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const std::string & name() const
Get the variable name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const OutputType & nodalValueOlder()

◆ coupledNodalValueOlder()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValueOlder< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1534 of file Coupleable.C.

1535 {
1536  checkVar(var_name);
1537  if (!isCoupled(var_name))
1538  return getNodalDefaultValue<T>(var_name, comp);
1539 
1540  validateExecutionerType(var_name, "coupledNodalValueOlder");
1541  coupledCallback(var_name, true);
1542  MooseVariableFE<T> * var = getVarHelper<T>(var_name, comp);
1543 
1544  if (!var->isNodal())
1546  ": Trying to get older nodal values of variable '",
1547  var->name(),
1548  "', but it is not nodal.");
1549  if (_c_is_implicit)
1550  {
1551  if (!_coupleable_neighbor)
1552  return var->nodalValueOlder();
1553  else
1554  return var->nodalValueOlderNeighbor();
1555  }
1556  else
1557  mooseError(_c_name, ": Older values not available for explicit schemes");
1558 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
const OutputType & nodalValueOlderNeighbor()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool isNodal() const override
Is this variable nodal.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const std::string & name() const
Get the variable name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const OutputType & nodalValueOlder()

◆ coupledNodalValuePreviousNL()

template<typename T >
template const RealVectorValue & Coupleable::coupledNodalValuePreviousNL< RealVectorValue > ( const std::string &  var_name,
unsigned int  comp = 0 
)
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 1562 of file Coupleable.C.

1563 {
1564  checkVar(var_name);
1565  if (!isCoupled(var_name))
1566  return getNodalDefaultValue<T>(var_name, comp);
1567 
1569  coupledCallback(var_name, true);
1570  MooseVariableFE<T> * var = getVarHelper<T>(var_name, comp);
1571 
1572  if (!_coupleable_neighbor)
1573  return var->nodalValuePreviousNL();
1574  else
1575  return var->nodalValuePreviousNLNeighbor();
1576 }
const OutputType & nodalValuePreviousNL()
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const OutputType & nodalValuePreviousNLNeighbor()
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:836
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledSecond()

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

Returns second derivative 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 1402 of file Coupleable.C.

Referenced by NodeElemConstraint::coupledSlaveSecond(), and NodeFaceConstraint::coupledSlaveSecond().

1403 {
1404  checkVar(var_name);
1405  if (!isCoupled(var_name)) // Return default 0
1406  return _default_second;
1407 
1408  coupledCallback(var_name, false);
1409  if (_c_nodal)
1410  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1411 
1412  MooseVariable * var = getVar(var_name, comp);
1413 
1414  if (!_coupleable_neighbor)
1415  return (_c_is_implicit) ? var->secondSln() : var->secondSlnOlder();
1416  else
1417  return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOlderNeighbor();
1418 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableSecond & secondSlnOlderNeighbor() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableSecond & secondSlnNeighbor() const
neighbor solution seconds
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:894
const FieldVariableSecond & secondSlnOlder() const
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const FieldVariableSecond & secondSln() const
element seconds
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledSecondOld()

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

Returns an old second derivative 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 1421 of file Coupleable.C.

1422 {
1423  checkVar(var_name);
1424  if (!isCoupled(var_name)) // Return default 0
1425  return _default_second;
1426 
1427  coupledCallback(var_name, true);
1428  if (_c_nodal)
1429  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1430 
1431  validateExecutionerType(var_name, "coupledSecondOld");
1432  MooseVariable * var = getVar(var_name, comp);
1433 
1434  if (!_coupleable_neighbor)
1435  return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
1436  else
1437  return (_c_is_implicit) ? var->secondSlnOldNeighbor() : var->secondSlnOlderNeighbor();
1438 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableSecond & secondSlnOlderNeighbor() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
const FieldVariableSecond & secondSlnOld() const
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const FieldVariableSecond & secondSlnOldNeighbor() const
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:894
const FieldVariableSecond & secondSlnOlder() const
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledSecondOlder()

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

1442 {
1443  checkVar(var_name);
1444  if (!isCoupled(var_name)) // Return default 0
1445  return _default_second;
1446 
1447  coupledCallback(var_name, true);
1448  if (_c_nodal)
1449  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1450 
1451  validateExecutionerType(var_name, "coupledSecondOlder");
1452  MooseVariable * var = getVar(var_name, comp);
1453 
1454  if (_c_is_implicit)
1455  {
1456  if (!_coupleable_neighbor)
1457  return var->secondSlnOlder();
1458  else
1459  return var->secondSlnOlderNeighbor();
1460  }
1461  else
1462  mooseError(_c_name, ": Older values not available for explicit schemes");
1463 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableSecond & secondSlnOlderNeighbor() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:894
const FieldVariableSecond & secondSlnOlder() const
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledSecondPreviousNL()

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

1467 {
1468  checkVar(var_name);
1469  if (!isCoupled(var_name)) // Return default 0
1470  return _default_second;
1471 
1473  coupledCallback(var_name, true);
1474  if (_c_nodal)
1475  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1476 
1477  MooseVariable * var = getVar(var_name, comp);
1478 
1479  if (!_coupleable_neighbor)
1480  return var->secondSlnPreviousNL();
1481  else
1482  return var->secondSlnPreviousNLNeighbor();
1483 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableSecond & secondSlnPreviousNLNeighbor() const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:836
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableSecond & secondSlnPreviousNL() const
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:894
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledValue()

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

Referenced by NodeElemConstraint::coupledSlaveValue(), NodeFaceConstraint::coupledSlaveValue(), FunctionMaterialBase::FunctionMaterialBase(), NodalEqualValueConstraint::NodalEqualValueConstraint(), ParsedAux::ParsedAux(), SpatialAverageBase::SpatialAverageBase(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), and Coupleable::writableCoupledValue().

360 {
361  checkVar(var_name);
362  if (!isCoupled(var_name))
363  return *getDefaultValue(var_name, comp);
364 
365  coupledCallback(var_name, false);
366  MooseVariable * var = getVar(var_name, comp);
367  // var should be a valid pointer at this point, otherwise an error has been thrown in getVar
368 
370  {
371  if (_c_nodal)
372  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
373  else
374  return (_c_is_implicit) ? var->sln() : var->slnOld();
375  }
376  else
377  {
378  if (_c_nodal)
379  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
380  else
381  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
382  }
383 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const DoFValue & dofValuesNeighbor()
const DoFValue & dofValuesOld()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const FieldVariableValue & sln() const
element solutions
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:253
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesOldNeighbor()
const DoFValue & dofValues()
const FieldVariableValue & slnOld() const
const FieldVariableValue & slnNeighbor() const
neighbor solutions
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableValue & slnOldNeighbor() const
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledValueOld()

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

Referenced by NodeElemConstraint::coupledSlaveValueOld(), NodeFaceConstraint::coupledSlaveValueOld(), and VariableTimeIntegrationAux::VariableTimeIntegrationAux().

481 {
482  checkVar(var_name);
483  if (!isCoupled(var_name))
484  return *getDefaultValue(var_name, comp);
485 
486  validateExecutionerType(var_name, "coupledValueOld");
487  coupledCallback(var_name, true);
488  MooseVariable * var = getVar(var_name, comp);
489 
491  {
492  if (_c_nodal)
493  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
494  else
495  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
496  }
497  else
498  {
499  if (_c_nodal)
501  else
502  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
503  }
504 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
const FieldVariableValue & slnOlderNeighbor() const
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
const DoFValue & dofValuesOld()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:253
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const DoFValue & dofValuesOldNeighbor()
const FieldVariableValue & slnOld() const
const DoFValue & dofValuesOlderNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableValue & slnOldNeighbor() const
const FieldVariableValue & slnOlder() const
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesOlder()

◆ coupledValueOlder()

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

Referenced by NodeElemConstraint::coupledSlaveValueOlder(), NodeFaceConstraint::coupledSlaveValueOlder(), and VariableTimeIntegrationAux::VariableTimeIntegrationAux().

508 {
509  checkVar(var_name);
510  if (!isCoupled(var_name))
511  return *getDefaultValue(var_name, comp);
512 
513  validateExecutionerType(var_name, "coupledValueOlder");
514  coupledCallback(var_name, true);
515  MooseVariable * var = getVar(var_name, comp);
516 
518  {
519  if (_c_nodal)
520  {
521  if (_c_is_implicit)
522  return var->dofValuesOlder();
523  else
524  mooseError(_c_name, ": Older values not available for explicit schemes");
525  }
526  else
527  {
528  if (_c_is_implicit)
529  return var->slnOlder();
530  else
531  mooseError(_c_name, ": Older values not available for explicit schemes");
532  }
533  }
534  else
535  {
536  if (_c_nodal)
537  {
538  if (_c_is_implicit)
539  return var->dofValuesOlderNeighbor();
540  else
541  mooseError(_c_name, ": Older values not available for explicit schemes");
542  }
543  else
544  {
545  if (_c_is_implicit)
546  return var->slnOlderNeighbor();
547  else
548  mooseError(_c_name, ": Older values not available for explicit schemes");
549  }
550  }
551 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
const FieldVariableValue & slnOlderNeighbor() const
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:253
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:857
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:833
const DoFValue & dofValuesOlderNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
const FieldVariableValue & slnOlder() const
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const DoFValue & dofValuesOlder()

◆ coupledValuePreviousNL()

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

555 {
556  checkVar(var_name);
557  if (!isCoupled(var_name))
558  return *getDefaultValue(var_name, comp);
559 
561  coupledCallback(var_name, true);
562  MooseVariable * var = getVar(var_name, comp);
563 
565  {
566  if (_c_nodal)
567  return var->dofValuesPreviousNL();
568  else
569  return var->slnPreviousNL();
570  }
571  else
572  {
573  if (_c_nodal)
574  return var->dofValuesPreviousNLNeighbor();
575  else
576  return var->slnPreviousNLNeighbor();
577  }
578 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
virtual void coupledCallback(const std::string &, bool)
A call-back function provided by the derived object for actions before coupling a variable with funct...
Definition: Coupleable.h:130
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:205
const DoFValue & dofValuesPreviousNLNeighbor()
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:253
const DoFValue & dofValuesPreviousNL()
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:836
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & slnPreviousNL() const
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141
const FieldVariableValue & slnPreviousNLNeighbor() const

◆ coupledVectorDot()

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

824 {
825  checkVar(var_name);
826  if (!isCoupled(var_name)) // Return default 0
828 
829  validateExecutionerType(var_name, "coupledVectorDot");
830  VectorMooseVariable * var = getVectorVar(var_name, comp);
831 
833  {
834  if (_c_nodal)
835  mooseError("Vector variables are not required to be continuous and so should not be used "
836  "with nodal compute objects");
837  else
838  return var->uDot();
839  }
840  else
841  {
842  if (_c_nodal)
843  mooseError("Vector variables are not required to be continuous and so should not be used "
844  "with nodal compute objects");
845  else
846  return var->uDotNeighbor();
847  }
848 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1707
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:854
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:211
Class for stuff related to variables.
Definition: Adaptivity.h:31
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:204
const FieldVariableValue & uDot() const
element dots
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:106
const FieldVariableValue & uDotNeighbor() const
neighbor dots
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:995
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:921
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:141

◆ coupledVectorDotDot()

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

852 {
853  checkVar(var_name);
854  if (!isCoupled(var_name)) // Return default 0
856 
857  validateExecutionerType(var_name, "coupledVectorDotDot");
858  VectorMooseVariable * var = getVectorVar(var_name, comp);
859 
861  {
862  if (_c_nodal)
863  mooseError("Vector variables are not required to be continuous and so should not be used "
864  "with nodal compute objects");
865  else
866  return var->uDotDot();
867  }
868  else
869  {
870  if (_c_nodal)
871  mooseError("Vector variables are not required to be continuous and so should not be used "
872  "with nodal compute objects");
873  else
874  return var->uDotDotNeighbor();
875<