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

Base class for deriving any boundary condition of a integrated type. More...

#include <IntegratedBCBase.h>

Inheritance diagram for IntegratedBCBase:
[legend]

Public Types

enum  TEST_TYPE { ALL, ANY }
 A flag changing the behavior of hasBoundary. More...
 

Public Member Functions

 IntegratedBCBase (const InputParameters &parameters)
 
virtual ~IntegratedBCBase ()
 
virtual void computeResidual ()=0
 
virtual void computeJacobian ()=0
 
virtual void computeJacobianBlock (MooseVariableFEBase &jvar)=0
 Computes d-ivar-residual / d-jvar... More...
 
virtual void computeJacobianBlockScalar (unsigned int jvar)=0
 Computes jacobian block with respect to a scalar variable. More...
 
virtual void computeNonlocalJacobian ()
 Compute this IntegratedBCBase's contribution to the diagonal Jacobian entries corresponding to nonlocal dofs of the variable. More...
 
virtual void computeNonlocalOffDiagJacobian (unsigned int)
 Computes d-residual / d-jvar... More...
 
virtual MooseVariableFEBasevariable ()=0
 Get a reference to the MooseVariableFE. More...
 
SubProblemsubProblem ()
 Get a reference to the subproblem. More...
 
virtual bool shouldApply ()
 Hook for turning the boundary condition on and off. 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 & getParam (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
 
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...
 
virtual void initialSetup ()
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual void timestepSetup ()
 Gets called at the beginning of the timestep before this object is asked to do its job. More...
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual void subdomainSetup ()
 Gets called when the subdomain changes (i.e. More...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 (DEPRECATED) Get the execution flag for the object TODO: ExecFlagType More...
 
ExecFlagType execBitFlags () const
 (DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType More...
 
FunctiongetFunction (const std::string &name)
 Get a function with a given name. More...
 
FunctiongetFunctionByName (const FunctionName &name)
 Get a function with a given name. More...
 
DistributiongetDistribution (const std::string &name)
 Get a distribution with a given name. More...
 
DistributiongetDistributionByName (const DistributionName &name)
 Get a distribution with a given name. More...
 
template<class T >
const T & getUserObject (const std::string &name)
 Get an user object with a given parameter name. More...
 
template<class T >
const T & getUserObjectByName (const std::string &name)
 Get an user object with a given name. More...
 
const UserObjectgetUserObjectBase (const std::string &name)
 Get an user object with a given parameter name. More...
 
const UserObjectgetUserObjectBaseByName (const std::string &name)
 Get an user object with a given name. More...
 
bool isImplicit ()
 
bool hasPostprocessor (const std::string &name) const
 Determine if the Postprocessor exists. More...
 
bool hasPostprocessorByName (const PostprocessorName &name)
 Determine if the Postprocessor exists. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the value of a VectorPostprocessor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the value of the VectorPostprocessor. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the old value of a VectorPostprocessor. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the old value of a VectorPostprocessor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const std::string &name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 Return the old scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const std::string &name, const std::string &vector_name)
 Return the old scatter value for the post processor. More...
 
bool hasVectorPostprocessor (const std::string &name) const
 Determine if the VectorPostprocessor exists. More...
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 Determine if the VectorPostprocessor exists. More...
 
PenetrationLocatorgetPenetrationLocator (const BoundaryName &master, const BoundaryName &slave, Order order)
 Retrieve the PentrationLocator associated with the two sides. More...
 
PenetrationLocatorgetQuadraturePenetrationLocator (const BoundaryName &master, const BoundaryName &slave, Order order)
 Retrieve the Quadrature PentrationLocator associated with the two sides. More...
 
PenetrationLocatorgetMortarPenetrationLocator (const BoundaryName &master, const BoundaryName &slave, Moose::ConstraintType side_type, Order order)
 Retrieve the mortar PentrationLocator associated with the two sides. More...
 
NearestNodeLocatorgetNearestNodeLocator (const BoundaryName &master, const BoundaryName &slave)
 Retrieve the PentrationLocator associated with the two sides. More...
 
NearestNodeLocatorgetQuadratureNearestNodeLocator (const BoundaryName &master, const BoundaryName &slave)
 Retrieve a Quadrature NearestNodeLocator associated with the two sides. More...
 
NearestNodeLocatorgetMortarNearestNodeLocator (const BoundaryName &master, const BoundaryName &slave, Moose::ConstraintType side_type)
 Retrieve a mortar NearestNodeLocator associated with the two sides. More...
 
virtual void meshChanged ()
 Called on this object when the mesh changes. More...
 
void useVectorTag (const TagName &tag_name)
 
void useVectorTag (TagID tag_id)
 
void useMatrixTag (const TagName &tag_name)
 
void useMatrixTag (TagID tag_id)
 
bool isVectorTagged ()
 
bool isMatrixTagged ()
 
const std::set< TagID > & getVectorTags () const
 
const std::set< TagID > & getMatrixTags () const
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar)
 Prepare data for computing element residual the according to active tags. More...
 
void prepareVectorTagNeighbor (Assembly &assembly, unsigned int ivar)
 Prepare data for computing element residual the according to active tags for DG and interface kernels. More...
 
void prepareMatrixTag (Assembly &assembly, unsigned int ivar, unsigned int jvar)
 Prepare data for computing element jacobian according to the ative tags. More...
 
void prepareMatrixTagNeighbor (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type)
 Prepare data for computing element jacobian according to the ative tags for DG and interface kernels. More...
 
void accumulateTaggedLocalResidual ()
 Local residual blocks will be appended by adding the current local kernel residual. More...
 
void assignTaggedLocalResidual ()
 Local residual blocks will assigned as the current local kernel residual. More...
 
void accumulateTaggedLocalMatrix ()
 Local Jacobian blocks will be appended by adding the current local kernel Jacobian. More...
 
void assignTaggedLocalMatrix ()
 Local Jacobian blocks will assigned as the current local kernel Jacobian. More...
 
void setRandomResetFrequency (ExecFlagType exec_flag)
 This interface should be called from a derived class to enable random number generation in this object. More...
 
unsigned long getRandomLong () const
 Returns the next random number (long) from the generator tied to this object (elem/node). More...
 
Real getRandomReal () const
 Returns the next random number (Real) from the generator tied to this object (elem/node). More...
 
unsigned int getSeed (std::size_t id)
 Get the seed for the passed in elem/node id. More...
 
unsigned int getMasterSeed () const
 
bool isNodal () const
 
ExecFlagType getResetOnTime () const
 
void setRandomDataPointer (RandomData *random_data)
 
const std::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...
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 Get the list of coupled scalar variables. More...
 
std::set< TagID > & getScalarVariableCoupleableVectorTags ()
 
std::set< TagID > & getScalarVariableCoupleableMatrixTags ()
 
void addScalarVariableCoupleableVectorTag (TagID tag)
 
void addScalarVariableCoupleableMatrixTag (TagID tag)
 
const std::set< MooseVariableFEBase * > & getMooseVariableDependencies () const
 Retrieve the set of MooseVariableFEBases that this object depends on. More...
 
template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 Retrieve pointer to a material property with the mesh blocks where it is defined The name required by this method is the name defined in the input file. More...
 
template<typename T >
const MaterialProperty< T > & getZeroMaterialProperty (const std::string &prop_name)
 Return a material property that is initialized to zero by default and does not need to (but can) be declared by another material. More...
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 Retrieve the block ids that the material property is defined. More...
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 Retrieve the block names that the material property is defined. More...
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 Retrieve the boundary ids that the material property is defined. More...
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 Retrieve the boundary namess that the material property is defined. More...
 
void statefulPropertiesAllowed (bool)
 Derived classes can declare whether or not they work with stateful material properties. More...
 
bool getMaterialPropertyCalled () const
 Returns true if getMaterialProperty() has been called, false otherwise. More...
 
const std::set< unsigned int > & getMatPropDependencies () const
 Retrieve the set of material properties that this object depends on. More...
 
template<>
const MaterialProperty< Real > * defaultMaterialProperty (const std::string &name)
 
template<>
const ADMaterialPropertyObject< Real > * defaultADMaterialProperty (const std::string &name)
 
const PostprocessorValuegetPostprocessorValue (const std::string &name)
 Retrieve the value of a Postprocessor or one of it's old or older values. More...
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name)
 Retrieve the value of the Postprocessor. More...
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name)
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name)
 
const PostprocessorValuegetDefaultPostprocessorValue (const std::string &name)
 Return the default postprocessor value. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialProperty (const std::string &name)
 Retrieve reference to material property or one of it's old or older values. More...
 
template<typename T >
const ADMaterialPropertyObject< T > & getADMaterialProperty (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name)
 Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file. More...
 
template<typename T >
const ADMaterialPropertyObject< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
MaterialgetMaterial (const std::string &name)
 Return a Material reference - usable for computing directly. More...
 
MaterialgetMaterialByName (const std::string &name, bool no_warn=false)
 
template<typename T >
bool hasMaterialProperty (const std::string &name)
 Check if the material property exists. More...
 
template<typename T >
bool hasMaterialPropertyByName (const std::string &name)
 

Static Public Member Functions

static bool restricted (const std::set< BoundaryID > &ids)
 Helper for determining if the object is boundary restricted. More...
 
