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

A postprocessor for collecting the nodal min or max value. More...

#include <ElementExtremeValue.h>

Inheritance diagram for ElementExtremeValue:
[legend]

Public Types

enum  ExtremeType { MAX, MIN }
 Type of extreme value we are going to compute. More...
 

Public Member Functions

 ElementExtremeValue (const InputParameters &parameters)
 Class constructor. More...
 
virtual void initialize () override
 Called before execute() is ever called so that data can be cleared. More...
 
virtual Real getValue () override
 This will get called to actually grab the final value the postprocessor has calculated. More...
 
virtual void threadJoin (const UserObject &y) override
 Must override. More...
 
virtual void execute () override
 Execute method. More...
 
virtual void finalize () override
 This is called after execute() and after threadJoin()! This is probably where you want to do MPI communication! Finalize is not required for Postprocessor implementations since work may be done in getValue(). More...
 
virtual void load (std::ifstream &stream)
 Load user data object from a stream. More...
 
virtual void store (std::ofstream &stream)
 Store user data object to a stream. More...
 
SubProblemgetSubProblem () const
 Returns a reference to the subproblem that this postprocessor is tied to. More...
 
bool shouldDuplicateInitialExecution () const
 Returns whether or not this user object should be executed twice during the initial condition when depended upon by an IC. More...
 
virtual Real spatialValue (const Point &) const
 Optional interface function for "evaluating" a UserObject at a spatial position. More...
 
template<typename T >
void gatherSum (T &value)
 Gather the parallel sum of the variable passed in. More...
 
template<typename T >
void gatherMax (T &value)
 
template<typename T >
void gatherMin (T &value)
 
template<typename T1 , typename T2 >
void gatherProxyValueMax (T1 &value, T2 &proxy)
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
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 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...
 
virtual void meshChanged ()
 Called on this object when the mesh changes. More...
 
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::vector< SubdomainName > & blocks () const
 Return the block names for this object. More...
 
unsigned int numBlocks () const
 Return the number of blocks for this object. More...
 
virtual const std::set< SubdomainID > & blockIDs () const
 Return the block subdomain ids for this object. More...
 
bool hasBlocks (const SubdomainName &name) const
 Test if the supplied block name is valid for this object. More...
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 Test if the supplied vector of block names are valid for this object. More...
 
bool hasBlocks (const SubdomainID &id) const
 Test if the supplied block ids are valid for this object. More...
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 Test if the supplied vector block ids are valid for this object. More...
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 Test if the supplied set of block ids are valid for this object. More...
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects. More...
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects. More...
 
template<typename T >
bool hasBlockMaterialProperty (const std::string &prop_name)
 Check if a material property is valid for all blocks of this object. More...
 
const std::set< SubdomainID > & meshBlockIDs () const
 Return all of the SubdomainIDs for the mesh. More...
 
virtual bool blockRestricted () const
 Returns true if this object has been restricted to a boundary. More...
 
void checkVariable (const MooseVariableFEBase &variable) const
 Helper for checking that the ids for this object are in agreement with the variables on the supplied variable. More...
 
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)
 
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...
 
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::set< MooseVariableFEBase * > & getMooseVariableDependencies () const
 Retrieve the set of MooseVariableFEBases that this object depends on. More...
 
bool isImplicit ()
 
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)
 
std::string PPName ()
 Returns the name of the Postprocessor. More...
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 Builds hide lists for output objects NOT listed in the 'outputs' parameter. More...
 
const std::set< OutputName > & getOutputs ()
 Get the list of output objects that this class is restricted. More...
 
MooseVariableFE< Real > * mooseVariable () const
 Get the variable that this object is using. 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 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 void computeQpValue () override
 Get the extreme value at each quadrature point. 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 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...
 
VariableValuegetDefaultValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default value for an uncoupled variable. 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...
 
MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a scalar coupled 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...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty. More...
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 An initialization routine needed for dual constructors. More...
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 Check if the blocks this object operates on all have the same coordinate system, and if so return it. More...
 
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...
 
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...
 
template<ComputeStage compute_stage>
const VariableValueType< compute_stage >::typeadZeroTemplate ()
 Template method that returns _zero to RESIDUAL computing objects and _ad_zero to JACOBIAN computing objects. More...
 
template<>
const VariableValueType< JACOBIAN >::typeadZeroTemplate ()
 
template<>
const VariableValueType< JACOBIAN >::typeadZeroTemplate ()
 
template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::typeadGradZeroTemplate ()
 Template method that returns _grad_zero to RESIDUAL computing objects and _ad_grad_zero to JACOBIAN computing objects. More...
 
template<>
const VariableGradientType< JACOBIAN >::typeadGradZeroTemplate ()
 
template<>
const VariableGradientType< JACOBIAN >::typeadGradZeroTemplate ()
 
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 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)
 
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 OutputTools< Real >::VariableValuevalue ()
 The value of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableValuevalueOld ()
 The old value of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableValuevalueOlder ()
 The older value of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableValuedot ()
 The time derivative of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableValuedotDot ()
 The second time derivative of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableValuedotOld ()
 The old time derivative of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableValuedotDotOld ()
 The old second time derivative of the variable this object is operating on. More...
 
virtual const VariableValuedotDu ()
 The derivative of the time derivative of the variable this object is operating on with respect to this variable's coefficients. More...
 
virtual const VariableValuedotDotDu ()
 The derivative of the second time derivative of the variable this object is operating on with respect to this variable's coefficients. More...
 
virtual const OutputTools< Real >::VariableGradientgradient ()
 The gradient of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableGradientgradientOld ()
 The old gradient of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableGradientgradientOlder ()
 The older gradient of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableSecondsecond ()
 The second derivative of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableSecondsecondOld ()
 The old second derivative of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableSecondsecondOlder ()
 The older second derivative of the variable this object is operating on. More...
 
virtual const OutputTools< Real >::VariableTestSecondsecondTest ()
 The second derivative of the test function. More...
 
virtual const OutputTools< Real >::VariableTestSecondsecondTestFace ()
 The second derivative of the test function on the current face. More...
 
virtual const OutputTools< Real >::VariablePhiSecondsecondPhi ()
 The second derivative of the trial function. More...
 
virtual const OutputTools< Real >::VariablePhiSecondsecondPhiFace ()
 The second derivative of the trial function on the current face. More...
 
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...
 

Protected Attributes

ExtremeType _type
 The extreme value type. More...
 
Real _value
 The extreme value. More...
 
const VariableValue_u
 Holds the solution at current quadrature points. More...
 
const VariableGradient_grad_u
 Holds the solution gradient at the current quadrature points. More...
 
unsigned int _qp
 The current quadrature point. More...
 
MooseMesh_mesh
 
const Elem *& _current_elem
 The current element pointer (available during execute()) More...
 
const Real & _current_elem_volume
 The current element volume (available during execute()) More...
 
const MooseArray< Point > & _q_point
 
QBase *& _qrule
 
const MooseArray< Real > & _JxW
 
const MooseArray< Real > & _coord
 
SubProblem_subproblem
 Reference to the Subproblem for this user object. More...
 
FEProblemBase_fe_problem
 Reference to the FEProblemBase for this user object. More...
 
THREAD_ID _tid
 Thread ID of this postprocessor. More...
 
Assembly_assembly
 
const Moose::CoordinateSystemType_coord_sys
 Coordinate system. More...
 
const bool _duplicate_initial_execution
 
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 & _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...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. 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::map< std::string, VariableValue * > _default_value
 Will hold the default value for optional coupled scalar variables. More...
 
std::map< std::string, std::vector< VariableValue * > > _default_value
 Will hold the default value for optional coupled variables. 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_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 