static ExecFlagEnum getExecuteOptions ()
 (DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType More...
 

Public Attributes

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

Protected Member Functions

virtual Real computeQpResidual ()=0
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int)
 This is the virtual that derived classes should override for computing an off-diagonal jacobian component. More...
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 A helper method to avoid circular #include problems. More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (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...
 
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 void coupledCallback (const std::string &var_name, bool is_old)
 
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 VariableValueType< compute_stage >::typeadCoupledValueTemplate (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled 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 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 VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable. More...
 
template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::typeadCoupledGradientTemplate (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled 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 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...
 
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 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...
 
virtual const VariableValuecoupledNodalValue (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from previous time step of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from two time steps previous of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable for previous Newton iterate. More...
 
virtual const VariableValuecoupledNodalDot (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 DenseVector< Number > & coupledSolutionDoFs (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 DenseVector< Number > & coupledSolutionDoFsOld (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 DenseVector< Number > & coupledSolutionDoFsOlder (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...
 
void checkVar (const std::string &var_name)
 Check that the right kind of variable is being coupled in. More...
 
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...
 
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...
 
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...
 
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...
 
VariableValuegetDefaultValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default value for an uncoupled variable. More...
 
virtual bool isCoupledScalar (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled_as name. More...
 
virtual unsigned int coupledScalarComponents (const std::string &var_name)
 Return the number of components to the coupled scalar variable. More...
 
virtual unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0)
 Returns the index for a scalar coupled variable by name. More...
 
virtual Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0)
 Returns the order for a scalar coupled variable by name. More...
 
virtual VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0)
 Returns the old (previous time step) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns the older (two time steps previous) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0)
 Returns the time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0)
 Returns the second time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0)
 Returns the old time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0)
 Returns the old second time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a scalar coupled variable with respect to the coefficients. More...
 
virtual VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a scalar coupled variable with respect to the coefficients. More...
 
MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a scalar coupled variable. More...
 
void addMooseVariableDependency (MooseVariableFEBase *var)
 Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on. More...
 
void addMooseVariableDependency (std::vector< MooseVariableFEBase *> vars)
 
void checkMaterialProperty (const std::string &name)
 A helper method for checking material properties This method was required to avoid a compiler problem with the template getMaterialProperty method. More...
 
void markMatPropRequested (const std::string &)
 A proxy method for _mi_feproblem.markMatPropRequested(name) More...
 
std::string deducePropertyName (const std::string &name)
 Small helper to look up a material property name through the input parameter keys. More...
 
template<typename T >
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 Helper function to parse default material property values. More...
 
template<typename T >
const ADMaterialPropertyObject< T > * defaultADMaterialProperty (const std::string &name)
 Helper function to parse default material property values. More...
 

Protected Attributes

const Elem *& _current_elem
 current element More...
 
const Real & _current_elem_volume
 Volume of the current element. More...
 
unsigned int & _current_side
 current side of the current element More...
 
const Elem *& _current_side_elem
 current side element More...
 
const Real & _current_side_volume
 Volume of the current side. More...
 
unsigned int _qp
 quadrature point index More...
 
QBase *& _qrule
 active quadrature rule More...
 
const MooseArray< Point > & _q_point
 active quadrature points More...
 
const MooseArray< Real > & _JxW
 transformed Jacobian weights More...
 
const MooseArray< Real > & _coord
 coordinate transformation More...
 
unsigned int _i
 i-th, j-th index for enumerating test and shape functions More...
 
unsigned int _j
 
bool _has_save_in
 The aux variables to save the residual contributions to. More...
 
std::vector< MooseVariableFEBase * > _save_in
 
std::vector< AuxVariableName > _save_in_strings
 
bool _has_diag_save_in
 The aux variables to save the diagonal Jacobian contributions to. More...
 
std::vector< MooseVariableFEBase * > _diag_save_in
 
std::vector< AuxVariableName > _diag_save_in_strings
 
SubProblem_subproblem
 Reference to SubProblem. More...
 
FEProblemBase_fe_problem
 Reference to FEProblemBase. More...
 
SystemBase_sys
 Reference to SystemBase. More...
 
THREAD_ID _tid
 Thread id. More...
 
Assembly_assembly
 Reference to assembly. More...
 
MooseMesh_mesh
 Mesh this BC is defined on. 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...
 
const ExecFlagEnum_execute_enum
 Execute settings for this oejct. More...
 
const std::vector< ExecFlagType_exec_flags
 (DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 If the object is using implicit or explicit form. More...
 
Real & _t
 Time. More...
 
int & _t_step
 The number of the time step. More...
 
Real & _dt
 Time step size. More...
 
Real & _dt_old
 Size of the old time step. More...
 
bool _is_transient
 
GeometricSearchData_geometric_search_data
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. More...
 
std::set< TagID_vector_tags
 The vectors this Kernel will contribute to. More...
 
std::set< TagID_matrix_tags
 The matrices this Kernel will contribute to. More...
 
const MooseObject_moose_object
 Moose objct this tag works on. More...
 
const InputParameters_tag_params
 Parameters from moose object. More...
 
std::vector< DenseVector< Number > * > _re_blocks
 Residual blocks Vectors For each Tag. More...
 
std::vector< DenseMatrix< Number > * > _ke_blocks
 Kernel blocks Vectors For each Tag. More...
 
DenseVector< Number > _local_re
 Holds residual entries as they are accumulated by this Kernel. More...
 
DenseMatrix< Number > _local_ke
 Holds residual entries as they are accumulated by this Kernel. 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::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...
 
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::map< std::string, std::vector< VariableValue * > > _default_value
 Will hold the default value for optional coupled variables. More...
 
std::map< std::string, VariableValue * > _default_value
 Will hold the default value for optional coupled scalar variables. More...
 
std::map< std::string, MooseArray< ADReal > * > _ad_default_value
 Will hold the default value for optional coupled variables for automatic differentiation. More...
 
std::map< std::string, VectorVariableValue * > _default_vector_value
 Will hold the default value for optional vector coupled variables. 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< ADRealGradient_ad_default_gradient
 This will always be zero because the default values for optionally coupled 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< ADRealTensor_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< ADReal > & _ad_zero
 
const VariableGradient_grad_zero
 Zero gradient of a variable. More...
 
const MooseArray< ADRealGradient > & _ad_grad_zero
 
const VariableSecond_second_zero
 Zero second derivative of a variable. More...
 
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...
 
bool _coupleable_neighbor
 Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor values. More...
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 The name of the object this interface is part of. More...
 
FEProblemBase_sc_fe_problem
 
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 Coupled vars whose values we provide. More...
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 Vector of coupled variables. More...
 
bool _sc_is_implicit
 True if implicit value is required. More...
 
const InputParameters_coupleable_params
 Local InputParameters. More...
 
THREAD_ID _sc_tid
 Thread ID of the thread using this object. More...
 
const Real & _real_zero
 Scalar zero. More...
 
const VariableValue_scalar_zero
 Zero value of a scalar variable. More...
 
const Point & _point_zero
 Zero point. More...
 
const InputParameters_mi_params
 Parameters of the object with this interface. More...
 
const std::string _mi_name
 The name of the object that this interface belongs to. More...
 
Moose::MaterialDataType _material_data_type
 The type of data. More...
 
std::shared_ptr< MaterialData_material_data
 Pointer to the material data class that stores properties. More...
 
FEProblemBase_mi_feproblem
 Reference to the FEProblemBase class. More...
 
const THREAD_ID _mi_tid
 Current threaded it. More...
 
bool _stateful_allowed
 True by default. More...
 
bool _get_material_property_called
 Initialized to false. More...
 
std::vector< std::unique_ptr< MaterialProperty< Real > > > _default_real_properties
 Storage vector for MaterialProperty<Real> default objects. More...
 
std::vector< std::unique_ptr< ADMaterialPropertyObject< Real > > > _default_ad_real_properties
 Storage vector for ADMaterialPropertyObject<Real> default objects. More...
 
std::set< unsigned int > _material_property_dependencies
 The set of material properties (as given by their IDs) that this object depends on. More...
 

Detailed Description

Base class for deriving any boundary condition of a integrated type.

Definition at line 36 of file IntegratedBCBase.h.

Member Enumeration Documentation

◆ TEST_TYPE

A flag changing the behavior of hasBoundary.

Enumerator
ALL 
ANY 

Definition at line 35 of file BoundaryRestrictable.h.

Constructor & Destructor Documentation

◆ IntegratedBCBase()

IntegratedBCBase::IntegratedBCBase ( const InputParameters parameters)

Definition at line 45 of file IntegratedBCBase.C.

46  : BoundaryCondition(parameters, false), // False is because this is NOT nodal
59  _save_in_strings(parameters.get<std::vector<AuxVariableName>>("save_in")),
60  _diag_save_in_strings(parameters.get<std::vector<AuxVariableName>>("diag_save_in"))
61 {
62 }
QBase *& qRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:246
RandomInterface(const InputParameters &parameters, FEProblemBase &problem, THREAD_ID tid, bool is_nodal)
const MooseArray< Point > & qPointsFace()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:252
MaterialPropertyInterface(const MooseObject *moose_object, const std::set< SubdomainID > &block_ids, const std::set< BoundaryID > &boundary_ids)
FEProblemBase & _fe_problem
Reference to FEProblemBase.
QBase *& _qrule
active quadrature rule
const MooseArray< Real > & coordTransformation()
Returns the reference to the coordinate transformation coefficients.
Definition: Assembly.h:234
const MooseArray< Point > & _q_point
active quadrature points
unsigned int & side()
Returns the current side.
Definition: Assembly.h:292
const Real & _current_elem_volume
Volume of the current element.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
std::vector< AuxVariableName > _save_in_strings
Assembly & _assembly
Reference to assembly.
const Real & elemVolume()
Returns the reference to the current element volume.
Definition: Assembly.h:286
const MooseArray< Real > & _coord
coordinate transformation
const Real & _current_side_volume
Volume of the current side.
const MooseArray< Real > & JxWFace()
Returns the reference to the transformed jacobian weights on a current face.
Definition: Assembly.h:258
const Elem *& elem()
Return the current element.
Definition: Assembly.h:270
const std::set< SubdomainID > EMPTY_BLOCK_IDS
Definition: MooseTypes.h:323
std::vector< AuxVariableName > _diag_save_in_strings
const Elem *& _current_elem
current element
const Real & sideElemVolume()
Returns the reference to the volume of current side element.
Definition: Assembly.h:310
const Elem *& _current_side_elem
current side element
unsigned int & _current_side
current side of the current element
virtual const std::set< BoundaryID > & boundaryIDs() const
Return the boundary IDs for this object.
THREAD_ID _tid
Thread id.
const Elem *& sideElem()
Returns the side element.
Definition: Assembly.h:304
const MooseArray< Real > & _JxW
transformed Jacobian weights
BoundaryCondition(const InputParameters &parameters, bool nodal)
Class constructor.

◆ ~IntegratedBCBase()

IntegratedBCBase::~IntegratedBCBase ( )
virtual

Definition at line 64 of file IntegratedBCBase.C.

64 {}

Member Function Documentation

◆ accumulateTaggedLocalMatrix()

void TaggingInterface::accumulateTaggedLocalMatrix ( )
inherited

◆ accumulateTaggedLocalResidual()

void TaggingInterface::accumulateTaggedLocalResidual ( )
inherited

Local residual blocks will be appended by adding the current local kernel residual.

It should be called after the local element vector has been computed.

Definition at line 178 of file TaggingInterface.C.

Referenced by InterfaceKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), Kernel::computeResidual(), ODEKernel::computeResidual(), ODETimeKernel::computeResidual(), TimeKernel::computeResidual(), IntegratedBC::computeResidual(), VectorIntegratedBC::computeResidual(), DiracKernel::computeResidual(), and ConservativeAdvection::fullUpwind().

179 {
180  for (auto & re : _re_blocks)
181  *re += _local_re;
182 }
std::vector< DenseVector< Number > * > _re_blocks
Residual blocks Vectors For each Tag.
DenseVector< Number > _local_re
Holds residual entries as they are accumulated by this Kernel.

◆ adCoupledGradientTemplate()

template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::type & 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 815 of file Coupleable.h.

816 {
817  if (!isCoupled(var_name)) // Return default 0
818  return getADDefaultGradient<compute_stage>();
819 
820  coupledCallback(var_name, false);
821  if (_c_nodal)
822  mooseError("Nodal variables do not have gradients");
823 
824  MooseVariable * var = getVar(var_name, comp);
825 
827  {
828  if (_c_is_implicit)
829  return var->adGradSln<compute_stage>();
830  else
831  mooseError("Not implemented");
832  }
833  else
834  {
835  if (_c_is_implicit)
836  return var->adGradSlnNeighbor<compute_stage>();
837  else
838  mooseError("Not implemented");
839  }
840 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const VariableGradientType< compute_stage >::type & adGradSlnNeighbor()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const VariableGradientType< compute_stage >::type & adGradSln()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
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:726

◆ adCoupledValueTemplate()

template<ComputeStage compute_stage>
const VariableValueType< compute_stage >::type & 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 779 of file Coupleable.h.

780 {
781  if (!isCoupled(var_name))
782  return *getADDefaultValue<compute_stage>(var_name);
783 
784  coupledCallback(var_name, false);
785  MooseVariable * var = getVar(var_name, comp);
786 
788  {
789  if (_c_nodal)
790  mooseError("Not implemented");
791  else
792  {
793  if (_c_is_implicit)
794  return var->adSln<compute_stage>();
795  else
796  mooseError("Not implemented");
797  }
798  }
799  else
800  {
801  if (_c_nodal)
802  mooseError("Not implemented");
803  else
804  {
805  if (_c_is_implicit)
806  return var->adSlnNeighbor<compute_stage>();
807  else
808  mooseError("Not implemented");
809  }
810  }
811 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const VariableValueType< compute_stage >::type & adSln()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const VariableValueType< compute_stage >::type & adSlnNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
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:726

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 89 of file Coupleable.h.

Referenced by Coupleable::coupledMatrixTagValue().

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

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

Definition at line 87 of file Coupleable.h.

Referenced by Coupleable::coupledVectorTagValue().

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

◆ addMooseVariableDependency() [1/2]

void MooseVariableDependencyInterface::addMooseVariableDependency ( MooseVariableFEBase var)
inlineprotectedinherited

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

Definition at line 37 of file MooseVariableDependencyInterface.h.

Referenced by ADKernel< compute_stage >::ADKernel(), AuxKernel::AuxKernel(), AuxNodalScalarKernel::AuxNodalScalarKernel(), CoupleableMooseVariableDependencyIntermediateInterface::CoupleableMooseVariableDependencyIntermediateInterface(), DGKernel::DGKernel(), DiracKernel::DiracKernel(), ElemElemConstraint::ElemElemConstraint(), ElementIndicator::ElementIndicator(), ElementIntegralVariablePostprocessor::ElementIntegralVariablePostprocessor(), ElementIntegralVariableUserObject::ElementIntegralVariableUserObject(), ElementUserObject::ElementUserObject(), ElementVariablePostprocessor::ElementVariablePostprocessor(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), InternalSideIndicator::InternalSideIndicator(), InternalSideUserObject::InternalSideUserObject(), Kernel::Kernel(), Marker::Marker(), Material::Material(), NeighborCoupleableMooseVariableDependencyIntermediateInterface::NeighborCoupleableMooseVariableDependencyIntermediateInterface(), NodalBC::NodalBC(), NodalConstraint::NodalConstraint(), NodalKernel::NodalKernel(), NodalScalarKernel::NodalScalarKernel(), NodalUserObject::NodalUserObject(), NodeElemConstraint::NodeElemConstraint(), NodeFaceConstraint::NodeFaceConstraint(), PointSamplerBase::PointSamplerBase(), QuadraturePointMarker::QuadraturePointMarker(), SideIntegralVariablePostprocessor::SideIntegralVariablePostprocessor(), SideIntegralVariableUserObject::SideIntegralVariableUserObject(), SideUserObject::SideUserObject(), VectorIntegratedBC::VectorIntegratedBC(), VectorKernel::VectorKernel(), and VectorNodalBC::VectorNodalBC().

38  {
39  _moose_variable_dependencies.insert(var);
40  }
std::set< MooseVariableFEBase * > _moose_variable_dependencies

◆ addMooseVariableDependency() [2/2]

void MooseVariableDependencyInterface::addMooseVariableDependency ( std::vector< MooseVariableFEBase *>  vars)
inlineprotectedinherited

Definition at line 41 of file MooseVariableDependencyInterface.h.

42  {
43  _moose_variable_dependencies.insert(vars.begin(), vars.end());
44  }
std::set< MooseVariableFEBase * > _moose_variable_dependencies

◆ addScalarVariableCoupleableMatrixTag()

void ScalarCoupleable::addScalarVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 59 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledMatrixTagScalarValue().

59 { _sc_coupleable_matrix_tags.insert(tag); }
std::set< TagID > _sc_coupleable_matrix_tags

◆ addScalarVariableCoupleableVectorTag()

void ScalarCoupleable::addScalarVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

Definition at line 57 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledVectorTagScalarValue().

57 { _sc_coupleable_vector_tags.insert(tag); }
std::set< TagID > _sc_coupleable_vector_tags

◆ assignTaggedLocalMatrix()

void TaggingInterface::assignTaggedLocalMatrix ( )
inherited

Local Jacobian blocks will assigned as the current local kernel Jacobian.

It should be called after the local element matrix has been computed.

Definition at line 199 of file TaggingInterface.C.

Referenced by NodalEqualValueConstraint::computeJacobian().

200 {
201  for (auto & ke : _ke_blocks)
202  *ke = _local_ke;
203 }
DenseMatrix< Number > _local_ke
Holds residual entries as they are accumulated by this Kernel.
std::vector< DenseMatrix< Number > * > _ke_blocks
Kernel blocks Vectors For each Tag.

◆ assignTaggedLocalResidual()

void TaggingInterface::assignTaggedLocalResidual ( )
inherited

Local residual blocks will assigned as the current local kernel residual.

It should be called after the local element vector has been computed.

Definition at line 185 of file TaggingInterface.C.

Referenced by NodalEqualValueConstraint::computeResidual().

186 {
187  for (auto & re : _re_blocks)
188  *re = _local_re;
189 }
std::vector< DenseVector< Number > * > _re_blocks
Residual blocks Vectors For each Tag.
DenseVector< Number > _local_re
Holds residual entries as they are accumulated by this Kernel.

◆ 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 148 of file BoundaryRestrictable.C.

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

149 {
150  return _bnd_ids;
151 }
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 154 of file BoundaryRestrictable.C.

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

155 {
156  return _boundary_names;
157 }
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 166 of file BoundaryRestrictable.C.

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

167 {
169 }
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.

◆ checkMaterialProperty()

void MaterialPropertyInterface::checkMaterialProperty ( const std::string &  name)
protectedinherited

A helper method for checking material properties This method was required to avoid a compiler problem with the template getMaterialProperty method.

Definition at line 144 of file MaterialPropertyInterface.C.

Referenced by MaterialPropertyInterface::getADMaterialPropertyByName(), and MaterialPropertyInterface::getMaterialPropertyByName().

145 {
146  // If the material property is boundary restrictable, add to the list of materials to check
148  for (const auto & bnd_id : _mi_boundary_ids)
150 
151  // The default is to assume block restrictions
152  else
153  for (const auto & blk_ids : _mi_block_ids)
155 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
virtual void storeSubdomainDelayedCheckMatProp(const std::string &requestor, SubdomainID block_id, const std::string &name)
Adds to a map based on block ids of material properties to validate.
Definition: SubProblem.C:419
const bool _mi_boundary_restricted
BoundaryRestricted flag.
virtual void storeBoundaryDelayedCheckMatProp(const std::string &requestor, BoundaryID boundary_id, const std::string &name)
Adds to a map based on boundary ids of material properties to validate.
Definition: SubProblem.C:427
const std::set< BoundaryID > & _mi_boundary_ids
Storage for the boundary ids created by BoundaryRestrictable.
const std::string _mi_name
The name of the object that this interface belongs to.

◆ checkVar() [1/2]

void ScalarCoupleable::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 257 of file ScalarCoupleable.C.

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

258 {
259  auto it = _sc_coupled_vars.find(var_name);
260  if (it != _sc_coupled_vars.end())
261  {
262  std::string cvars;
263  for (auto jt : it->second)
264  cvars += " " + jt->name();
266  ": Trying to couple a field variable where scalar variable is expected, '",
267  var_name,
268  " =",
269  cvars,
270  "'");
271  }
272  // NOTE: non-existent variables are handled in the constructor
273 }
std::map< std::string, std::vector< MooseVariableFEBase * > > _sc_coupled_vars
Field variables coupled into this object (for error checking)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const std::string & _sc_name
The name of the object this interface is part of.

◆ checkVar() [2/2]

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

Referenced by Coupleable::coupled(), 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::coupledSolutionDoFs(), Coupleable::coupledSolutionDoFsOld(), Coupleable::coupledSolutionDoFsOlder(), 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().

168 {
169  auto it = _c_coupled_scalar_vars.find(var_name);
170  if (it != _c_coupled_scalar_vars.end())
171  {
172  std::string cvars;
173  for (auto jt : it->second)
174  cvars += " " + jt->name();
176  ": Trying to couple a scalar variable where field variable is expected, '",
177  var_name,
178  " =",
179  cvars,
180  "'");
181  }
182  // NOTE: non-existent variables are handled in the constructor
183 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, std::vector< MooseVariableScalar * > > _c_coupled_scalar_vars
Scalar variables coupled into this object (for error checking)
Definition: Coupleable.h:770
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604

◆ computeJacobian()

virtual void IntegratedBCBase::computeJacobian ( )
pure virtual

◆ computeJacobianBlock()

virtual void IntegratedBCBase::computeJacobianBlock ( MooseVariableFEBase jvar)
pure virtual

Computes d-ivar-residual / d-jvar...

Implemented in VectorIntegratedBC, NonlocalIntegratedBC, and IntegratedBC.

◆ computeJacobianBlockScalar()

virtual void IntegratedBCBase::computeJacobianBlockScalar ( unsigned int  jvar)
pure virtual

Computes jacobian block with respect to a scalar variable.

Parameters
jvarThe number of the scalar variable

Implemented in VectorIntegratedBC, and IntegratedBC.

◆ computeNonlocalJacobian()

virtual void IntegratedBCBase::computeNonlocalJacobian ( )
inlinevirtual

Compute this IntegratedBCBase's contribution to the diagonal Jacobian entries corresponding to nonlocal dofs of the variable.

Reimplemented in NonlocalIntegratedBC.

Definition at line 62 of file IntegratedBCBase.h.

62 {}

◆ computeNonlocalOffDiagJacobian()

virtual void IntegratedBCBase::computeNonlocalOffDiagJacobian ( unsigned int  )
inlinevirtual

Computes d-residual / d-jvar...

corresponding to nonlocal dofs of the jvar and stores the result in nonlocal ke

Reimplemented in NonlocalIntegratedBC.

Definition at line 68 of file IntegratedBCBase.h.

68 {}

◆ computeQpJacobian()

virtual Real IntegratedBCBase::computeQpJacobian ( )
inlineprotectedvirtual

◆ computeQpOffDiagJacobian()

virtual Real IntegratedBCBase::computeQpOffDiagJacobian ( unsigned  int)
inlineprotectedvirtual

This is the virtual that derived classes should override for computing an off-diagonal jacobian component.

Reimplemented in OneDEqualValueConstraintBC.

Definition at line 111 of file IntegratedBCBase.h.

Referenced by IntegratedBC::computeJacobianBlock(), NonlocalIntegratedBC::computeJacobianBlock(), VectorIntegratedBC::computeJacobianBlock(), IntegratedBC::computeJacobianBlockScalar(), and VectorIntegratedBC::computeJacobianBlockScalar().

111 { return 0; }

◆ computeQpResidual()

virtual Real IntegratedBCBase::computeQpResidual ( )
protectedpure virtual

◆ computeResidual()

virtual void IntegratedBCBase::computeResidual ( )
pure virtual

Implemented in VectorIntegratedBC, and IntegratedBC.

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

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

235 {
236  checkVar(var_name);
237 
238  if (!isCoupled(var_name))
239  {
240  // make sure we don't try to access default var ids that were not provided
241  if (comp + 1 > _optional_var_index[var_name].size())
243  ": Requested component ",
244  comp,
245  " of coupled value ",
246  var_name,
247  " is out of range.");
248  return _optional_var_index[var_name][comp];
249  }
250 
251  MooseVariableFEBase * var = getFEVar(var_name, comp);
252  switch (var->kind())
253  {
255  return var->number();
257  return std::numeric_limits<unsigned int>::max() - var->number();
258  default:
259  mooseError(_c_name, ": Unknown variable kind. Corrupted binary?");
260  }
261 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
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:131
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
Moose::VarKindType kind() const
Kind of the variable (Nonlinear, Auxiliary, ...)
std::map< std::string, std::vector< unsigned int > > _optional_var_index
Unique indices for optionally coupled vars that weren&#39;t provided.
Definition: Coupleable.h:767
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
MooseVariableFEBase * getFEVar(const std::string &var_name, unsigned int comp)
Extract pointer to a base finite element coupled variable.
Definition: Coupleable.C:186

◆ coupledCallback()

void Coupleable::coupledCallback ( const std::string &  var_name,
bool  is_old 
)
protectedvirtualinherited

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

Referenced by NodalEqualValueConstraint::NodalEqualValueConstraint(), SphericalAverage::SphericalAverage(), and VolumeHistogram::VolumeHistogram().

154 {
155  if (isCoupled(var_name))
156  return _coupled_vars[var_name].size();
157  else
158  {
160  return _c_parameters.numberDefaultCoupledValues(var_name);
161  else
162  return 0;
163  }
164 }
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:131
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
std::map< std::string, std::vector< MooseVariableFEBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:610
const InputParameters & _c_parameters
Definition: Coupleable.h:601

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

1078 {
1079  if (!isCoupled(var_name)) // Return default 0
1080  return _default_vector_curl;
1081 
1082  coupledCallback(var_name, false);
1083  if (_c_nodal)
1084  mooseError("Nodal variables do not have curls");
1085 
1086  VectorMooseVariable * var = getVectorVar(var_name, comp);
1087  if (var == NULL)
1088  mooseError("Call corresponding scalar field variable method");
1089 
1090  if (!_coupleable_neighbor)
1091  return (_c_is_implicit) ? var->curlSln() : var->curlSlnOld();
1092  else
1093  return (_c_is_implicit) ? var->curlSlnNeighbor() : var->curlSlnOldNeighbor();
1094 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:684
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
const FieldVariableValue & curlSln()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableCurl & curlSlnOldNeighbor()
const FieldVariableValue & curlSlnOld()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableCurl & curlSlnNeighbor()
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:726

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

1098 {
1099  if (!isCoupled(var_name)) // Return default 0
1100  return _default_vector_curl;
1101 
1102  coupledCallback(var_name, true);
1103  if (_c_nodal)
1104  mooseError("Nodal variables do not have curls");
1105 
1106  validateExecutionerType(var_name, "coupledCurlOld");
1107  VectorMooseVariable * var = getVectorVar(var_name, comp);
1108  if (var == NULL)
1109  mooseError("Call corresponding scalar field variable method");
1110 
1111  if (!_coupleable_neighbor)
1112  return (_c_is_implicit) ? var->curlSlnOld() : var->curlSlnOlder();
1113  else
1114  return (_c_is_implicit) ? var->curlSlnOldNeighbor() : var->curlSlnOlderNeighbor();
1115 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:684
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableCurl & curlSlnOldNeighbor()
const FieldVariableValue & curlSlnOld()
const FieldVariableValue & curlSlnOlder()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
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:726
const FieldVariableCurl & curlSlnOlderNeighbor()

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

1119 {
1120  if (!isCoupled(var_name)) // Return default 0
1121  return _default_vector_curl;
1122 
1123  coupledCallback(var_name, true);
1124  if (_c_nodal)
1125  mooseError("Nodal variables do not have curls");
1126 
1127  validateExecutionerType(var_name, "coupledCurlOlder");
1128  VectorMooseVariable * var = getVectorVar(var_name, comp);
1129  if (var == NULL)
1130  mooseError("Call corresponding scalar field variable method");
1131 
1132  if (_c_is_implicit)
1133  {
1134  if (!_coupleable_neighbor)
1135  return var->curlSlnOlder();
1136  else
1137  return var->curlSlnOlderNeighbor();
1138  }
1139  else
1140  mooseError("Older values not available for explicit schemes");
1141 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:684
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & curlSlnOlder()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
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:726
const FieldVariableCurl & curlSlnOlderNeighbor()

◆ 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 AuxKernel.

Definition at line 585 of file Coupleable.C.

Referenced by AuxKernel::coupledDot().

586 {
587  checkVar(var_name);
588  if (!isCoupled(var_name)) // Return default 0
589  return _default_value_zero;
590 
591  validateExecutionerType(var_name, "coupledDot");
592  MooseVariable * var = getVar(var_name, comp);
593  if (var == NULL)
594  mooseError("Call corresponding vector variable method");
595 
597  {
598  if (_c_nodal)
599  return var->dofValuesDot();
600  else
601  return var->uDot();
602  }
603  else
604  {
605  if (_c_nodal)
606  return var->dofValuesDotNeighbor();
607  else
608  return var->uDotNeighbor();
609  }
610 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const MooseArray< Number > & dofValuesDot() override
Returns time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
const MooseArray< Number > & dofValuesDotNeighbor() override
Returns time derivative of neighboring degrees of freedom.
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:726
const FieldVariableValue & uDot()
const FieldVariableValue & uDotNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

614 {
615  checkVar(var_name);
616  if (!isCoupled(var_name)) // Return default 0
617  return _default_value_zero;
618 
619  validateExecutionerType(var_name, "coupledDotDot");
620  MooseVariable * var = getVar(var_name, comp);
621  if (var == NULL)
622  mooseError("Call corresponding vector variable method");
623 
625  {
626  if (_c_nodal)
627  return var->dofValuesDotDot();
628  else
629  return var->uDotDot();
630  }
631  else
632  {
633  if (_c_nodal)
634  return var->dofValuesDotDotNeighbor();
635  else
636  return var->uDotDotNeighbor();
637  }
638 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableValue & uDotDotNeighbor()
const MooseArray< Number > & dofValuesDotDot() override
Returns second time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
const MooseArray< Number > & dofValuesDotDotNeighbor() override
Returns second time derivative of neighboring degrees of freedom.
const FieldVariableValue & uDotDot()
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

846 {
847  checkVar(var_name);
848  if (!isCoupled(var_name)) // Return default 0
849  return _default_value_zero;
850 
851  validateExecutionerType(var_name, "coupledDotDotDu");
852  MooseVariable * var = getVar(var_name, comp);
853  if (var == NULL)
854  mooseError("Call corresponding vector variable method");
855 
857  {
858  if (_c_nodal)
859  return var->dofValuesDuDotDotDu();
860  else
861  return var->duDotDotDu();
862  }
863  else
864  {
865  if (_c_nodal)
866  return var->dofValuesDuDotDotDuNeighbor();
867  else
868  return var->duDotDotDu();
869  }
870 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
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:726
const MooseArray< Number > & dofValuesDuDotDotDu() override
Returns derivative of second time derivative of degrees of freedom.
const MooseArray< Number > & dofValuesDuDotDotDuNeighbor() override
Returns derivative of second time derivative of neighboring degrees of freedom.
const VariableValue & duDotDotDu()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

670 {
671  checkVar(var_name);
672  if (!isCoupled(var_name)) // Return default 0
673  return _default_value_zero;
674 
675  validateExecutionerType(var_name, "coupledDotDotOld");
676  MooseVariable * var = getVar(var_name, comp);
677  if (var == NULL)
678  mooseError("Call corresponding vector variable method");
679 
681  {
682  if (_c_nodal)
683  return var->dofValuesDotDotOld();
684  else
685  return var->uDotDotOld();
686  }
687  else
688  {
689  if (_c_nodal)
690  return var->dofValuesDotDotOldNeighbor();
691  else
692  return var->uDotDotOldNeighbor();
693  }
694 }
const MooseArray< Number > & dofValuesDotDotOldNeighbor() override
Returns old second time derivative of neighboring degrees of freedom.
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableValue & uDotDotOldNeighbor()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const MooseArray< Number > & dofValuesDotDotOld() override
Returns old second time derivative of degrees of freedom.
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:131
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:726
const FieldVariableValue & uDotDotOld()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ 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 AuxKernel.

Definition at line 817 of file Coupleable.C.

Referenced by AuxKernel::coupledDotDu().

818 {
819  checkVar(var_name);
820  if (!isCoupled(var_name)) // Return default 0
821  return _default_value_zero;
822 
823  validateExecutionerType(var_name, "coupledDotDu");
824  MooseVariable * var = getVar(var_name, comp);
825  if (var == NULL)
826  mooseError("Call corresponding vector variable method");
827 
829  {
830  if (_c_nodal)
831  return var->dofValuesDuDotDu();
832  else
833  return var->duDotDu();
834  }
835  else
836  {
837  if (_c_nodal)
838  return var->dofValuesDuDotDuNeighbor();
839  else
840  return var->duDotDuNeighbor();
841  }
842 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const VariableValue & duDotDu()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
const MooseArray< Number > & dofValuesDuDotDu() override
Returns derivative of time derivative of degrees of freedom.
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:726
const MooseArray< Number > & dofValuesDuDotDuNeighbor() override
Returns derivative of time derivative of neighboring degrees of freedom.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const VariableValue & duDotDuNeighbor()

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

642 {
643  checkVar(var_name);
644  if (!isCoupled(var_name)) // Return default 0
645  return _default_value_zero;
646 
647  validateExecutionerType(var_name, "coupledDotOld");
648  MooseVariable * var = getVar(var_name, comp);
649  if (var == NULL)
650  mooseError("Call corresponding vector variable method");
651 
653  {
654  if (_c_nodal)
655  return var->dofValuesDotOld();
656  else
657  return var->uDotOld();
658  }
659  else
660  {
661  if (_c_nodal)
662  return var->dofValuesDotOldNeighbor();
663  else
664  return var->uDotOldNeighbor();
665  }
666 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const MooseArray< Number > & dofValuesDotOld() override
Returns old time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
const MooseArray< Number > & dofValuesDotOldNeighbor() override
Returns old time derivative of neighboring degrees of freedom.
const FieldVariableValue & uDotOldNeighbor()
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableValue & uDotOld()

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

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

874 {
875  checkVar(var_name);
876  if (!isCoupled(var_name)) // Return default 0
877  return _default_gradient;
878 
879  coupledCallback(var_name, false);
880  if (_c_nodal)
881  mooseError(_c_name, ": Nodal variables do not have gradients");
882 
883  MooseVariable * var = getVar(var_name, comp);
884  if (var == NULL)
885  mooseError("Call corresponding vector variable method");
886 
888  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
889  else
890  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
891 }
const FieldVariableGradient & gradSlnOld()
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableGradient & gradSln()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableGradient & gradSlnNeighbor()
const FieldVariableGradient & gradSlnOldNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:646
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

966 {
967  checkVar(var_name);
968  if (!isCoupled(var_name)) // Return default 0
969  return _default_gradient;
970 
971  coupledCallback(var_name, false);
972  if (_c_nodal)
973  mooseError(_c_name, ": Nodal variables do not have gradients");
974 
975  MooseVariable * var = getVar(var_name, comp);
976  if (var == NULL)
977  mooseError("Call corresponding vector variable method");
978 
980  return var->gradSlnDot();
981  else
982  return var->gradSlnNeighborDot();
983 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const FieldVariableGradient & gradSlnNeighborDot()
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:131
const FieldVariableGradient & gradSlnDot()
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:646
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

987 {
988  checkVar(var_name);
989  if (!isCoupled(var_name)) // Return default 0
990  return _default_gradient;
991 
992  coupledCallback(var_name, false);
993  if (_c_nodal)
994  mooseError(_c_name, ": Nodal variables do not have gradients");
995 
996  MooseVariable * var = getVar(var_name, comp);
997  if (var == NULL)
998  mooseError("Call corresponding vector variable method");
999 
1000  if (!_coupleable_neighbor)
1001  return var->gradSlnDotDot();
1002  else
1003  return var->gradSlnNeighborDotDot();
1004 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableGradient & gradSlnDotDot()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:646
const FieldVariableGradient & gradSlnNeighborDotDot()
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

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

895 {
896  checkVar(var_name);
897  if (!isCoupled(var_name)) // Return default 0
898  return _default_gradient;
899 
900  coupledCallback(var_name, true);
901  if (_c_nodal)
902  mooseError(_c_name, ": Nodal compute objects do not support gradients");
903 
904  validateExecutionerType(var_name, "coupledGradientOld");
905  MooseVariable * var = getVar(var_name, comp);
906  if (var == NULL)
907  mooseError("Call corresponding vector variable method");
908 
910  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
911  else
912  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
913 }
const FieldVariableGradient & gradSlnOld()
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableGradient & gradSlnOlder()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableGradient & gradSlnOlderNeighbor()
const FieldVariableGradient & gradSlnOldNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:646
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

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

917 {
918  checkVar(var_name);
919  if (!isCoupled(var_name)) // Return default 0
920  return _default_gradient;
921 
922  coupledCallback(var_name, true);
923  if (_c_nodal)
924  mooseError(_c_name, ": Nodal compute objects do not support gradients");
925 
926  validateExecutionerType(var_name, "coupledGradientOlder");
927  MooseVariable * var = getVar(var_name, comp);
928  if (var == NULL)
929  mooseError("Call corresponding vector variable method");
930 
931  if (_c_is_implicit)
932  {
934  return var->gradSlnOlder();
935  else
936  return var->gradSlnOlderNeighbor();
937  }
938  else
939  mooseError(_c_name, ": Older values not available for explicit schemes");
940 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableGradient & gradSlnOlder()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableGradient & gradSlnOlderNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:646
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

944 {
945  checkVar(var_name);
946  if (!isCoupled(var_name)) // Return default 0
947  return _default_gradient;
948 
950  coupledCallback(var_name, true);
951  if (_c_nodal)
952  mooseError(_c_name, ": Nodal compute objects do not support gradients");
953 
954  MooseVariable * var = getVar(var_name, comp);
955  if (var == NULL)
956  mooseError("Call corresponding vector variable method");
957 
959  return var->gradSlnPreviousNL();
960  else
961  return var->gradSlnPreviousNLNeighbor();
962 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:607
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableGradient & gradSlnPreviousNLNeighbor()
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:646
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:604
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:726
const FieldVariableGradient & gradSlnPreviousNL()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledMatrixTagScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 162 of file ScalarCoupleable.C.

165 {
166  checkVar(var_name);
167  if (!isCoupledScalar(var_name, comp))
168  return *getDefaultValue(var_name);
169 
171 
172  MooseVariableScalar * var = getScalarVar(var_name, comp);
173  return var->matrixTagSln(tag);
174 }
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
VariableValue & matrixTagSln(TagID tag)
Class for scalar variables (they are different).
void addScalarVariableCoupleableMatrixTag(TagID tag)

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

354 {
355  checkVar(var_name);
356  if (!isCoupled(var_name))
357  mooseError(var_name, ": invalid variable name for coupledMatrixTagValue");
358 
360 
361  coupledCallback(var_name, false);
362  MooseVariable * var = getVar(var_name, comp);
363  if (var == NULL)
364  mooseError("Call coupledVectorValue for coupled vector variables");
365 
366  if (_c_nodal)
367  return var->nodalMatrixTagValue(tag);
368  else
369  return var->matrixTagValue(tag);
370 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableValue & matrixTagValue(TagID tag)
void addFEVariableCoupleableMatrixTag(TagID tag)
Definition: Coupleable.h:89
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const MooseArray< Real > & nodalMatrixTagValue(TagID tag)

◆ coupledNodalDot()

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

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

1328 {
1329  checkVar(var_name);
1330  if (!isCoupled(var_name)) // Return default 0
1331  return _default_value_zero;
1332 
1333  validateExecutionerType(var_name, "coupledNodalDot");
1334  coupledCallback(var_name, false);
1335  MooseVariable * var = getVar(var_name, comp);
1336  if (var == NULL)
1337  mooseError("Call corresponding vector variable method");
1338 
1339  if (!_coupleable_neighbor)
1340  return var->dofValuesDot();
1341  else
1342  return var->dofValuesDotNeighbor();
1343 }
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:1468
const MooseArray< Number > & dofValuesDot() override
Returns time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesDotNeighbor() override
Returns time derivative of neighboring degrees of freedom.
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

1347 {
1348  checkVar(var_name);
1349  if (!isCoupled(var_name)) // Return default 0
1350  return _default_value_zero;
1351 
1352  validateExecutionerType(var_name, "coupledNodalDotDot");
1353  coupledCallback(var_name, false);
1354  MooseVariable * var = getVar(var_name, comp);
1355  if (var == NULL)
1356  mooseError("Call corresponding vector variable method");
1357 
1358  if (!_coupleable_neighbor)
1359  return var->dofValuesDotDot();
1360  else
1361  return var->dofValuesDotDotNeighbor();
1362 }
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:1468
const MooseArray< Number > & dofValuesDotDot() override
Returns second time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesDotDotNeighbor() override
Returns second time derivative of neighboring degrees of freedom.
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

1385 {
1386  checkVar(var_name);
1387  if (!isCoupled(var_name)) // Return default 0
1388  return _default_value_zero;
1389 
1390  validateExecutionerType(var_name, "coupledNodalDotDotOld");
1391  coupledCallback(var_name, false);
1392  MooseVariable * var = getVar(var_name, comp);
1393  if (var == NULL)
1394  mooseError("Call corresponding vector variable method");
1395 
1396  if (!_coupleable_neighbor)
1397  return var->dofValuesDotDotOld();
1398  else
1399  return var->dofValuesDotDotOldNeighbor();
1400 }
const MooseArray< Number > & dofValuesDotDotOldNeighbor() override
Returns old second time derivative of neighboring degrees of freedom.
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:1468
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const MooseArray< Number > & dofValuesDotDotOld() override
Returns old second time derivative of degrees of freedom.
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

1366 {
1367  checkVar(var_name);
1368  if (!isCoupled(var_name)) // Return default 0
1369  return _default_value_zero;
1370 
1371  validateExecutionerType(var_name, "coupledNodalDotOld");
1372  coupledCallback(var_name, false);
1373  MooseVariable * var = getVar(var_name, comp);
1374  if (var == NULL)
1375  mooseError("Call corresponding vector variable method");
1376 
1377  if (!_coupleable_neighbor)
1378  return var->dofValuesDotOld();
1379  else
1380  return var->dofValuesDotOldNeighbor();
1381 }
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:1468
const MooseArray< Number > & dofValuesDotOld() override
Returns old time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesDotOldNeighbor() override
Returns old time derivative of neighboring degrees of freedom.
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalValue()

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

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

1234 {
1235  checkVar(var_name);
1236  if (!isCoupled(var_name))
1237  return *getDefaultValue(var_name, comp);
1238 
1239  coupledCallback(var_name, false);
1240  MooseVariable * var = getVar(var_name, comp);
1241  if (var == NULL)
1242  mooseError("Call corresponding vector variable method");
1243  if (!var->isNodal())
1245  ": Trying to get nodal values of variable '",
1246  var->name(),
1247  "', but it is not nodal.");
1248 
1249  if (!_coupleable_neighbor)
1250  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
1251  else
1252  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
1253 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesOld() override
Returns old dof solution on element.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
const MooseArray< Number > & dofValuesNeighbor() override
Returns dof solution on neighbor element.
const std::string & name() const
Get the variable name.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const MooseArray< Number > & dofValues() override
Returns dof solution on element.

◆ coupledNodalValueOld()

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

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

1257 {
1258  checkVar(var_name);
1259  if (!isCoupled(var_name))
1260  return *getDefaultValue(var_name, comp);
1261 
1262  validateExecutionerType(var_name, "coupledNodalValueOld");
1263  coupledCallback(var_name, true);
1264  MooseVariable * var = getVar(var_name, comp);
1265  if (var == NULL)
1266  mooseError("Call corresponding vector variable method");
1267  if (!var->isNodal())
1269  ": Trying to get old nodal values of variable '",
1270  var->name(),
1271  "', but it is not nodal.");
1272 
1273  if (!_coupleable_neighbor)
1274  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1275  else
1276  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1277 }
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:1468
const MooseArray< Number > & dofValuesOlder() override
Returns older dof solution on element.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesOld() override
Returns old dof solution on element.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
const std::string & name() const
Get the variable name.
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalValueOlder()

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

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

1281 {
1282  checkVar(var_name);
1283  if (!isCoupled(var_name))
1284  return *getDefaultValue(var_name, comp);
1285 
1286  validateExecutionerType(var_name, "coupledNodalValueOlder");
1287  coupledCallback(var_name, true);
1288  MooseVariable * var = getVar(var_name, comp);
1289  if (var == NULL)
1290  mooseError("Call corresponding vector variable method");
1291  if (!var->isNodal())
1293  ": Trying to get older nodal values of variable '",
1294  var->name(),
1295  "', but it is not nodal.");
1296  if (_c_is_implicit)
1297  {
1298  if (!_coupleable_neighbor)
1299  return var->dofValuesOlder();
1300  else
1301  return var->dofValuesOlderNeighbor();
1302  }
1303  else
1304  mooseError(_c_name, ": Older values not available for explicit schemes");
1305 }
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:1468
const MooseArray< Number > & dofValuesOlder() override
Returns older dof solution on element.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
const std::string & name() const
Get the variable name.
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalValuePreviousNL()

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

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

1309 {
1310  checkVar(var_name);
1311  if (!isCoupled(var_name))
1312  return *getDefaultValue(var_name, comp);
1313 
1315  coupledCallback(var_name, true);
1316  MooseVariable * var = getVar(var_name, comp);
1317  if (var == NULL)
1318  mooseError("Call corresponding vector variable method");
1319 
1320  if (!_coupleable_neighbor)
1321  return var->dofValuesPreviousNL();
1322  else
1323  return var->dofValuesPreviousNLNeighbor();
1324 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:607
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:131
const MooseArray< Number > & dofValuesPreviousNL() override
Returns previous nl solution on element.
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
const MooseArray< Number > & dofValuesPreviousNLNeighbor() override
Returns previous nl solution on neighbor element.
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledScalar()

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

Returns the index for a scalar coupled variable by name.

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

Definition at line 105 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

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

◆ coupledScalarComponents()

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

Return the number of components to the coupled scalar variable.

Parameters
var_nameThe of the coupled variable

Definition at line 304 of file ScalarCoupleable.C.

305 {
306  return _coupled_scalar_vars[var_name].size();
307 }
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.

◆ coupledScalarDot()

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

Returns the time derivative of a scalar coupled variable.

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

Definition at line 204 of file ScalarCoupleable.C.

205 {
206  checkVar(var_name);
207  validateExecutionerType(var_name, "coupledScalarDot");
208  MooseVariableScalar * var = getScalarVar(var_name, comp);
209  return var->uDot();
210 }
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
VariableValue & uDot()
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Class for scalar variables (they are different).

◆ coupledScalarDotDot()

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

Returns the second time derivative of a scalar coupled variable.

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

Definition at line 213 of file ScalarCoupleable.C.

214 {
215  checkVar(var_name);
216  validateExecutionerType(var_name, "coupledScalarDotDot");
217  MooseVariableScalar * var = getScalarVar(var_name, comp);
218  return var->uDotDot();
219 }
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Class for scalar variables (they are different).
VariableValue & uDotDot()

◆ coupledScalarDotDotDu()

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

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

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

Definition at line 248 of file ScalarCoupleable.C.

249 {
250  checkVar(var_name);
251  validateExecutionerType(var_name, "coupledScalarDotDotDu");
252  MooseVariableScalar * var = getScalarVar(var_name, comp);
253  return var->duDotDotDu();
254 }
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
VariableValue & duDotDotDu()
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Class for scalar variables (they are different).

◆ coupledScalarDotDotOld()

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

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

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

Definition at line 231 of file ScalarCoupleable.C.

232 {
233  checkVar(var_name);
234  validateExecutionerType(var_name, "coupledScalarDotDotOld");
235  MooseVariableScalar * var = getScalarVar(var_name, comp);
236  return var->uDotDotOld();
237 }
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
VariableValue & uDotDotOld()
Class for scalar variables (they are different).

◆ coupledScalarDotDu()

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

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

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

Definition at line 239 of file ScalarCoupleable.C.

240 {
241  checkVar(var_name);
242  validateExecutionerType(var_name, "coupledScalarDotDu");
243  MooseVariableScalar * var = getScalarVar(var_name, comp);
244  return var->duDotDu();
245 }
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
VariableValue & duDotDu()
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Class for scalar variables (they are different).

◆ coupledScalarDotOld()

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

Returns the old time derivative of a scalar coupled variable.

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

Definition at line 222 of file ScalarCoupleable.C.

223 {
224  checkVar(var_name);
225  validateExecutionerType(var_name, "coupledScalarDotOld");
226  MooseVariableScalar * var = getScalarVar(var_name, comp);
227  return var->uDotOld();
228 }
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Class for scalar variables (they are different).
VariableValue & uDotOld()

◆ coupledScalarOrder()

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

Returns the order for a scalar coupled variable by name.

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

Definition at line 112 of file ScalarCoupleable.C.

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

◆ coupledScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 136 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

137 {
138  checkVar(var_name);
139  if (!isCoupledScalar(var_name, comp))
140  return *getDefaultValue(var_name);
141 
142  MooseVariableScalar * var = getScalarVar(var_name, comp);
143  return (_sc_is_implicit) ? var->sln() : var->slnOld();
144 }
VariableValue & sln()
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
bool _sc_is_implicit
True if implicit value is required.
Class for scalar variables (they are different).
VariableValue & slnOld()

◆ coupledScalarValueOld()

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

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

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

Definition at line 177 of file ScalarCoupleable.C.

178 {
179  checkVar(var_name);
180  if (!isCoupledScalar(var_name, comp))
181  return *getDefaultValue(var_name);
182 
183  validateExecutionerType(var_name, "coupledScalarValueOld");
184  MooseVariableScalar * var = getScalarVar(var_name, comp);
185  return (_sc_is_implicit) ? var->slnOld() : var->slnOlder();
186 }
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
bool _sc_is_implicit
True if implicit value is required.
Class for scalar variables (they are different).
VariableValue & slnOlder()
VariableValue & slnOld()

◆ coupledScalarValueOlder()

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

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

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

Definition at line 189 of file ScalarCoupleable.C.

190 {
191  checkVar(var_name);
192  if (!isCoupledScalar(var_name, comp))
193  return *getDefaultValue(var_name);
194 
195  validateExecutionerType(var_name, "coupledScalarValueOlder");
196  MooseVariableScalar * var = getScalarVar(var_name, comp);
197  if (_sc_is_implicit)
198  return var->slnOlder();
199  else
200  mooseError("Older values not available for explicit schemes");
201 }
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
bool _sc_is_implicit
True if implicit value is required.
Class for scalar variables (they are different).
VariableValue & slnOlder()

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

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

1145 {
1146  checkVar(var_name);
1147  if (!isCoupled(var_name)) // Return default 0
1148  return _default_second;
1149 
1150  coupledCallback(var_name, false);
1151  if (_c_nodal)
1152  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1153 
1154  MooseVariable * var = getVar(var_name, comp);
1155  if (var == NULL)
1156  mooseError("Call corresponding vector variable method");
1157 
1158  if (!_coupleable_neighbor)
1159  return (_c_is_implicit) ? var->secondSln() : var->secondSlnOlder();
1160  else
1161  return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOlderNeighbor();
1162 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const FieldVariableSecond & secondSlnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:652
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
const FieldVariableSecond & secondSlnOlder()
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:726
const FieldVariableSecond & secondSlnNeighbor()
const FieldVariableSecond & secondSln()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

1166 {
1167  checkVar(var_name);
1168  if (!isCoupled(var_name)) // Return default 0
1169  return _default_second;
1170 
1171  coupledCallback(var_name, true);
1172  if (_c_nodal)
1173  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1174 
1175  validateExecutionerType(var_name, "coupledSecondOld");
1176  MooseVariable * var = getVar(var_name, comp);
1177  if (var == NULL)
1178  mooseError("Call corresponding vector variable method");
1179  if (!_coupleable_neighbor)
1180  return (_c_is_implicit) ? var->secondSlnOld() : var->secondSlnOlder();
1181  else
1182  return (_c_is_implicit) ? var->secondSlnOldNeighbor() : var->secondSlnOlderNeighbor();
1183 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const FieldVariableSecond & secondSlnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:652
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
const FieldVariableSecond & secondSlnOlder()
const FieldVariableSecond & secondSlnOld()
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:726
const FieldVariableSecond & secondSlnOldNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

1187 {
1188  checkVar(var_name);
1189  if (!isCoupled(var_name)) // Return default 0
1190  return _default_second;
1191 
1192  coupledCallback(var_name, true);
1193  if (_c_nodal)
1194  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1195 
1196  validateExecutionerType(var_name, "coupledSecondOlder");
1197  MooseVariable * var = getVar(var_name, comp);
1198  if (var == NULL)
1199  mooseError("Call corresponding vector variable method");
1200  if (_c_is_implicit)
1201  {
1202  if (!_coupleable_neighbor)
1203  return var->secondSlnOlder();
1204  else
1205  return var->secondSlnOlderNeighbor();
1206  }
1207  else
1208  mooseError(_c_name, ": Older values not available for explicit schemes");
1209 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const FieldVariableSecond & secondSlnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:652
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
const FieldVariableSecond & secondSlnOlder()
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

1213 {
1214  checkVar(var_name);
1215  if (!isCoupled(var_name)) // Return default 0
1216  return _default_second;
1217 
1219  coupledCallback(var_name, true);
1220  if (_c_nodal)
1221  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1222 
1223  MooseVariable * var = getVar(var_name, comp);
1224  if (var == NULL)
1225  mooseError("Call corresponding vector variable method");
1226  if (!_coupleable_neighbor)
1227  return var->secondSlnPreviousNL();
1228  else
1229  return var->secondSlnPreviousNLNeighbor();
1230 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:607
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:652
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:604
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:726
const FieldVariableSecond & secondSlnPreviousNLNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableSecond & secondSlnPreviousNL()

◆ coupledSolutionDoFs()

const DenseVector< Number > & Coupleable::coupledSolutionDoFs ( 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 DenseVector for the DoFs of the coupled variable

Definition at line 1402 of file Coupleable.C.

1403 {
1404  checkVar(var_name);
1405  // default coupling is not available for elemental solutions
1406  if (!isCoupled(var_name))
1407  mooseError(_c_name, ": invalid variable name for coupledSolutionDoFs");
1408 
1409  if (_c_nodal)
1410  mooseError(_c_name, ": nodal objects should not call coupledSolutionDoFs");
1411 
1412  coupledCallback(var_name, false);
1413  MooseVariableFEBase * var = getFEVar(var_name, comp);
1414 
1415  if (!_coupleable_neighbor)
1416  return (_c_is_implicit) ? var->solutionDoFs() : var->solutionDoFsOld();
1417  else
1418  return (_c_is_implicit) ? var->solutionDoFsNeighbor() : var->solutionDoFsOldNeighbor();
1419 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual const DenseVector< Number > & solutionDoFs()=0
virtual const DenseVector< Number > & solutionDoFsOldNeighbor()=0
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
virtual const DenseVector< Number > & solutionDoFsOld()=0
virtual const DenseVector< Number > & solutionDoFsNeighbor()=0
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
MooseVariableFEBase * getFEVar(const std::string &var_name, unsigned int comp)
Extract pointer to a base finite element coupled variable.
Definition: Coupleable.C:186

◆ coupledSolutionDoFsOld()

const DenseVector< Number > & Coupleable::coupledSolutionDoFsOld ( 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 DenseVector for the old DoFs of the coupled variable

Definition at line 1422 of file Coupleable.C.

1423 {
1424  checkVar(var_name);
1425  // default coupling is not available for elemental solutions
1426  if (!isCoupled(var_name))
1427  mooseError(_c_name, ": invalid variable name for coupledSolutionDoFsOld");
1428 
1429  if (_c_nodal)
1430  mooseError(_c_name, ": nodal objects should not call coupledSolutionDoFsOld");
1431 
1432  validateExecutionerType(var_name, "coupledSolutionDoFsOld");
1433  coupledCallback(var_name, true);
1434  MooseVariableFEBase * var = getFEVar(var_name, comp);
1435 
1436  if (!_coupleable_neighbor)
1437  return (_c_is_implicit) ? var->solutionDoFsOld() : var->solutionDoFsOlder();
1438  else
1440 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual const DenseVector< Number > & solutionDoFsOldNeighbor()=0
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
virtual const DenseVector< Number > & solutionDoFsOld()=0
virtual const DenseVector< Number > & solutionDoFsOlder()=0
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
virtual const DenseVector< Number > & solutionDoFsOlderNeighbor()=0
MooseVariableFEBase * getFEVar(const std::string &var_name, unsigned int comp)
Extract pointer to a base finite element coupled variable.
Definition: Coupleable.C:186

◆ coupledSolutionDoFsOlder()

const DenseVector< Number > & Coupleable::coupledSolutionDoFsOlder ( 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 DenseVector for the older DoFs of the coupled variable

Definition at line 1443 of file Coupleable.C.

1444 {
1445  checkVar(var_name);
1446  // default coupling is not available for elemental solutions
1447  if (!isCoupled(var_name))
1448  mooseError(_c_name, ": invalid variable name for coupledSolutionDoFsOlder");
1449 
1450  if (_c_nodal)
1451  mooseError(_c_name, ": nodal objects should not call coupledSolutionDoFsOlder");
1452 
1453  validateExecutionerType(var_name, "coupledSolutionDoFsOlder");
1454  coupledCallback(var_name, true);
1455  MooseVariableFEBase * var = getFEVar(var_name, comp);
1456  if (_c_is_implicit)
1457  {
1458  if (!_coupleable_neighbor)
1459  return var->solutionDoFsOlder();
1460  else
1461  return var->solutionDoFsOlderNeighbor();
1462  }
1463  else
1464  mooseError(_c_name, ": Older values not available for explicit schemes");
1465 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
virtual const DenseVector< Number > & solutionDoFsOlder()=0
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
virtual const DenseVector< Number > & solutionDoFsOlderNeighbor()=0
MooseVariableFEBase * getFEVar(const std::string &var_name, unsigned int comp)
Extract pointer to a base finite element coupled variable.
Definition: Coupleable.C:186

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

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

306 {
307  checkVar(var_name);
308  if (!isCoupled(var_name))
309  return *getDefaultValue(var_name, comp);
310 
311  coupledCallback(var_name, false);
312  MooseVariable * var = getVar(var_name, comp);
313  if (var == NULL)
314  mooseError("Call coupledVectorValue for coupled vector variables");
315 
317  {
318  if (_c_nodal)
319  return (_c_is_implicit) ? var->dofValues() : var->dofValuesOld();
320  else
321  return (_c_is_implicit) ? var->sln() : var->slnOld();
322  }
323  else
324  {
325  if (_c_nodal)
326  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
327  else
328  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
329  }
330 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableValue & sln()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOldNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
const FieldVariableValue & slnNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesOld() override
Returns old dof solution on element.
const FieldVariableValue & slnOld()
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:726
const MooseArray< Number > & dofValuesNeighbor() override
Returns dof solution on neighbor element.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const MooseArray< Number > & dofValues() override
Returns dof solution on element.

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

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

409 {
410  checkVar(var_name);
411  if (!isCoupled(var_name))
412  return *getDefaultValue(var_name, comp);
413 
414  validateExecutionerType(var_name, "coupledValueOld");
415  coupledCallback(var_name, true);
416  MooseVariable * var = getVar(var_name, comp);
417  if (var == NULL)
418  mooseError("Call coupledVectorValueOld for coupled vector variables");
419 
421  {
422  if (_c_nodal)
423  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
424  else
425  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
426  }
427  else
428  {
429  if (_c_nodal)
431  else
432  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
433  }
434 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const MooseArray< Number > & dofValuesOlder() override
Returns older dof solution on element.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOldNeighbor()
const FieldVariableValue & slnOlderNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesOld() override
Returns old dof solution on element.
const FieldVariableValue & slnOld()
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:726
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableValue & slnOlder()

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

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

438 {
439  checkVar(var_name);
440  if (!isCoupled(var_name))
441  return *getDefaultValue(var_name, comp);
442 
443  validateExecutionerType(var_name, "coupledValueOlder");
444  coupledCallback(var_name, true);
445  MooseVariable * var = getVar(var_name, comp);
446  if (var == NULL)
447  mooseError("Call coupledVectorValueOlder for coupled vector variables");
448 
450  {
451  if (_c_nodal)
452  {
453  if (_c_is_implicit)
454  return var->dofValuesOlder();
455  else
456  mooseError(_c_name, ": Older values not available for explicit schemes");
457  }
458  else
459  {
460  if (_c_is_implicit)
461  return var->slnOlder();
462  else
463  mooseError(_c_name, ": Older values not available for explicit schemes");
464  }
465  }
466  else
467  {
468  if (_c_nodal)
469  {
470  if (_c_is_implicit)
471  return var->dofValuesOlderNeighbor();
472  else
473  mooseError(_c_name, ": Older values not available for explicit schemes");
474  }
475  else
476  {
477  if (_c_is_implicit)
478  return var->slnOlderNeighbor();
479  else
480  mooseError(_c_name, ": Older values not available for explicit schemes");
481  }
482  }
483 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const MooseArray< Number > & dofValuesOlder() override
Returns older dof solution on element.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOlderNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
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:726
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableValue & slnOlder()

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

487 {
488  checkVar(var_name);
489  if (!isCoupled(var_name))
490  return *getDefaultValue(var_name, comp);
491 
493  coupledCallback(var_name, true);
494  MooseVariable * var = getVar(var_name, comp);
495  if (var == NULL)
496  mooseError("Call corresponding vector variable method");
497 
499  {
500  if (_c_nodal)
501  return var->dofValuesPreviousNL();
502  else
503  return var->slnPreviousNL();
504  }
505  else
506  {
507  if (_c_nodal)
508  return var->dofValuesPreviousNLNeighbor();
509  else
510  return var->slnPreviousNLNeighbor();
511  }
512 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnPreviousNLNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:264
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:607
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:131
const MooseArray< Number > & dofValuesPreviousNL() override
Returns previous nl solution on element.
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableValue & slnPreviousNL()
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
const MooseArray< Number > & dofValuesPreviousNLNeighbor() override
Returns previous nl solution on neighbor element.
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

698 {
699  checkVar(var_name);
700  if (!isCoupled(var_name)) // Return default 0
702 
703  validateExecutionerType(var_name, "coupledVectorDot");
704  VectorMooseVariable * var = getVectorVar(var_name, comp);
705  if (var == NULL)
706  mooseError("Call corresponding standard variable method");
707 
709  {
710  if (_c_nodal)
711  mooseError("Vector variables are not required to be continuous and so should not be used "
712  "with nodal compute objects");
713  else
714  return var->uDot();
715  }
716  else
717  {
718  if (_c_nodal)
719  mooseError("Vector variables are not required to be continuous and so should not be used "
720  "with nodal compute objects");
721  else
722  return var->uDotNeighbor();
723  }
724 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
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:131
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:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
const FieldVariableValue & uDot()
const FieldVariableValue & uDotNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

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

728 {
729  checkVar(var_name);
730  if (!isCoupled(var_name)) // Return default 0
732 
733  validateExecutionerType(var_name, "coupledVectorDotDot");
734  VectorMooseVariable * var = getVectorVar(var_name, comp);
735  if (var == NULL)
736  mooseError("Call corresponding standard variable method");
737 
739  {
740  if (_c_nodal)
741  mooseError("Vector variables are not required to be continuous and so should not be used "
742  "with nodal compute objects");
743  else
744  return var->uDotDot();
745  }
746  else
747  {
748  if (_c_nodal)
749  mooseError("Vector variables are not required to be continuous and so should not be used "
750  "with nodal compute objects");
751  else
752  return var->uDotDotNeighbor();
753  }
754 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
const FieldVariableValue & uDotDotNeighbor()
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
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:131
const FieldVariableValue & uDotDot()
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:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorDotDotOld()

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

Old second time derivative of a coupled vector variable.

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

Definition at line 787 of file Coupleable.C.

788 {
789  checkVar(var_name);
790  if (!isCoupled(var_name)) // Return default 0
792 
793  validateExecutionerType(var_name, "coupledVectorDotDotOld");
794  VectorMooseVariable * var = getVectorVar(var_name, comp);
795  if (var == NULL)
796  mooseError("Call corresponding standard variable method");
797 
799  {
800  if (_c_nodal)
801  mooseError("Vector variables are not required to be continuous and so should not be used "
802  "with nodal compute objects");
803  else
804  return var->uDotDotOld();
805  }
806  else
807  {
808  if (_c_nodal)
809  mooseError("Vector variables are not required to be continuous and so should not be used "
810  "with nodal compute objects");
811  else
812  return var->uDotDotOldNeighbor();
813  }
814 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableValue & uDotDotOldNeighbor()
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
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:131
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:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
const FieldVariableValue & uDotDotOld()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorDotOld()

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

Old time derivative of a coupled vector variable.

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

Definition at line 757 of file Coupleable.C.

758 {
759  checkVar(var_name);
760  if (!isCoupled(var_name)) // Return default 0
762 
763  validateExecutionerType(var_name, "coupledVectorDotOld");
764  VectorMooseVariable * var = getVectorVar(var_name, comp);
765  if (var == NULL)
766  mooseError("Call corresponding standard variable method");
767 
769  {
770  if (_c_nodal)
771  mooseError("Vector variables are not required to be continuous and so should not be used "
772  "with nodal compute objects");
773  else
774  return var->uDotOld();
775  }
776  else
777  {
778  if (_c_nodal)
779  mooseError("Vector variables are not required to be continuous and so should not be used "
780  "with nodal compute objects");
781  else
782  return var->uDotOldNeighbor();
783  }
784 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
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:131
const FieldVariableValue & uDotOldNeighbor()
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:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableValue & uDotOld()

◆ coupledVectorGradient()

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

Returns gradient of a coupled vector variable.

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

Definition at line 1007 of file Coupleable.C.

1008 {
1009  checkVar(var_name);
1010  if (!isCoupled(var_name)) // Return default 0
1011  return _default_vector_gradient;
1012 
1013  coupledCallback(var_name, false);
1014  if (_c_nodal)
1015  mooseError(_c_name, ": Gradients are non-sensical with nodal compute objects");
1016 
1017  VectorMooseVariable * var = getVectorVar(var_name, comp);
1018  if (var == NULL)
1019  mooseError("Call corresponding standard variable method");
1020 
1021  if (!_coupleable_neighbor)
1022  return (_c_is_implicit) ? var->gradSln() : var->gradSlnOld();
1023  else
1024  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
1025 }
const FieldVariableGradient & gradSlnOld()
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
const FieldVariableGradient & gradSln()
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableGradient & gradSlnNeighbor()
const FieldVariableGradient & gradSlnOldNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:681
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorGradientOld()

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

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

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

Definition at line 1028 of file Coupleable.C.

1029 {
1030  checkVar(var_name);
1031  if (!isCoupled(var_name)) // Return default 0
1032  return _default_vector_gradient;
1033 
1034  coupledCallback(var_name, true);
1035  if (_c_nodal)
1036  mooseError(_c_name, ": Gradients are non-sensical with nodal compute objects");
1037 
1038  validateExecutionerType(var_name, "coupledGradientOld");
1039  VectorMooseVariable * var = getVectorVar(var_name, comp);
1040  if (var == NULL)
1041  mooseError("Call corresponding standard variable method");
1042 
1043  if (!_coupleable_neighbor)
1044  return (_c_is_implicit) ? var->gradSlnOld() : var->gradSlnOlder();
1045  else
1046  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
1047 }
const FieldVariableGradient & gradSlnOld()
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableGradient & gradSlnOlder()
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableGradient & gradSlnOlderNeighbor()
const FieldVariableGradient & gradSlnOldNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:681
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorGradientOlder()

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

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

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

Definition at line 1050 of file Coupleable.C.

1051 {
1052  checkVar(var_name);
1053  if (!isCoupled(var_name)) // Return default 0
1054  return _default_vector_gradient;
1055 
1056  coupledCallback(var_name, true);
1057  if (_c_nodal)
1058  mooseError(_c_name, ": Gradients are non-sensical with nodal compute objects");
1059 
1060  validateExecutionerType(var_name, "coupledGradientOlder");
1061  VectorMooseVariable * var = getVectorVar(var_name, comp);
1062  if (var == NULL)
1063  mooseError("Call corresponding standard variable method");
1064 
1065  if (_c_is_implicit)
1066  {
1067  if (!_coupleable_neighbor)
1068  return var->gradSlnOlder();
1069  else
1070  return var->gradSlnOlderNeighbor();
1071  }
1072  else
1073  mooseError(_c_name, ": Older values not available for explicit schemes");
1074 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableGradient & gradSlnOlder()
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableGradient & gradSlnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:681
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:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorTagScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 147 of file ScalarCoupleable.C.

150 {
151  checkVar(var_name);
152  if (!isCoupledScalar(var_name, comp))
153  return *getDefaultValue(var_name);
154 
156 
157  MooseVariableScalar * var = getScalarVar(var_name, comp);
158  return var->vectorTagSln(tag);
159 }
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
void addScalarVariableCoupleableVectorTag(TagID tag)
Class for scalar variables (they are different).
VariableValue & vectorTagSln(TagID tag)

◆ coupledVectorTagValue()

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

Returns value of a coupled variable for a given tag.

Parameters
var_nameName of coupled variable
tagvector 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 333 of file Coupleable.C.

334 {
335  checkVar(var_name);
336  if (!isCoupled(var_name))
337  mooseError(var_name, ": invalid variable name for coupledVectorTagValue");
338 
340 
341  coupledCallback(var_name, false);
342  MooseVariable * var = getVar(var_name, comp);
343  if (var == NULL)
344  mooseError("Call coupledVectorValue for coupled vector variables");
345 
346  if (_c_nodal)
347  return var->nodalVectorTagValue(tag);
348  else
349  return var->vectorTagValue(tag);
350 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
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:131
const FieldVariableValue & vectorTagValue(TagID tag)
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
void addFEVariableCoupleableVectorTag(TagID tag)
Definition: Coupleable.h:87
const MooseArray< Real > & nodalVectorTagValue(TagID tag)
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorValue()

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

Returns value of a coupled vector variable.

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

Definition at line 373 of file Coupleable.C.

374 {
375  if (!isCoupled(var_name))
376  return *getVectorDefaultValue(var_name);
377 
378  coupledCallback(var_name, false);
379  VectorMooseVariable * var = getVectorVar(var_name, comp);
380  if (var == NULL)
381  mooseError("Call coupledValue for coupled regular variables");
382 
384  {
385  if (_c_nodal)
386  mooseError("Vector variables are not required to be continuous and so should not be used "
387  "with nodal compute objects");
388  else
389  return (_c_is_implicit) ? var->sln() : var->slnOld();
390  }
391  else
392  {
393  if (_c_nodal)
394  mooseError("Vector variables are not required to be continuous and so should not be used "
395  "with nodal compute objects");
396  else
397  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
398  }
399 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
VectorVariableValue * getVectorDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled vector variable...
Definition: Coupleable.C:291
Class for stuff related to variables.
Definition: Adaptivity.h:30
const FieldVariableValue & sln()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOldNeighbor()
const FieldVariableValue & slnNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableValue & slnOld()
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:726

◆ coupledVectorValueOld()

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

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

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

Definition at line 515 of file Coupleable.C.

516 {
517  if (!isCoupled(var_name))
518  return *getVectorDefaultValue(var_name);
519 
520  validateExecutionerType(var_name, "coupledVectorValueOld");
521  coupledCallback(var_name, true);
522  VectorMooseVariable * var = getVectorVar(var_name, comp);
523  if (var == NULL)
524  mooseError("Call coupledValueOld for coupled scalar field variables");
525 
527  {
528  if (_c_nodal)
529  mooseError("Vector variables are not required to be continuous and so should not be used "
530  "with nodal compute objects");
531  else
532  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
533  }
534  else
535  {
536  if (_c_nodal)
537  mooseError("Vector variables are not required to be continuous and so should not be used "
538  "with nodal compute objects");
539  else
540  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
541  }
542 }
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:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
VectorVariableValue * getVectorDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled vector variable...
Definition: Coupleable.C:291
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOldNeighbor()
const FieldVariableValue & slnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
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:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableValue & slnOld()
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:726
const FieldVariableValue & slnOlder()

◆ coupledVectorValueOlder()

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

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

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

Definition at line 545 of file Coupleable.C.

546 {
547  if (!isCoup