std::shared_ptr< MaterialData_blk_material_data
 Pointer to the MaterialData class for this object. 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...
 
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, 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_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
 
std::string _pp_name
 
bool _nodal
 Whether or not this object is acting only at nodes. More...
 
MooseVariableFE< Real > * _variable
 The variable this object is acting on. More...
 
Assembly_mvi_assembly
 

Detailed Description

A postprocessor for collecting the nodal min or max value.

Definition at line 23 of file ElementExtremeValue.h.

Member Enumeration Documentation

◆ ExtremeType

Type of extreme value we are going to compute.

Enumerator
MAX 
MIN 

Definition at line 27 of file ElementExtremeValue.h.

Constructor & Destructor Documentation

◆ ElementExtremeValue()

ElementExtremeValue::ElementExtremeValue ( const InputParameters parameters)

Class constructor.

Parameters
parametersThe input parameters

Definition at line 36 of file ElementExtremeValue.C.

38  _type((ExtremeType)(int)parameters.get<MooseEnum>("value_type")),
39  _value(_type == 0 ? -std::numeric_limits<Real>::max() : std::numeric_limits<Real>::max())
40 {
41 }
ExtremeType _type
The extreme value type.
Real _value
The extreme value.
ExtremeType
Type of extreme value we are going to compute.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32
ElementVariablePostprocessor(const InputParameters &parameters)

Member Function Documentation

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

832 {
833  if (!isCoupled(var_name)) // Return default 0
834  return getADDefaultGradient<compute_stage>();
835 
836  coupledCallback(var_name, false);
837  if (_c_nodal)
838  mooseError("Nodal variables do not have gradients");
839 
840  MooseVariable * var = getVar(var_name, comp);
841 
843  {
844  if (_c_is_implicit)
845  return var->adGradSln<compute_stage>();
846  else
847  mooseError("Not implemented");
848  }
849  else
850  {
851  if (_c_is_implicit)
852  return var->adGradSlnNeighbor<compute_stage>();
853  else
854  mooseError("Not implemented");
855  }
856 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:638
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:641
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:742

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

796 {
797  if (!isCoupled(var_name))
798  return *getADDefaultValue<compute_stage>(var_name);
799 
800  coupledCallback(var_name, false);
801  MooseVariable * var = getVar(var_name, comp);
802 
804  {
805  if (_c_nodal)
806  mooseError("Not implemented");
807  else
808  {
809  if (_c_is_implicit)
810  return var->adSln<compute_stage>();
811  else
812  mooseError("Not implemented");
813  }
814  }
815  else
816  {
817  if (_c_nodal)
818  mooseError("Not implemented");
819  else
820  {
821  if (_c_is_implicit)
822  return var->adSlnNeighbor<compute_stage>();
823  else
824  mooseError("Not implemented");
825  }
826  }
827 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:638
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:641
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:742

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 91 of file Coupleable.h.

Referenced by Coupleable::coupledMatrixTagValue().

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

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

Definition at line 89 of file Coupleable.h.

Referenced by Coupleable::coupledVectorTagValue().

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

◆ 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

◆ adGradZeroTemplate() [1/3]

template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::type & Coupleable::adGradZeroTemplate ( )
protectedinherited

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

Definition at line 899 of file Coupleable.h.

900 {
901  return _grad_zero;
902 }
const VariableGradient & _grad_zero
Zero gradient of a variable.
Definition: Coupleable.h:678

◆ adGradZeroTemplate() [2/3]

template<>
const VariableGradientType<JACOBIAN>::type& Coupleable::adGradZeroTemplate ( )
protectedinherited

◆ adGradZeroTemplate() [3/3]

template<>
const VariableGradientType<JACOBIAN>::type& Coupleable::adGradZeroTemplate ( )
protectedinherited

Definition at line 1503 of file Coupleable.C.

1504 {
1505  return _ad_grad_zero;
1506 }
const MooseArray< ADRealGradient > & _ad_grad_zero
Definition: Coupleable.h:679

◆ adZeroTemplate() [1/3]

template<ComputeStage compute_stage>
const VariableValueType< compute_stage >::type & Coupleable::adZeroTemplate ( )
protectedinherited

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

Definition at line 889 of file Coupleable.h.

890 {
891  return _zero;
892 }
const VariableValue & _zero
Zero value of a variable.
Definition: Coupleable.h:674

◆ adZeroTemplate() [2/3]

template<>
const VariableValueType<JACOBIAN>::type& Coupleable::adZeroTemplate ( )
protectedinherited

◆ adZeroTemplate() [3/3]

template<>
const VariableValueType<JACOBIAN>::type& Coupleable::adZeroTemplate ( )
protectedinherited

Definition at line 1496 of file Coupleable.C.

1497 {
1498  return _ad_zero;
1499 }
const MooseArray< ADReal > & _ad_zero
Definition: Coupleable.h:675

◆ blockIDs()

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

Return the block subdomain ids for this object.

Returns
a set of SudomainIDs that are valid for this object

Definition at line 167 of file BlockRestrictable.C.

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

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

◆ blockRestricted()

bool BlockRestrictable::blockRestricted ( ) const
virtualinherited

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

See also
MooseObject

Definition at line 155 of file BlockRestrictable.C.

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

156 {
157  return _blk_ids.find(Moose::ANY_BLOCK_ID) == _blk_ids.end();
158 }
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.h:328
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error reporting)

◆ blocks()

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

Return the block names for this object.

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

Returns
vector of SubdomainNames that are valid for this object

Definition at line 161 of file BlockRestrictable.C.

Referenced by MaterialOutputAction::getParams().

162 {
163  return _blocks;
164 }
std::vector< SubdomainName > _blocks
Vector the block names supplied by the user via the input file.

◆ buildOutputHideVariableList()

void OutputInterface::buildOutputHideVariableList ( std::set< std::string >  variable_names)
inherited

Builds hide lists for output objects NOT listed in the 'outputs' parameter.

Parameters
variable_namesA set of variables for which the 'outputs' parameter controls

By default this is called by the constructor and passes the block name as the list of variables. This needs to be called explicitly if the build_list flag is set to False in the constructor. The latter cases is needed by the Material object to work correctly with the automatic material output capability.

Definition at line 62 of file OutputInterface.C.

Referenced by CheckOutputAction::checkVariableOutput(), and OutputInterface::OutputInterface().

63 {
64  // Set of available names
65  const std::set<OutputName> & avail = _oi_output_warehouse.getOutputNames();
66 
67  // Check for 'none'; hide variables on all outputs
68  if (_oi_outputs.find("none") != _oi_outputs.end())
69  for (const auto & name : avail)
70  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
71 
72  // Check for empty and 'all' in 'outputs' parameter; do not perform any variable restrictions in
73  // these cases
74  else if (_oi_outputs.empty() || _oi_outputs.find("all") != _oi_outputs.end())
75  return;
76 
77  // Limit the variable output to Output objects listed
78  else
79  {
80  // Create a list of outputs where the variable should be hidden
81  std::set<OutputName> hide;
82  std::set_difference(avail.begin(),
83  avail.end(),
84  _oi_outputs.begin(),
85  _oi_outputs.end(),
86  std::inserter(hide, hide.begin()));
87 
88  // If 'outputs' is specified add the object name to the list of items to hide
89  for (const auto & name : hide)
90  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
91  }
92 }
OutputWarehouse & _oi_output_warehouse
Reference to the OutputWarehouse for populating the Output object hide lists.
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.
const std::set< OutputName > & getOutputNames()
Get a complete set of all output object names.
void addInterfaceHideVariables(const std::string &output_name, const std::set< std::string > &variable_names)
Insert variable names for hiding via the OutoutInterface.

◆ 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:786
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620

◆ checkVariable()

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

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

Parameters
variableThe variable to check against.

Definition at line 307 of file BlockRestrictable.C.

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

◆ computeQpValue()

void ElementExtremeValue::computeQpValue ( )
overrideprotectedvirtual

Get the extreme value at each quadrature point.

Implements ElementVariablePostprocessor.

Definition at line 59 of file ElementExtremeValue.C.

60 {
61  switch (_type)
62  {
63  case MAX:
64  _value = std::max(_value, _u[_qp]);
65  break;
66 
67  case MIN:
68  _value = std::min(_value, _u[_qp]);
69  break;
70  }
71 }
const VariableValue & _u
Holds the solution at current quadrature points.
ExtremeType _type
The extreme value type.
unsigned int _qp
The current quadrature point.
Real _value
The extreme value.

◆ 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:620
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:783
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:626
const InputParameters & _c_parameters
Definition: Coupleable.h:617

◆ 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:638
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:700
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:641
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:742

◆ 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:638
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:700
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:641
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:742
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:638
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:700
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:641
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:742
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:638
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:659
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:742
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:638
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:659
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:742
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:638
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:659
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:742
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:638
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:659
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:742
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:638
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:659
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:742
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:638
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:659
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:742
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:638
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:641
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:662
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:662
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:662
const FieldVariableGradient & gradSlnNeighborDotDot()
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:641
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:662
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:641
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:662
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:623
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:662
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:620
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:742
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:638
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:91
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:659
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:742
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:659
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:742
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:659
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:742
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:659
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:742
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:641
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:620
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:742
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:641
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:620
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:742
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:641
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:620
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:742
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:623
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:742
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:638
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:641
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:668
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:641
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:668
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:641
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:668
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:620
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:742
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:638
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:623
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:668
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:620
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:742
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:638
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:641
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:620
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:742
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:638
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:641
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:620
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:742
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:638
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:641
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:620
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:742
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:638
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:641
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:742
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:638
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:641
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:742
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:638
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:641
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:620
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:742
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:638
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:623
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:742
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:638
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:742
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:694
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:638
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:742
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:694
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:638
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:742
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:694
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:638
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:742
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:694
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:638
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:641
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:620
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:697
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:742
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:638
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:641
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:620
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:697
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:742
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:638
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:641
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:620
VectorVariableGradient _default_vector_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:697
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:742
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:638
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:89
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:638
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:641
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:742

◆ 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:638
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:641
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:742
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 (!isCoupled(var_name))
548  return *getVectorDefaultValue(var_name);
549 
550  validateExecutionerType(var_name, "coupledVectorValueOlder");
551  coupledCallback(var_name, true);
552  VectorMooseVariable * var = getVectorVar(var_name, comp);
553  if (var == NULL)
554  mooseError("Call coupledValueOlder for coupled scalar field variables");
555 
557  {
558  if (_c_nodal)
559  mooseError("Vector variables are not required to be continuous and so should not be used "
560  "with nodal compute objects");
561  else
562  {
563  if (_c_is_implicit)
564  return var->slnOlder();
565  else
566  mooseError("Older values not available for explicit schemes");
567  }
568  }
569  else
570  {
571  if (_c_nodal)
572  mooseError("Vector variables are not required to be continuous and so should not be used "
573  "with nodal compute objects");
574  else
575  {
576  if (_c_is_implicit)
577  return var->slnOlderNeighbor();
578  else
579  mooseError("Older values not available for explicit schemes");
580  }
581  }
582 }
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:638
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 & slnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:641
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:742
const FieldVariableValue & slnOlder()

◆ declareRecoverableData() [1/2]

template<typename T >
T & Restartable::declareRecoverableData ( std::string  data_name)
protectedinherited

Declare a piece of data as "recoverable".

This means that in the event of a recovery this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 269 of file Restartable.h.

270 {
271  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + da