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

The DGKernel class is responsible for calculating the residuals for various physics on internal sides (edges/faces). More...

#include <DGKernel.h>

Inheritance diagram for DGKernel:
[legend]

Public Types

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

Public Member Functions

 DGKernel (const InputParameters &parameters)
 Factory constructor initializes all internal references needed for residual computation. More...
 
virtual ~DGKernel ()
 
MooseVariablevariable ()
 The variable number that this kernel operates on. More...
 
SubProblemsubProblem ()
 Return a reference to the subproblem. More...
 
virtual void computeElemNeighResidual (Moose::DGResidualType type)
 Computes the residual for this element or the neighbor. More...
 
virtual void computeResidual ()
 Computes the residual for the current side. More...
 
virtual void computeElemNeighJacobian (Moose::DGJacobianType type)
 Computes the element/neighbor-element/neighbor Jacobian. More...
 
virtual void computeJacobian ()
 Computes the jacobian for the current side. More...
 
virtual void computeOffDiagElemNeighJacobian (Moose::DGJacobianType type, unsigned int jvar)
 Computes the element-element off-diagonal Jacobian. More...
 
virtual void computeOffDiagJacobian (unsigned int jvar)
 Computes d-residual / d-jvar... More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
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...
 
virtual const std::set< BoundaryID > & boundaryIDs () const
 Return the boundary IDs for this object. More...
 
const std::vector< BoundaryName > & boundaryNames () const
 Return the boundary names for this object. More...
 
unsigned int numBoundaryIDs () const
 Return the number of boundaries for this object. More...
 
bool hasBoundary (const BoundaryName &name) const
 Test if the supplied boundary name is valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 Test if the supplied vector of boundary names are valid for this object. More...
 
bool hasBoundary (const BoundaryID &id) const
 Test if the supplied boundary ids are valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 Test if the supplied vector boundary ids are valid for this object. More...
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 Test if the supplied set of boundary ids are valid for this object. More...
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 Test if the class boundary ids are a subset of the supplied objects. More...
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
template<typename T >
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 Check if a material property is valid for all boundaries of this object. More...
 
virtual bool boundaryRestricted () const
 Returns true if this object has been restricted to a boundary. More...
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 Returns the set of all boundary ids for the entire mesh. More...
 
virtual void initialSetup ()
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual void timestepSetup ()
 Gets called at the beginning of the timestep before this object is asked to do its job. More...
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual void subdomainSetup ()
 Gets called when the subdomain changes (i.e. More...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 (DEPRECATED) Get the execution flag for the object TODO: ExecFlagType More...
 
ExecFlagType execBitFlags () const
 (DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType More...
 
bool isImplicit ()
 
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...
 
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...
 
virtual const VariableValuecoupledNeighborValue (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableValuecoupledNeighborValueDot (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableValuecoupledNeighborValueDotDu (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableValuecoupledNeighborValueOld (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableValuecoupledNeighborValueOlder (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableGradientcoupledNeighborGradient (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableGradientcoupledNeighborGradientOld (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableGradientcoupledNeighborGradientOlder (const std::string &var_name, unsigned int comp=0)
 
virtual const VectorVariableGradientcoupledVectorNeighborGradient (const std::string &var_name, unsigned int comp=0)
 
virtual const VectorVariableGradientcoupledVectorNeighborGradientOld (const std::string &var_name, unsigned int comp=0)
 
virtual const VectorVariableGradientcoupledVectorNeighborGradientOlder (const std::string &var_name, unsigned int comp=0)
 
virtual const VariableSecondcoupledNeighborSecond (const std::string &var_name, unsigned int i=0)
 
virtual const DenseVector< Number > & coupledNeighborSolutionDoFs (const std::string &var_name, unsigned int comp=0)
 
virtual const DenseVector< Number > & coupledNeighborSolutionDoFsOld (const std::string &var_name, unsigned int comp=0)
 
virtual const DenseVector< Number > & coupledNeighborSolutionDoFsOlder (const std::string &var_name, unsigned int comp=0)
 
const std::map< std::string, std::vector< MooseVariableFEBase * > > & getCoupledVars ()
 Get the list of coupled variables. More...
 
const std::vector< MooseVariableFEBase * > & getCoupledMooseVars () const
 Get the list of all coupled variables. More...
 
const std::vector< MooseVariable * > & getCoupledStandardMooseVars () const
 Get the list of standard coupled variables. More...
 
const std::vector< VectorMooseVariable * > & getCoupledVectorMooseVars () const
 Get the list of vector coupled variables. More...
 
void addFEVariableCoupleableVectorTag (TagID tag)
 
void addFEVariableCoupleableMatrixTag (TagID tag)
 
std::set< TagID > & getFEVariableCoupleableVectorTags ()
 
std::set< TagID > & getFEVariableCoupleableMatrixTags ()
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 Get the list of coupled scalar variables. More...
 
std::set< TagID > & getScalarVariableCoupleableVectorTags ()
 
std::set< TagID > & getScalarVariableCoupleableMatrixTags ()
 
void addScalarVariableCoupleableVectorTag (TagID tag)
 
void addScalarVariableCoupleableMatrixTag (TagID tag)
 
const std::set< MooseVariableFEBase * > & getMooseVariableDependencies () const
 Retrieve the set of MooseVariableFEBases that this object depends on. More...
 
MooseVariableFE< Real > * mooseVariable () const
 Get the variable that this object is using. More...
 
template<typename T >
const MaterialProperty< T > & getNeighborMaterialProperty (const std::string &name)
 Retrieve the property named "name". More...
 
template<typename T >
const MaterialProperty< T > & getNeighborMaterialPropertyOld (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getNeighborMaterialPropertyOlder (const std::string &name)
 
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)
 
virtual void meshChanged ()
 Called on this object when the mesh changes. More...
 
void useVectorTag (const TagName &tag_name)
 
void useVectorTag (TagID tag_id)
 
void useMatrixTag (const TagName &tag_name)
 
void useMatrixTag (TagID tag_id)
 
bool isVectorTagged ()
 
bool isMatrixTagged ()
 
const std::set< TagID > & getVectorTags () const
 
const std::set< TagID > & getMatrixTags () const
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar)
 Prepare data for computing element residual the according to active tags. More...
 
void prepareVectorTagNeighbor (Assembly &assembly, unsigned int ivar)
 Prepare data for computing element residual the according to active tags for DG and interface kernels. More...
 
void prepareMatrixTag (Assembly &assembly, unsigned int ivar, unsigned int jvar)
 Prepare data for computing element jacobian according to the ative tags. More...
 
void prepareMatrixTagNeighbor (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type)
 Prepare data for computing element jacobian according to the ative tags for DG and interface kernels. More...
 
void accumulateTaggedLocalResidual ()
 Local residual blocks will be appended by adding the current local kernel residual. More...
 
void assignTaggedLocalResidual ()
 Local residual blocks will assigned as the current local kernel residual. More...
 
void accumulateTaggedLocalMatrix ()
 Local Jacobian blocks will be appended by adding the current local kernel Jacobian. More...
 
void assignTaggedLocalMatrix ()
 Local Jacobian blocks will assigned as the current local kernel Jacobian. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialProperty (const std::string &name)
 Retrieve reference to material property or one of it's old or older values. More...
 
template<typename T >
const ADMaterialPropertyObject< T > & getADMaterialProperty (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name)
 Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file. More...
 
template<typename T >
const ADMaterialPropertyObject< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
MaterialgetMaterial (const std::string &name)
 Return a Material reference - usable for computing directly. More...
 
MaterialgetMaterialByName (const std::string &name, bool no_warn=false)
 
template<typename T >
bool hasMaterialProperty (const std::string &name)
 Check if the material property exists. More...
 
template<typename T >
bool hasMaterialPropertyByName (const std::string &name)
 

Static Public Member Functions

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

Public Attributes

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

Static Public Attributes

static const BoundaryID InternalBndId
 

Protected Member Functions

virtual Real computeQpResidual (Moose::DGResidualType type)=0
 This is the virtual that derived classes should override for computing the residual on neighboring element. More...
 
virtual Real computeQpJacobian (Moose::DGJacobianType type)=0
 This is the virtual that derived classes should override for computing the Jacobian on neighboring element. More...
 
virtual Real computeQpOffDiagJacobian (Moose::DGJacobianType type, unsigned int jvar)
 This is the virtual that derived classes should override for computing the off-diag Jacobian. More...
 
const Real & getNeighborElemVolume ()
 The volume (or length) of the current neighbor. 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...
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 A helper method to avoid circular #include problems. More...
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled as name. More...
 
unsigned int coupledComponents (const std::string &var_name)
 Number of coupled components. More...
 
virtual void coupledCallback (const std::string &var_name, bool is_old)
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0)
 Returns the index for a coupled variable by name. More...
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled variable. More...
 
template<ComputeStage compute_stage>
const VariableValueType< compute_stage >::typeadCoupledValueTemplate (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled variable for use in Automatic Differentiation. More...
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a coupled variable for a given tag. More...
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a coupled variable for a given tag. More...
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled vector variable. More...
 
virtual VariableValuewritableCoupledValue (const std::string &var_name, unsigned int comp=0)
 Returns a writable reference to a coupled variable. More...
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old value from previous time step of a coupled variable. More...
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old value from two time steps previous of a coupled variable. More...
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns value of previous Newton iterate of a coupled variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old value from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old value from two time steps previous of a coupled vector variable. More...
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable. More...
 
template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::typeadCoupledGradientTemplate (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable for use in Automatic Differentation. More...
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from previous time step of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from two time steps previous of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable for previous Newton iterate. More...
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of the gradient of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of the gradient of a coupled variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from two time steps previous of a coupled vector variable. More...
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0)
 Returns curl of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0)
 Returns an old curl from previous time step of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old curl from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0)
 Returns second derivative of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0)
 Returns an old second derivative from previous time step of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old second derivative from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns second derivative of a coupled variable for the previous Newton iterate. More...
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0)
 Old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0)
 Old second time derivative of a coupled variable. More...
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0)
 Old time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0)
 Old second time derivative of a coupled vector variable. More...
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled variable with respect to the coefficients. More...
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled variable with respect to the coefficients. More...
 
virtual const VariableValuecoupledNodalValue (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from previous time step of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from two time steps previous of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable for previous Newton iterate. More...
 
virtual const VariableValuecoupledNodalDot (const std::string &var_name, unsigned int comp=0)
 Nodal values of time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0)
 Nodal values of second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0)
 Nodal values of old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0)
 Nodal values of old second time derivative of a coupled variable. More...
 
virtual const DenseVector< Number > & coupledSolutionDoFs (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the current solution vector of a coupled variable for the local element. More...
 
virtual const DenseVector< Number > & coupledSolutionDoFsOld (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the old solution vector of a coupled variable for the local element. More...
 
virtual const DenseVector< Number > & coupledSolutionDoFsOlder (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the older solution vector of a coupled variable for the local element. More...
 
void checkVar (const std::string &var_name)
 Check that the right kind of variable is being coupled in. More...
 
void checkVar (const std::string &var_name)
 Check that the right kind of variable is being coupled in. More...
 
MooseVariableFEBasegetFEVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a base finite element coupled variable. More...
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled variable. More...
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled vector variable. More...
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in. More...
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in. More...
 
VariableValuegetDefaultValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default value for an uncoupled variable. More...
 
virtual bool isCoupledScalar (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled_as name. More...
 
virtual unsigned int coupledScalarComponents (const std::string &var_name)
 Return the number of components to the coupled scalar variable. More...
 
virtual unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0)
 Returns the index for a scalar coupled variable by name. More...
 
virtual Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0)
 Returns the order for a scalar coupled variable by name. More...
 
virtual VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0)
 Returns the old (previous time step) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns the older (two time steps previous) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0)
 Returns the time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0)
 Returns the second time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0)
 Returns the old time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0)
 Returns the old second time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a scalar coupled variable with respect to the coefficients. More...
 
virtual VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a scalar coupled variable with respect to the coefficients. More...
 
MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a scalar coupled variable. More...
 
void addMooseVariableDependency (MooseVariableFEBase *var)
 Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on. More...
 
void addMooseVariableDependency (std::vector< MooseVariableFEBase *> vars)
 
virtual const OutputTools< Real >::VariableValueneighborValue ()
 The value of the variable this object is operating on evaluated on the "neighbor" element. More...
 
const VectorVariableValueneighborValue ()
 
virtual const OutputTools< Real >::VariableValueneighborValueOld ()
 The old value of the variable this object is operating on evaluated on the "neighbor" element. More...
 
const VectorVariableValueneighborValueOld ()
 
virtual const OutputTools< Real >::VariableValueneighborValueOlder ()
 The older value of the variable this object is operating on evaluated on the "neighbor" element. More...
 
const VectorVariableValueneighborValueOlder ()
 
virtual const OutputTools< Real >::VariableGradientneighborGradient ()
 The gradient of the variable this object is operating on evaluated on the "neighbor" element. More...
 
virtual const OutputTools< Real >::VariableGradientneighborGradientOld ()
 The old gradient of the variable this object is operating on evaluated on the "neighbor" element. More...
 
virtual const OutputTools< Real >::VariableGradientneighborGradientOlder ()
 The older gradient of the variable this object is operating on evaluated on the "neighbor" element. More...
 
virtual const OutputTools< Real >::VariableSecondneighborSecond ()
 The second derivative of the variable this object is operating on evaluated on the "neighbor" element. More...
 
virtual const OutputTools< Real >::VariableSecondneighborSecondOld ()
 The old second derivative of the variable this object is operating on evaluated on the "neighbor" element. More...
 
virtual const OutputTools< Real >::VariableSecondneighborSecondOlder ()
 The older second derivative of the variable this object is operating on evaluated on the "neighbor" element. More...
 
virtual const OutputTools< Real >::VariableTestSecondneighborSecondTest ()
 The second derivative of the neighbor's test function. More...
 
virtual const OutputTools< Real >::VariablePhiSecondneighborSecondPhi ()
 The second derivative of the neighbor's shape function. 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...
 
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...
 
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...
 

Protected Attributes

SubProblem_subproblem
 
SystemBase_sys
 
THREAD_ID _tid
 
Assembly_assembly
 
MooseVariable_var
 
MooseMesh_mesh
 
const Elem *& _current_elem
 
const Real & _current_elem_volume
 The volume (or length) of the current element. More...
 
const Elem *& _neighbor_elem
 The neighboring element. More...
 
unsigned int & _current_side
 Current side. More...
 
const Elem *& _current_side_elem
 Current side element. More...
 
const Real & _current_side_volume
 The volume (or length) of the current side. More...
 
const Moose::CoordinateSystemType_coord_sys
 Coordinate system. More...
 
unsigned int _qp
 
const MooseArray< Point > & _q_point
 
QBase *& _qrule
 
const MooseArray< Real > & _JxW
 
const MooseArray< Real > & _coord
 
unsigned int _i
 
unsigned int _j
 
BoundaryID _boundary_id
 
const VariableValue_u
 Holds the current solution at the current quadrature point on the face. More...
 
const VariableGradient_grad_u
 Holds the current solution gradient at the current quadrature point on the face. More...
 
const VariablePhiValue_phi
 
const VariablePhiGradient_grad_phi
 
const VariableTestValue_test
 Side shape function. More...
 
const VariableTestGradient_grad_test
 Gradient of side shape function. More...
 
const MooseArray< Point > & _normals
 Normal vectors at the quadrature points. More...
 
const VariablePhiValue_phi_neighbor
 Side shape function. More...
 
const VariablePhiGradient_grad_phi_neighbor
 Gradient of side shape function. More...
 
const VariableTestValue_test_neighbor
 Side test function. More...
 
const VariableTestGradient_grad_test_neighbor
 Gradient of side shape function. More...
 
const VariableValue_u_neighbor
 Holds the current solution at the current quadrature point. More...
 
const VariableGradient_grad_u_neighbor
 Holds the current solution gradient at the current quadrature point. More...
 
bool _has_save_in
 The aux variables to save the residual contributions to. More...
 
std::vector< MooseVariableFEBase * > _save_in
 
std::vector< AuxVariableName > _save_in_strings
 
bool _has_diag_save_in
 The aux variables to save the diagonal Jacobian contributions to. More...
 
std::vector< MooseVariableFEBase * > _diag_save_in
 
std::vector< AuxVariableName > _diag_save_in_strings
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
std::shared_ptr< MaterialData_blk_material_data
 Pointer to the MaterialData class for this object. More...
 
const ExecFlagEnum_execute_enum
 Execute settings for this oejct. More...
 
const std::vector< ExecFlagType_exec_flags
 (DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 If the object is using implicit or explicit form. More...
 
Real & _t
 Time. More...
 
int & _t_step
 The number of the time step. More...
 
Real & _dt
 Time step size. More...
 
Real & _dt_old
 Size of the old time step. More...
 
bool _is_transient
 
bool _neighbor_nodal
 
const InputParameters_c_parameters
 
const std::string & _c_name
 The name of the object this interface is part of. More...
 
FEProblemBase_c_fe_problem
 
std::map< std::string, std::vector< MooseVariableFEBase * > > _coupled_vars
 Coupled vars whose values we provide. More...
 
std::vector< MooseVariableFEBase * > _coupled_moose_vars
 Vector of all coupled variables. More...
 
std::vector< MooseVariable * > _coupled_standard_moose_vars
 Vector of standard coupled variables. More...
 
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
 Vector of vector coupled variables. More...
 
bool _c_nodal
 True if we provide coupling to nodal values. More...
 
bool _c_is_implicit
 True if implicit value is required. More...
 
THREAD_ID _c_tid
 Thread ID of the thread using this object. More...
 
std::map< std::string, std::vector< VariableValue * > > _default_value
 Will hold the default value for optional coupled variables. More...
 
std::map< std::string, VariableValue * > _default_value
 Will hold the default value for optional coupled scalar variables. More...
 
std::map< std::string, MooseArray< ADReal > * > _ad_default_value
 Will hold the default value for optional coupled variables for automatic differentiation. More...
 
std::map< std::string, VectorVariableValue * > _default_vector_value
 Will hold the default value for optional vector coupled variables. More...
 
VariableValue _default_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info. More...
 
VariableGradient _default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< ADRealGradient_ad_default_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
VariableSecond _default_second
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
MooseArray< ADRealTensor_ad_default_second
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
const VariableValue_zero
 Zero value of a variable. More...
 
const MooseArray< ADReal > & _ad_zero
 
const VariableGradient_grad_zero
 Zero gradient of a variable. More...
 
const MooseArray< ADRealGradient > & _ad_grad_zero
 
const VariableSecond_second_zero
 Zero second derivative of a variable. More...
 
const VariablePhiSecond_second_phi_zero
 Zero second derivative of a test function. More...
 
const VectorVariableValue_vector_zero
 Zero value of a vector variable. More...
 
const VectorVariableCurl_vector_curl_zero
 Zero value of the curl of a vector variable. More...
 
VectorVariableValue _default_vector_value_zero
 This will always be zero because the default values for optionally coupled variables is always constant and this is used for time derivative info. More...
 
VectorVariableGradient _default_vector_gradient
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
VectorVariableCurl _default_vector_curl
 This will always be zero because the default values for optionally coupled variables is always constant. More...
 
bool _coupleable_neighbor
 Whether or not this object is a "neighbor" object: ie all of it's coupled values should be neighbor values. More...
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 The name of the object this interface is part of. More...
 
FEProblemBase_sc_fe_problem
 
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 Coupled vars whose values we provide. More...
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 Vector of coupled variables. More...
 
bool _sc_is_implicit
 True if implicit value is required. More...
 
const InputParameters_coupleable_params
 Local InputParameters. More...
 
THREAD_ID _sc_tid
 Thread ID of the thread using this object. More...
 
const Real & _real_zero
 Scalar zero. More...
 
const VariableValue_scalar_zero
 Zero value of a scalar variable. More...
 
const Point & _point_zero
 Zero point. More...
 
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
 
std::shared_ptr< MaterialData_neighbor_material_data
 
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...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. More...
 
std::set< TagID_vector_tags
 The vectors this Kernel will contribute to. More...
 
std::set< TagID_matrix_tags
 The matrices this Kernel will contribute to. More...
 
const MooseObject_moose_object
 Moose objct this tag works on. More...
 
const InputParameters_tag_params
 Parameters from moose object. More...
 
std::vector< DenseVector< Number > * > _re_blocks
 Residual blocks Vectors For each Tag. More...
 
std::vector< DenseMatrix< Number > * > _ke_blocks
 Kernel blocks Vectors For each Tag. More...
 
DenseVector< Number > _local_re
 Holds residual entries as they are accumulated by this Kernel. More...
 
DenseMatrix< Number > _local_ke
 Holds residual entries as they are accumulated by this Kernel. More...
 

Static Protected Attributes

static Threads::spin_mutex _resid_vars_mutex
 
static Threads::spin_mutex _jacoby_vars_mutex
 

Detailed Description

The DGKernel class is responsible for calculating the residuals for various physics on internal sides (edges/faces).

Definition at line 42 of file DGKernel.h.

Member Enumeration Documentation

◆ TEST_TYPE

A flag changing the behavior of hasBoundary.

Enumerator
ALL 
ANY 

Definition at line 35 of file BoundaryRestrictable.h.

Constructor & Destructor Documentation

◆ DGKernel()

DGKernel::DGKernel ( const InputParameters parameters)

Factory constructor initializes all internal references needed for residual computation.

Parameters
parametersThe parameters object for holding additional parameters for kernels and derived kernels

Definition at line 68 of file DGKernel.C.

70  BlockRestrictable(this),
71  BoundaryRestrictable(this, false), // false for _not_ nodal
72  SetupInterface(this),
73  TransientInterface(this),
74  FunctionInterface(this),
75  UserObjectInterface(this),
80  Restartable(this, "DGKernels"),
82  TaggingInterface(this),
83  _subproblem(*getCheckedPointerParam<SubProblem *>("_subproblem")),
84  _sys(*getCheckedPointerParam<SystemBase *>("_sys")),
85  _tid(parameters.get<THREAD_ID>("_tid")),
87  _var(*mooseVariable()),
89 
92 
94 
98 
104 
105  _u(_is_implicit ? _var.sln() : _var.slnOld()),
107 
110 
111  _test(_var.phiFace()),
113 
114  _normals(_var.normals()),
115 
118 
121 
124 
125  _save_in_strings(parameters.get<std::vector<AuxVariableName>>("save_in")),
126  _diag_save_in_strings(parameters.get<std::vector<AuxVariableName>>("diag_save_in"))
127 {
129 
130  _save_in.resize(_save_in_strings.size());
131  _diag_save_in.resize(_diag_save_in_strings.size());
132 
133  for (unsigned int i = 0; i < _save_in_strings.size(); i++)
134  {
136  _save_in_strings[i],
139 
141  mooseError("Trying to use solution variable " + _save_in_strings[i] +
142  " as a save_in variable in " + name());
143 
144  if (var->feType() != _var.feType())
145  paramError(
146  "save_in",
147  "saved-in auxiliary variable is incompatible with the object's nonlinear variable: ",
149 
150  _save_in[i] = var;
153  }
154 
155  _has_save_in = _save_in.size() > 0;
156 
157  for (unsigned int i = 0; i < _diag_save_in_strings.size(); i++)
158  {
163 
165  mooseError("Trying to use solution variable " + _diag_save_in_strings[i] +
166  " as a diag_save_in variable in " + name());
167 
168  if (var->feType() != _var.feType())
169  paramError(
170  "diag_save_in",
171  "saved-in auxiliary variable is incompatible with the object's nonlinear variable: ",
173 
174  _diag_save_in[i] = var;
177  }
178 
179  _has_diag_save_in = _diag_save_in.size() > 0;
180 }
virtual MooseMesh & mesh()=0
const VariablePhiGradient & _grad_phi_neighbor
Gradient of side shape function.
Definition: DGKernel.h:167
const FieldVariableGradient & gradSlnOld()
std::vector< AuxVariableName > _diag_save_in_strings
Definition: DGKernel.h:187
QBase *& qRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:246
NeighborMooseVariableInterface(const MooseObject *moose_object, bool nodal, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_STANDARD)
Constructing the object.
const VariableTestGradient & _grad_test
Gradient of side shape function.
Definition: DGKernel.h:160
const FieldVariableGradient & gradSln()
THREAD_ID _tid
Definition: DGKernel.h:112
const MooseArray< Point > & qPointsFace()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:252
std::string incompatVarMsg(MooseVariableFEBase &var1, MooseVariableFEBase &var2)
Builds and returns a string of the form:
Definition: MooseError.C:22
const VariableValue & _u_neighbor
Holds the current solution at the current quadrature point.
Definition: DGKernel.h:175
bool _has_save_in
The aux variables to save the residual contributions to.
Definition: DGKernel.h:180
const FieldVariableValue & sln()
FunctionInterface(const MooseObject *moose_object)
virtual MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)=0
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual Assembly & assembly(THREAD_ID tid)=0
std::vector< AuxVariableName > _save_in_strings
Definition: DGKernel.h:182
Assembly & _assembly
Definition: DGKernel.h:114
const MooseArray< Real > & _coord
Definition: DGKernel.h:141
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
Definition: DGKernel.h:185
const VariablePhiValue & _phi_neighbor
Side shape function.
Definition: DGKernel.h:165
MooseObject(const InputParameters &parameters)
Definition: MooseObject.C:48
std::vector< MooseVariableFEBase * > _diag_save_in
Definition: DGKernel.h:186
const FieldVariableValue & slnOldNeighbor()
const VariablePhiGradient & gradPhiFaceNeighbor(MooseVariable &) const
Definition: Assembly.h:669
const Elem *& neighbor()
Return the neighbor element.
Definition: Assembly.h:316
const Elem *& _neighbor_elem
The neighboring element.
Definition: DGKernel.h:125
const MooseArray< Real > & coordTransformation()
Returns the reference to the coordinate transformation coefficients.
Definition: Assembly.h:234
const FieldVariableGradient & gradSlnNeighbor()
const MooseArray< Point > & _q_point
Definition: DGKernel.h:138
const FieldVariableGradient & gradSlnOldNeighbor()
const VariableTestGradient & _grad_test_neighbor
Gradient of side shape function.
Definition: DGKernel.h:172
const Real & _current_elem_volume
The volume (or length) of the current element.
Definition: DGKernel.h:122
unsigned int & _current_side
Current side.
Definition: DGKernel.h:128
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const Elem *& _current_side_elem
Current side element.
Definition: DGKernel.h:130
const FEType & feType() const
Get the type of finite element object.
const FieldVariableValue & slnNeighbor()
void addMooseVariableDependency(MooseVariableFEBase *var)
Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on...
const VariablePhiGradient & _grad_phi
Definition: DGKernel.h:154
MooseMesh & _mesh
Definition: DGKernel.h:116
MooseVariable & _var
Definition: DGKernel.h:115
const VariableTestValue & _test_neighbor
Side test function.
Definition: DGKernel.h:170
const Moose::CoordinateSystemType & _coord_sys
Coordinate system.
Definition: DGKernel.h:136
const Real & _current_side_volume
The volume (or length) of the current side.
Definition: DGKernel.h:133
TaggingInterface(const MooseObject *moose_object)
TwoMaterialPropertyInterface(const MooseObject *moose_object, const std::set< SubdomainID > &blocks_ids, const std::set< BoundaryID > &boundary_ids)
MooseVariableFE< Real > * mooseVariable() const
Get the variable that this object is using.
unsigned int & side()
Returns the current side.
Definition: Assembly.h:292
TransientInterface(const MooseObject *moose_object)
const FieldVariablePhiGradient & gradPhiFace()
const VariableGradient & _grad_u_neighbor
Holds the current solution gradient at the current quadrature point.
Definition: DGKernel.h:177
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
MeshChangedInterface(const InputParameters &params)
const FieldVariablePhiValue & phiFaceNeighbor()
BlockRestrictable(const MooseObject *moose_object)
Class constructor Populates the &#39;block&#39; input parameters, see the general class documentation for det...
const Real & elemVolume()
Returns the reference to the current element volume.
Definition: Assembly.h:286
SetupInterface(const MooseObject *moose_object)
const MooseArray< Point > & normals() const override
const VariablePhiValue & phiFace() const
Definition: Assembly.h:655
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:637
Restartable(const MooseObject *moose_object, const std::string &system_name)
Class constructor.
Definition: Restartable.C:17
const MooseArray< Real > & JxWFace()
Returns the reference to the transformed jacobian weights on a current face.
Definition: Assembly.h:258
void paramError(const std::string &param, Args... args)
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseObject.h:100
SubProblem & _subproblem
Definition: DGKernel.h:109
const FieldVariableValue & slnOld()
const VariableTestValue & _test
Side shape function.
Definition: DGKernel.h:158
NeighborCoupleableMooseVariableDependencyIntermediateInterface(const MooseObject *moose_object, bool nodal, bool neighbor_nodal)
const MooseArray< Real > & _JxW
Definition: DGKernel.h:140
const Elem *& elem()
Return the current element.
Definition: Assembly.h:270
const VariableGradient & _grad_u
Holds the current solution gradient at the current quadrature point on the face.
Definition: DGKernel.h:151
virtual void addVariableToZeroOnResidual(std::string var_name)
Adds this variable to the list of variables to be zeroed during each residual evaluation.
Definition: SystemBase.C:163
const FieldVariablePhiGradient & gradPhiFaceNeighbor()
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
const MooseArray< Point > & _normals
Normal vectors at the quadrature points.
Definition: DGKernel.h:162
virtual void addVariableToZeroOnJacobian(std::string var_name)
Adds this variable to the list of variables to be zeroed during each Jacobian evaluation.
Definition: SystemBase.C:169
SystemBase & _sys
Definition: DGKernel.h:110
const FieldVariablePhiValue & phiFace()
const Elem *& _current_elem
Definition: DGKernel.h:119
const VariablePhiValue & _phi
Definition: DGKernel.h:153
const Real & sideElemVolume()
Returns the reference to the volume of current side element.
Definition: Assembly.h:310
const Moose::CoordinateSystemType & coordSystem()
Get the coordinate system type.
Definition: Assembly.h:240
BoundaryRestrictable(const MooseObject *moose_object, bool nodal)
Class constructor Populates the _bnd_ids for the given boundary names supplied with the &#39;boundary&#39; in...
const VariablePhiValue & phiFaceNeighbor(MooseVariable &) const
Definition: Assembly.h:668
const VariableValue & _u
Holds the current solution at the current quadrature point on the face.
Definition: DGKernel.h:148
SystemBase & sys()
Get the system this variable is part of.
virtual const std::set< BoundaryID > & boundaryIDs() const
Return the boundary IDs for this object.
std::vector< MooseVariableFEBase * > _save_in
Definition: DGKernel.h:181
bool _is_implicit
If the object is using implicit or explicit form.
QBase *& _qrule
Definition: DGKernel.h:139
const Elem *& sideElem()
Returns the side element.
Definition: Assembly.h:304
unsigned int THREAD_ID
Definition: MooseTypes.h:97
const VariablePhiGradient & gradPhiFace() const
Definition: Assembly.h:657
UserObjectInterface(const MooseObject *moose_object)

◆ ~DGKernel()

DGKernel::~DGKernel ( )
virtual

Definition at line 182 of file DGKernel.C.

182 {}

Member Function Documentation

◆ accumulateTaggedLocalMatrix()

void TaggingInterface::accumulateTaggedLocalMatrix ( )
inherited

◆ accumulateTaggedLocalResidual()

void TaggingInterface::accumulateTaggedLocalResidual ( )
inherited

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

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

Definition at line 178 of file TaggingInterface.C.

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

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

◆ adCoupledGradientTemplate()

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

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

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the gradient of the coupled variable
See also
Kernel::gradient

Definition at line 815 of file Coupleable.h.

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

◆ adCoupledValueTemplate()

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

Returns value of a coupled variable for use in Automatic Differentiation.

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

Definition at line 779 of file Coupleable.h.

780 {
781  if (!isCoupled(var_name))
782  return *getADDefaultValue<compute_stage>(var_name);
783 
784  coupledCallback(var_name, false);
785  MooseVariable * var = getVar(var_name, comp);
786 
788  {
789  if (_c_nodal)
790  mooseError("Not implemented");
791  else
792  {
793  if (_c_is_implicit)
794  return var->adSln<compute_stage>();
795  else
796  mooseError("Not implemented");
797  }
798  }
799  else
800  {
801  if (_c_nodal)
802  mooseError("Not implemented");
803  else
804  {
805  if (_c_is_implicit)
806  return var->adSlnNeighbor<compute_stage>();
807  else
808  mooseError("Not implemented");
809  }
810  }
811 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const VariableValueType< compute_stage >::type & adSln()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const VariableValueType< compute_stage >::type & adSlnNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726

◆ addFEVariableCoupleableMatrixTag()

void Coupleable::addFEVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 89 of file Coupleable.h.

Referenced by Coupleable::coupledMatrixTagValue().

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

◆ addFEVariableCoupleableVectorTag()

void Coupleable::addFEVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

Definition at line 87 of file Coupleable.h.

Referenced by Coupleable::coupledVectorTagValue().

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

◆ addMooseVariableDependency() [1/2]

void MooseVariableDependencyInterface::addMooseVariableDependency ( MooseVariableFEBase var)
inlineprotectedinherited

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

Definition at line 37 of file MooseVariableDependencyInterface.h.

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

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

◆ addMooseVariableDependency() [2/2]

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

Definition at line 41 of file MooseVariableDependencyInterface.h.

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

◆ addScalarVariableCoupleableMatrixTag()

void ScalarCoupleable::addScalarVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 59 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledMatrixTagScalarValue().

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

◆ addScalarVariableCoupleableVectorTag()

void ScalarCoupleable::addScalarVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

Definition at line 57 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledVectorTagScalarValue().

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

◆ assignTaggedLocalMatrix()

void TaggingInterface::assignTaggedLocalMatrix ( )
inherited

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

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

Definition at line 199 of file TaggingInterface.C.

Referenced by NodalEqualValueConstraint::computeJacobian().

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

◆ assignTaggedLocalResidual()

void TaggingInterface::assignTaggedLocalResidual ( )
inherited

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

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

Definition at line 185 of file TaggingInterface.C.

Referenced by NodalEqualValueConstraint::computeResidual().

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

◆ 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:319
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.

◆ boundaryIDs()

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

Return the boundary IDs for this object.

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

Definition at line 148 of file BoundaryRestrictable.C.

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

149 {
150  return _bnd_ids;
151 }
std::set< BoundaryID > _bnd_ids
Set of the boundary ids.

◆ boundaryNames()

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

Return the boundary names for this object.

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

Definition at line 154 of file BoundaryRestrictable.C.

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

155 {
156  return _boundary_names;
157 }
std::vector< BoundaryName > _boundary_names
Vector the the boundary names.

◆ boundaryRestricted()

bool BoundaryRestrictable::boundaryRestricted ( ) const
virtualinherited

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

See also
MooseObject

Definition at line 166 of file BoundaryRestrictable.C.

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

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

◆ checkMaterialProperty()

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

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

Definition at line 144 of file MaterialPropertyInterface.C.

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

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

◆ checkVar() [1/2]

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

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

Parameters
var_nameThe name of the coupled variable

Definition at line 257 of file ScalarCoupleable.C.

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

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

◆ checkVar() [2/2]

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

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

Parameters
var_nameThe name of the coupled variable

Definition at line 167 of file Coupleable.C.

Referenced by Coupleable::coupled(), Coupleable::coupledDot(), Coupleable::coupledDotDot(), Coupleable::coupledDotDotDu(), Coupleable::coupledDotDotOld(), Coupleable::coupledDotDu(), Coupleable::coupledDotOld(), Coupleable::coupledGradient(), Coupleable::coupledGradientDot(), Coupleable::coupledGradientDotDot(), Coupleable::coupledGradientOld(), Coupleable::coupledGradientOlder(), Coupleable::coupledGradientPreviousNL(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledNodalDot(), Coupleable::coupledNodalDotDot(), Coupleable::coupledNodalDotDotOld(), Coupleable::coupledNodalDotOld(), Coupleable::coupledNodalValue(), Coupleable::coupledNodalValueOld(), Coupleable::coupledNodalValueOlder(), Coupleable::coupledNodalValuePreviousNL(), Coupleable::coupledSecond(), Coupleable::coupledSecondOld(), Coupleable::coupledSecondOlder(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledSolutionDoFs(), Coupleable::coupledSolutionDoFsOld(), Coupleable::coupledSolutionDoFsOlder(), Coupleable::coupledValue(), Coupleable::coupledValueOld(), Coupleable::coupledValueOlder(), Coupleable::coupledValuePreviousNL(), Coupleable::coupledVectorDot(), Coupleable::coupledVectorDotDot(), Coupleable::coupledVectorDotDotOld(), Coupleable::coupledVectorDotOld(), Coupleable::coupledVectorGradient(), Coupleable::coupledVectorGradientOld(), Coupleable::coupledVectorGradientOlder(), and Coupleable::coupledVectorTagValue().

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

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

◆ computeElemNeighJacobian()

void DGKernel::computeElemNeighJacobian ( Moose::DGJacobianType  type)
virtual

Computes the element/neighbor-element/neighbor Jacobian.

Definition at line 229 of file DGKernel.C.

Referenced by computeJacobian().

230 {
231  const VariableTestValue & test_space =
233  const VariableTestValue & loc_phi =
235 
238  else
240 
241  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
242  for (_i = 0; _i < test_space.size(); _i++)
243  for (_j = 0; _j < loc_phi.size(); _j++)
245 
247 
249  {
250  unsigned int rows = _local_ke.m();
251  DenseVector<Number> diag(rows);
252  for (unsigned int i = 0; i < rows; i++)
253  diag(i) = _local_ke(i, i);
254 
255  Threads::spin_mutex::scoped_lock lock(_jacoby_vars_mutex);
256  for (const auto & var : _diag_save_in)
257  {
259  var->sys().solution().add_vector(diag, var->dofIndices());
260  else
261  var->sys().solution().add_vector(diag, var->dofIndicesNeighbor());
262  }
263  }
264 }
unsigned int number() const
Get variable number coming from libMesh.
Assembly & _assembly
Definition: DGKernel.h:114
const MooseArray< Real > & _coord
Definition: DGKernel.h:141
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
Definition: DGKernel.h:185
const VariablePhiValue & _phi_neighbor
Side shape function.
Definition: DGKernel.h:165
std::vector< MooseVariableFEBase * > _diag_save_in
Definition: DGKernel.h:186
virtual Real computeQpJacobian(Moose::DGJacobianType type)=0
This is the virtual that derived classes should override for computing the Jacobian on neighboring el...
DenseMatrix< Number > _local_ke
Holds residual entries as they are accumulated by this Kernel.
MooseVariable & _var
Definition: DGKernel.h:115
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const VariableTestValue & _test_neighbor
Side test function.
Definition: DGKernel.h:170
void prepareMatrixTagNeighbor(Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type)
Prepare data for computing element jacobian according to the ative tags for DG and interface kernels...
unsigned int _j
Definition: DGKernel.h:143
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:245
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
const VariableTestValue & _test
Side shape function.
Definition: DGKernel.h:158
const MooseArray< Real > & _JxW
Definition: DGKernel.h:140
unsigned int _i
Definition: DGKernel.h:143
const VariablePhiValue & _phi
Definition: DGKernel.h:153
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
Prepare data for computing element jacobian according to the ative tags.
QBase *& _qrule
Definition: DGKernel.h:139
unsigned int _qp
Definition: DGKernel.h:137
static Threads::spin_mutex _jacoby_vars_mutex
Definition: DGKernel.h:216

◆ computeElemNeighResidual()

void DGKernel::computeElemNeighResidual ( Moose::DGResidualType  type)
virtual

Computes the residual for this element or the neighbor.

Definition at line 185 of file DGKernel.C.

Referenced by computeResidual().

186 {
187  bool is_elem;
188  if (type == Moose::Element)
189  is_elem = true;
190  else
191  is_elem = false;
192 
193  const VariableTestValue & test_space = is_elem ? _test : _test_neighbor;
194 
195  if (is_elem)
197  else
199 
200  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
201  for (_i = 0; _i < test_space.size(); _i++)
203 
205 
206  if (_has_save_in)
207  {
208  Threads::spin_mutex::scoped_lock lock(_resid_vars_mutex);
209  for (const auto & var : _save_in)
210  {
211  std::vector<dof_id_type> & dof_indices =
212  is_elem ? var->dofIndices() : var->dofIndicesNeighbor();
213  var->sys().solution().add_vector(_local_re, dof_indices);
214  }
215  }
216 }
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
bool _has_save_in
The aux variables to save the residual contributions to.
Definition: DGKernel.h:180
unsigned int number() const
Get variable number coming from libMesh.
Assembly & _assembly
Definition: DGKernel.h:114
const MooseArray< Real > & _coord
Definition: DGKernel.h:141
MooseVariable & _var
Definition: DGKernel.h:115
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const VariableTestValue & _test_neighbor
Side test function.
Definition: DGKernel.h:170
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:245
static Threads::spin_mutex _resid_vars_mutex
Definition: DGKernel.h:215
const VariableTestValue & _test
Side shape function.
Definition: DGKernel.h:158
const MooseArray< Real > & _JxW
Definition: DGKernel.h:140
unsigned int _i
Definition: DGKernel.h:143
void prepareVectorTagNeighbor(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual the according to active tags for DG and interface kernels...
DenseVector< Number > _local_re
Holds residual entries as they are accumulated by this Kernel.
virtual Real computeQpResidual(Moose::DGResidualType type)=0
This is the virtual that derived classes should override for computing the residual on neighboring el...
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual the according to active tags.
std::vector< MooseVariableFEBase * > _save_in
Definition: DGKernel.h:181
QBase *& _qrule
Definition: DGKernel.h:139
unsigned int _qp
Definition: DGKernel.h:137

◆ computeJacobian()

void DGKernel::computeJacobian ( )
virtual

Computes the jacobian for the current side.

Definition at line 266 of file DGKernel.C.

Referenced by computeOffDiagJacobian().

267 {
268  // Compute element-element Jacobian
270 
271  // Compute element-neighbor Jacobian
273 
274  // Compute neighbor-element Jacobian
276 
277  // Compute neighbor-neighbor Jacobian
279 }
virtual void computeElemNeighJacobian(Moose::DGJacobianType type)
Computes the element/neighbor-element/neighbor Jacobian.
Definition: DGKernel.C:229

◆ computeOffDiagElemNeighJacobian()

void DGKernel::computeOffDiagElemNeighJacobian ( Moose::DGJacobianType  type,
unsigned int  jvar 
)
virtual

Computes the element-element off-diagonal Jacobian.

Definition at line 282 of file DGKernel.C.

Referenced by computeOffDiagJacobian().

283 {
284  const VariableTestValue & test_space =
286  const VariableTestValue & loc_phi =
288 
291  else
293 
294  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
295  for (_i = 0; _i < test_space.size(); _i++)
296  for (_j = 0; _j < loc_phi.size(); _j++)
298 
300 }
unsigned int number() const
Get variable number coming from libMesh.
Assembly & _assembly
Definition: DGKernel.h:114
const MooseArray< Real > & _coord
Definition: DGKernel.h:141
const VariablePhiValue & _phi_neighbor
Side shape function.
Definition: DGKernel.h:165
DenseMatrix< Number > _local_ke
Holds residual entries as they are accumulated by this Kernel.
MooseVariable & _var
Definition: DGKernel.h:115
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
const VariableTestValue & _test_neighbor
Side test function.
Definition: DGKernel.h:170
void prepareMatrixTagNeighbor(Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type)
Prepare data for computing element jacobian according to the ative tags for DG and interface kernels...
unsigned int _j
Definition: DGKernel.h:143
virtual Real computeQpOffDiagJacobian(Moose::DGJacobianType type, unsigned int jvar)
This is the virtual that derived classes should override for computing the off-diag Jacobian...
Definition: DGKernel.C:324
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:245
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
const VariableTestValue & _test
Side shape function.
Definition: DGKernel.h:158
const MooseArray< Real > & _JxW
Definition: DGKernel.h:140
unsigned int _i
Definition: DGKernel.h:143
const VariablePhiValue & _phi
Definition: DGKernel.h:153
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
Prepare data for computing element jacobian according to the ative tags.
QBase *& _qrule
Definition: DGKernel.h:139
unsigned int _qp
Definition: DGKernel.h:137

◆ computeOffDiagJacobian()

void DGKernel::computeOffDiagJacobian ( unsigned int  jvar)
virtual

Computes d-residual / d-jvar...

Definition at line 303 of file DGKernel.C.

304 {
305  if (jvar == _var.number())
306  computeJacobian();
307  else
308  {
309  // Compute element-element Jacobian
311 
312  // Compute element-neighbor Jacobian
314 
315  // Compute neighbor-element Jacobian
317 
318  // Compute neighbor-neighbor Jacobian
320  }
321 }
virtual void computeOffDiagElemNeighJacobian(Moose::DGJacobianType type, unsigned int jvar)
Computes the element-element off-diagonal Jacobian.
Definition: DGKernel.C:282
unsigned int number() const
Get variable number coming from libMesh.
MooseVariable & _var
Definition: DGKernel.h:115
virtual void computeJacobian()
Computes the jacobian for the current side.
Definition: DGKernel.C:266

◆ computeQpJacobian()

virtual Real DGKernel::computeQpJacobian ( Moose::DGJacobianType  type)
protectedpure virtual

This is the virtual that derived classes should override for computing the Jacobian on neighboring element.

Implemented in DGDiffusion, and DGConvection.

Referenced by computeElemNeighJacobian().

◆ computeQpOffDiagJacobian()

Real DGKernel::computeQpOffDiagJacobian ( Moose::DGJacobianType  type,
unsigned int  jvar 
)
protectedvirtual

This is the virtual that derived classes should override for computing the off-diag Jacobian.

Definition at line 324 of file DGKernel.C.

Referenced by computeOffDiagElemNeighJacobian().

325 {
326  return 0.;
327 }

◆ computeQpResidual()

virtual Real DGKernel::computeQpResidual ( Moose::DGResidualType  type)
protectedpure virtual

This is the virtual that derived classes should override for computing the residual on neighboring element.

Implemented in DGDiffusion, and DGConvection.

Referenced by computeElemNeighResidual().

◆ computeResidual()

void DGKernel::computeResidual ( )
virtual

Computes the residual for the current side.

Definition at line 219 of file DGKernel.C.

220 {
221  // Compute the residual for this element
223 
224  // Compute the residual for the neighbor
226 }
virtual void computeElemNeighResidual(Moose::DGResidualType type)
Computes the residual for this element or the neighbor.
Definition: DGKernel.C:185

◆ coupled()

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

Returns the index for a coupled variable by name.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Index of coupled variable, if this is an optionally coupled variable that wasn't provided this will return a unique "invalid" index.

Reimplemented in ShapeUserObject< ElementUserObject >, and ShapeUserObject< SideUserObject >.

Definition at line 234 of file Coupleable.C.

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

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

◆ coupledCallback()

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

◆ coupledComponents()

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

Number of coupled components.

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

Definition at line 153 of file Coupleable.C.

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

154 {
155  if (isCoupled(var_name))
156  return _coupled_vars[var_name].size();
157  else
158  {
160  return _c_parameters.numberDefaultCoupledValues(var_name);
161  else
162  return 0;
163  }
164 }
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
std::map< std::string, std::vector< MooseVariableFEBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:610
const InputParameters & _c_parameters
Definition: Coupleable.h:601

◆ coupledCurl()

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

Returns curl of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableCurl containing the curl of the coupled variable
See also
Kernel::_curl_u

Definition at line 1077 of file Coupleable.C.

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

◆ coupledCurlOld()

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

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

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableCurl containing the old curl of the coupled variable
See also
Kernel::_curl_u_old

Definition at line 1097 of file Coupleable.C.

1098 {
1099  if (!isCoupled(var_name)) // Return default 0
1100  return _default_vector_curl;
1101 
1102  coupledCallback(var_name, true);
1103  if (_c_nodal)
1104  mooseError("Nodal variables do not have curls");
1105 
1106  validateExecutionerType(var_name, "coupledCurlOld");
1107  VectorMooseVariable * var = getVectorVar(var_name, comp);
1108  if (var == NULL)
1109  mooseError("Call corresponding scalar field variable method");
1110 
1111  if (!_coupleable_neighbor)
1112  return (_c_is_implicit) ? var->curlSlnOld() : var->curlSlnOlder();
1113  else
1114  return (_c_is_implicit) ? var->curlSlnOldNeighbor() : var->curlSlnOlderNeighbor();
1115 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:684
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableCurl & curlSlnOldNeighbor()
const FieldVariableValue & curlSlnOld()
const FieldVariableValue & curlSlnOlder()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableCurl & curlSlnOlderNeighbor()

◆ coupledCurlOlder()

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

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

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VectorVariableCurl containing the older curl of the coupled variable
See also
Kernel::_curl_u_older

Definition at line 1118 of file Coupleable.C.

1119 {
1120  if (!isCoupled(var_name)) // Return default 0
1121  return _default_vector_curl;
1122 
1123  coupledCallback(var_name, true);
1124  if (_c_nodal)
1125  mooseError("Nodal variables do not have curls");
1126 
1127  validateExecutionerType(var_name, "coupledCurlOlder");
1128  VectorMooseVariable * var = getVectorVar(var_name, comp);
1129  if (var == NULL)
1130  mooseError("Call corresponding scalar field variable method");
1131 
1132  if (_c_is_implicit)
1133  {
1134  if (!_coupleable_neighbor)
1135  return var->curlSlnOlder();
1136  else
1137  return var->curlSlnOlderNeighbor();
1138  }
1139  else
1140  mooseError("Older values not available for explicit schemes");
1141 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorVariableCurl _default_vector_curl
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:684
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & curlSlnOlder()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableCurl & curlSlnOlderNeighbor()

◆ coupledDot()

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

Time derivative of a coupled variable.

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

Reimplemented in AuxKernel.

Definition at line 585 of file Coupleable.C.

Referenced by AuxKernel::coupledDot().

586 {
587  checkVar(var_name);
588  if (!isCoupled(var_name)) // Return default 0
589  return _default_value_zero;
590 
591  validateExecutionerType(var_name, "coupledDot");
592  MooseVariable * var = getVar(var_name, comp);
593  if (var == NULL)
594  mooseError("Call corresponding vector variable method");
595 
597  {
598  if (_c_nodal)
599  return var->dofValuesDot();
600  else
601  return var->uDot();
602  }
603  else
604  {
605  if (_c_nodal)
606  return var->dofValuesDotNeighbor();
607  else
608  return var->uDotNeighbor();
609  }
610 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const MooseArray< Number > & dofValuesDot() override
Returns time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
const MooseArray< Number > & dofValuesDotNeighbor() override
Returns time derivative of neighboring degrees of freedom.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableValue & uDot()
const FieldVariableValue & uDotNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledDotDot()

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

Second time derivative of a coupled variable.

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

Definition at line 613 of file Coupleable.C.

614 {
615  checkVar(var_name);
616  if (!isCoupled(var_name)) // Return default 0
617  return _default_value_zero;
618 
619  validateExecutionerType(var_name, "coupledDotDot");
620  MooseVariable * var = getVar(var_name, comp);
621  if (var == NULL)
622  mooseError("Call corresponding vector variable method");
623 
625  {
626  if (_c_nodal)
627  return var->dofValuesDotDot();
628  else
629  return var->uDotDot();
630  }
631  else
632  {
633  if (_c_nodal)
634  return var->dofValuesDotDotNeighbor();
635  else
636  return var->uDotDotNeighbor();
637  }
638 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableValue & uDotDotNeighbor()
const MooseArray< Number > & dofValuesDotDot() override
Returns second time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
const MooseArray< Number > & dofValuesDotDotNeighbor() override
Returns second time derivative of neighboring degrees of freedom.
const FieldVariableValue & uDotDot()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledDotDotDu()

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

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

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

Definition at line 845 of file Coupleable.C.

846 {
847  checkVar(var_name);
848  if (!isCoupled(var_name)) // Return default 0
849  return _default_value_zero;
850 
851  validateExecutionerType(var_name, "coupledDotDotDu");
852  MooseVariable * var = getVar(var_name, comp);
853  if (var == NULL)
854  mooseError("Call corresponding vector variable method");
855 
857  {
858  if (_c_nodal)
859  return var->dofValuesDuDotDotDu();
860  else
861  return var->duDotDotDu();
862  }
863  else
864  {
865  if (_c_nodal)
866  return var->dofValuesDuDotDotDuNeighbor();
867  else
868  return var->duDotDotDu();
869  }
870 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const MooseArray< Number > & dofValuesDuDotDotDu() override
Returns derivative of second time derivative of degrees of freedom.
const MooseArray< Number > & dofValuesDuDotDotDuNeighbor() override
Returns derivative of second time derivative of neighboring degrees of freedom.
const VariableValue & duDotDotDu()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledDotDotOld()

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

Old second time derivative of a coupled variable.

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

Definition at line 669 of file Coupleable.C.

670 {
671  checkVar(var_name);
672  if (!isCoupled(var_name)) // Return default 0
673  return _default_value_zero;
674 
675  validateExecutionerType(var_name, "coupledDotDotOld");
676  MooseVariable * var = getVar(var_name, comp);
677  if (var == NULL)
678  mooseError("Call corresponding vector variable method");
679 
681  {
682  if (_c_nodal)
683  return var->dofValuesDotDotOld();
684  else
685  return var->uDotDotOld();
686  }
687  else
688  {
689  if (_c_nodal)
690  return var->dofValuesDotDotOldNeighbor();
691  else
692  return var->uDotDotOldNeighbor();
693  }
694 }
const MooseArray< Number > & dofValuesDotDotOldNeighbor() override
Returns old second time derivative of neighboring degrees of freedom.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableValue & uDotDotOldNeighbor()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const MooseArray< Number > & dofValuesDotDotOld() override
Returns old second time derivative of degrees of freedom.
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableValue & uDotDotOld()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledDotDu()

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

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

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

Reimplemented in AuxKernel.

Definition at line 817 of file Coupleable.C.

Referenced by AuxKernel::coupledDotDu().

818 {
819  checkVar(var_name);
820  if (!isCoupled(var_name)) // Return default 0
821  return _default_value_zero;
822 
823  validateExecutionerType(var_name, "coupledDotDu");
824  MooseVariable * var = getVar(var_name, comp);
825  if (var == NULL)
826  mooseError("Call corresponding vector variable method");
827 
829  {
830  if (_c_nodal)
831  return var->dofValuesDuDotDu();
832  else
833  return var->duDotDu();
834  }
835  else
836  {
837  if (_c_nodal)
838  return var->dofValuesDuDotDuNeighbor();
839  else
840  return var->duDotDuNeighbor();
841  }
842 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const VariableValue & duDotDu()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
const MooseArray< Number > & dofValuesDuDotDu() override
Returns derivative of time derivative of degrees of freedom.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const MooseArray< Number > & dofValuesDuDotDuNeighbor() override
Returns derivative of time derivative of neighboring degrees of freedom.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const VariableValue & duDotDuNeighbor()

◆ coupledDotOld()

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

Old time derivative of a coupled variable.

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

Definition at line 641 of file Coupleable.C.

642 {
643  checkVar(var_name);
644  if (!isCoupled(var_name)) // Return default 0
645  return _default_value_zero;
646 
647  validateExecutionerType(var_name, "coupledDotOld");
648  MooseVariable * var = getVar(var_name, comp);
649  if (var == NULL)
650  mooseError("Call corresponding vector variable method");
651 
653  {
654  if (_c_nodal)
655  return var->dofValuesDotOld();
656  else
657  return var->uDotOld();
658  }
659  else
660  {
661  if (_c_nodal)
662  return var->dofValuesDotOldNeighbor();
663  else
664  return var->uDotOldNeighbor();
665  }
666 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const MooseArray< Number > & dofValuesDotOld() override
Returns old time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
const MooseArray< Number > & dofValuesDotOldNeighbor() override
Returns old time derivative of neighboring degrees of freedom.
const FieldVariableValue & uDotOldNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableValue & uDotOld()

◆ coupledGradient()

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

Returns gradient of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the gradient of the coupled variable
See also
Kernel::gradient

Definition at line 873 of file Coupleable.C.

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

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

◆ coupledGradientDot()

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

Time derivative of the gradient of a coupled variable.

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

Definition at line 965 of file Coupleable.C.

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

◆ coupledGradientDotDot()

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

Second time derivative of the gradient of a coupled variable.

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

Definition at line 986 of file Coupleable.C.

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

◆ coupledGradientOld()

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

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

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the old gradient of the coupled variable
See also
Kernel::gradientOld

Definition at line 894 of file Coupleable.C.

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

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

◆ coupledGradientOlder()

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

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

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableGradient containing the older gradient of the coupled variable
See also
Kernel::gradientOlder

Definition at line 916 of file Coupleable.C.

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

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

◆ coupledGradientPreviousNL()

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

Returns gradient of a coupled variable for previous Newton iterate.

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

Definition at line 943 of file Coupleable.C.

944 {
945  checkVar(var_name);
946  if (!isCoupled(var_name)) // Return default 0
947  return _default_gradient;
948 
950  coupledCallback(var_name, true);
951  if (_c_nodal)
952  mooseError(_c_name, ": Nodal compute objects do not support gradients");
953 
954  MooseVariable * var = getVar(var_name, comp);
955  if (var == NULL)
956  mooseError("Call corresponding vector variable method");
957 
959  return var->gradSlnPreviousNL();
960  else
961  return var->gradSlnPreviousNLNeighbor();
962 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:607
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableGradient & gradSlnPreviousNLNeighbor()
VariableGradient _default_gradient
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:646
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableGradient & gradSlnPreviousNL()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledMatrixTagScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 162 of file ScalarCoupleable.C.

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

◆ coupledMatrixTagValue()

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

Returns value of a coupled variable for a given tag.

This couples the diag vector of matrix

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

Definition at line 353 of file Coupleable.C.

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

◆ coupledNeighborGradient()

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

Definition at line 92 of file NeighborCoupleable.C.

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

93 {
94  if (_neighbor_nodal)
95  mooseError("Nodal variables do not have gradients");
96 
97  MooseVariable * var = getVar(var_name, comp);
98  return (_c_is_implicit) ? var->gradSlnNeighbor() : var->gradSlnOldNeighbor();
99 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableGradient & gradSlnNeighbor()
const FieldVariableGradient & gradSlnOldNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625

◆ coupledNeighborGradientOld()

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

Definition at line 102 of file NeighborCoupleable.C.

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

103 {
104  if (_neighbor_nodal)
105  mooseError("Nodal variables do not have gradients");
106 
107  validateExecutionerType(var_name, "coupledNeighborGradientOld");
108  MooseVariable * var = getVar(var_name, comp);
109  return (_c_is_implicit) ? var->gradSlnOldNeighbor() : var->gradSlnOlderNeighbor();
110 }
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
const FieldVariableGradient & gradSlnOlderNeighbor()
const FieldVariableGradient & gradSlnOldNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625

◆ coupledNeighborGradientOlder()

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

Definition at line 113 of file NeighborCoupleable.C.

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

114 {
115  if (_neighbor_nodal)
116  mooseError("Nodal variables do not have gradients");
117 
118  validateExecutionerType(var_name, "coupledNeighborGradientOlder");
119  MooseVariable * var = getVar(var_name, comp);
120  if (_c_is_implicit)
121  return var->gradSlnOlderNeighbor();
122  else
123  mooseError("Older values not available for explicit schemes");
124 }
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
const FieldVariableGradient & gradSlnOlderNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625

◆ coupledNeighborSecond()

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

Definition at line 164 of file NeighborCoupleable.C.

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

165 {
166  if (_neighbor_nodal)
167  mooseError("Nodal variables do not have second derivatives");
168 
169  MooseVariable * var = getVar(var_name, comp);
170  return (_c_is_implicit) ? var->secondSlnNeighbor() : var->secondSlnOldNeighbor();
171 }
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
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
const FieldVariableSecond & secondSlnNeighbor()
const FieldVariableSecond & secondSlnOldNeighbor()

◆ coupledNeighborSolutionDoFs()

const DenseVector< Number > & NeighborCoupleable::coupledNeighborSolutionDoFs ( const std::string &  var_name,
unsigned int  comp = 0 
)
virtualinherited

Definition at line 174 of file NeighborCoupleable.C.

175 {
176  if (_neighbor_nodal)
177  mooseError("nodal objects should not call coupledSolutionDoFs");
178 
179  MooseVariable * var = getVar(var_name, comp);
181 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const DenseVector< Number > & solutionDoFsOldNeighbor() override
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const DenseVector< Number > & solutionDoFsNeighbor() override
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625

◆ coupledNeighborSolutionDoFsOld()

const DenseVector< Number > & NeighborCoupleable::coupledNeighborSolutionDoFsOld ( const std::string &  var_name,
unsigned int  comp = 0 
)
virtualinherited

Definition at line 184 of file NeighborCoupleable.C.

185 {
186  if (_neighbor_nodal)
187  mooseError("nodal objects should not call coupledSolutionDoFsOld");
188 
189  validateExecutionerType(var_name, "coupledNeighborSolutionDoFsOld");
190  MooseVariable * var = getVar(var_name, comp);
192 }
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 DenseVector< Number > & solutionDoFsOlderNeighbor() override
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const DenseVector< Number > & solutionDoFsOldNeighbor() override
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625

◆ coupledNeighborSolutionDoFsOlder()

const DenseVector< Number > & NeighborCoupleable::coupledNeighborSolutionDoFsOlder ( const std::string &  var_name,
unsigned int  comp = 0 
)
virtualinherited

Definition at line 195 of file NeighborCoupleable.C.

197 {
198  if (_neighbor_nodal)
199  mooseError("nodal objects should not call coupledSolutionDoFsOlder");
200 
201  validateExecutionerType(var_name, "coupledNeighborSolutionDoFsOlder");
202  MooseVariable * var = getVar(var_name, comp);
203  if (_c_is_implicit)
204  return var->solutionDoFsOlderNeighbor();
205  else
206  mooseError("Older values not available for explicit schemes");
207 }
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 DenseVector< Number > & solutionDoFsOlderNeighbor() override
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
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625

◆ coupledNeighborValue()

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

Definition at line 28 of file NeighborCoupleable.C.

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

29 {
30  MooseVariable * var = getVar(var_name, comp);
31  if (_neighbor_nodal)
32  return (_c_is_implicit) ? var->dofValuesNeighbor() : var->dofValuesOldNeighbor();
33  else
34  return (_c_is_implicit) ? var->slnNeighbor() : var->slnOldNeighbor();
35 }
const FieldVariableValue & slnOldNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const FieldVariableValue & slnNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
const MooseArray< Number > & dofValuesNeighbor() override
Returns dof solution on neighbor element.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.

◆ coupledNeighborValueDot()

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

Definition at line 38 of file NeighborCoupleable.C.

39 {
40  MooseVariable * var = getVar(var_name, comp);
41  if (_neighbor_nodal)
42  return var->dofValuesDotNeighbor();
43  else
44  return var->uDotNeighbor();
45 }
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const MooseArray< Number > & dofValuesDotNeighbor() override
Returns time derivative of neighboring degrees of freedom.
const FieldVariableValue & uDotNeighbor()

◆ coupledNeighborValueDotDu()

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

Definition at line 48 of file NeighborCoupleable.C.

49 {
50  MooseVariable * var = getVar(var_name, comp);
51  if (_neighbor_nodal)
52  return var->dofValuesDuDotDuNeighbor();
53  else
54  return var->duDotDuNeighbor();
55 }
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const MooseArray< Number > & dofValuesDuDotDuNeighbor() override
Returns derivative of time derivative of neighboring degrees of freedom.
const VariableValue & duDotDuNeighbor()

◆ coupledNeighborValueOld()

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

Definition at line 58 of file NeighborCoupleable.C.

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

59 {
60  validateExecutionerType(var_name, "coupledNeighborValueOld");
61 
62  MooseVariable * var = getVar(var_name, comp);
63  if (_neighbor_nodal)
65  else
66  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
67 }
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 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
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.

◆ coupledNeighborValueOlder()

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

Definition at line 70 of file NeighborCoupleable.C.

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

71 {
72  validateExecutionerType(var_name, "coupledNeighborValueOlder");
73 
74  MooseVariable * var = getVar(var_name, comp);
75  if (_neighbor_nodal)
76  {
77  if (_c_is_implicit)
78  return var->dofValuesOlderNeighbor();
79  else
80  mooseError("Older values not available for explicit schemes");
81  }
82  else
83  {
84  if (_c_is_implicit)
85  return var->slnOlderNeighbor();
86  else
87  mooseError("Older values not available for explicit schemes");
88  }
89 }
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
const FieldVariableValue & slnOlderNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.

◆ coupledNodalDot()

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

Nodal values of time derivative of a coupled variable.

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

Definition at line 1327 of file Coupleable.C.

1328 {
1329  checkVar(var_name);
1330  if (!isCoupled(var_name)) // Return default 0
1331  return _default_value_zero;
1332 
1333  validateExecutionerType(var_name, "coupledNodalDot");
1334  coupledCallback(var_name, false);
1335  MooseVariable * var = getVar(var_name, comp);
1336  if (var == NULL)
1337  mooseError("Call corresponding vector variable method");
1338 
1339  if (!_coupleable_neighbor)
1340  return var->dofValuesDot();
1341  else
1342  return var->dofValuesDotNeighbor();
1343 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
const MooseArray< Number > & dofValuesDot() override
Returns time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesDotNeighbor() override
Returns time derivative of neighboring degrees of freedom.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalDotDot()

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

Nodal values of second time derivative of a coupled variable.

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

Definition at line 1346 of file Coupleable.C.

1347 {
1348  checkVar(var_name);
1349  if (!isCoupled(var_name)) // Return default 0
1350  return _default_value_zero;
1351 
1352  validateExecutionerType(var_name, "coupledNodalDotDot");
1353  coupledCallback(var_name, false);
1354  MooseVariable * var = getVar(var_name, comp);
1355  if (var == NULL)
1356  mooseError("Call corresponding vector variable method");
1357 
1358  if (!_coupleable_neighbor)
1359  return var->dofValuesDotDot();
1360  else
1361  return var->dofValuesDotDotNeighbor();
1362 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
const MooseArray< Number > & dofValuesDotDot() override
Returns second time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesDotDotNeighbor() override
Returns second time derivative of neighboring degrees of freedom.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalDotDotOld()

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

Nodal values of old second time derivative of a coupled variable.

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

Definition at line 1384 of file Coupleable.C.

1385 {
1386  checkVar(var_name);
1387  if (!isCoupled(var_name)) // Return default 0
1388  return _default_value_zero;
1389 
1390  validateExecutionerType(var_name, "coupledNodalDotDotOld");
1391  coupledCallback(var_name, false);
1392  MooseVariable * var = getVar(var_name, comp);
1393  if (var == NULL)
1394  mooseError("Call corresponding vector variable method");
1395 
1396  if (!_coupleable_neighbor)
1397  return var->dofValuesDotDotOld();
1398  else
1399  return var->dofValuesDotDotOldNeighbor();
1400 }
const MooseArray< Number > & dofValuesDotDotOldNeighbor() override
Returns old second time derivative of neighboring degrees of freedom.
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
const MooseArray< Number > & dofValuesDotDotOld() override
Returns old second time derivative of degrees of freedom.
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalDotOld()

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

Nodal values of old time derivative of a coupled variable.

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

Definition at line 1365 of file Coupleable.C.

1366 {
1367  checkVar(var_name);
1368  if (!isCoupled(var_name)) // Return default 0
1369  return _default_value_zero;
1370 
1371  validateExecutionerType(var_name, "coupledNodalDotOld");
1372  coupledCallback(var_name, false);
1373  MooseVariable * var = getVar(var_name, comp);
1374  if (var == NULL)
1375  mooseError("Call corresponding vector variable method");
1376 
1377  if (!_coupleable_neighbor)
1378  return var->dofValuesDotOld();
1379  else
1380  return var->dofValuesDotOldNeighbor();
1381 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
const MooseArray< Number > & dofValuesDotOld() override
Returns old time derivative of degrees of freedom.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
VariableValue _default_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:643
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesDotOldNeighbor() override
Returns old time derivative of neighboring degrees of freedom.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalValue()

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

Returns nodal values of a coupled variable.

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

Definition at line 1233 of file Coupleable.C.

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

◆ coupledNodalValueOld()

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

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

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

Definition at line 1256 of file Coupleable.C.

1257 {
1258  checkVar(var_name);
1259  if (!isCoupled(var_name))
1260  return *getDefaultValue(var_name, comp);
1261 
1262  validateExecutionerType(var_name, "coupledNodalValueOld");
1263  coupledCallback(var_name, true);
1264  MooseVariable * var = getVar(var_name, comp);
1265  if (var == NULL)
1266  mooseError("Call corresponding vector variable method");
1267  if (!var->isNodal())
1269  ": Trying to get old nodal values of variable '",
1270  var->name(),
1271  "', but it is not nodal.");
1272 
1273  if (!_coupleable_neighbor)
1274  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
1275  else
1276  return (_c_is_implicit) ? var->dofValuesOldNeighbor() : var->dofValuesOlderNeighbor();
1277 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
const MooseArray< Number > & dofValuesOlder() override
Returns older dof solution on element.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesOld() override
Returns old dof solution on element.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
bool isNodal() const override
Is this variable nodal.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const std::string & name() const
Get the variable name.
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalValueOlder()

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

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

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

Definition at line 1280 of file Coupleable.C.

1281 {
1282  checkVar(var_name);
1283  if (!isCoupled(var_name))
1284  return *getDefaultValue(var_name, comp);
1285 
1286  validateExecutionerType(var_name, "coupledNodalValueOlder");
1287  coupledCallback(var_name, true);
1288  MooseVariable * var = getVar(var_name, comp);
1289  if (var == NULL)
1290  mooseError("Call corresponding vector variable method");
1291  if (!var->isNodal())
1293  ": Trying to get older nodal values of variable '",
1294  var->name(),
1295  "', but it is not nodal.");
1296  if (_c_is_implicit)
1297  {
1298  if (!_coupleable_neighbor)
1299  return var->dofValuesOlder();
1300  else
1301  return var->dofValuesOlderNeighbor();
1302  }
1303  else
1304  mooseError(_c_name, ": Older values not available for explicit schemes");
1305 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
const MooseArray< Number > & dofValuesOlder() override
Returns older dof solution on element.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
bool isNodal() const override
Is this variable nodal.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const std::string & name() const
Get the variable name.
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledNodalValuePreviousNL()

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

Returns nodal values of a coupled variable for previous Newton iterate.

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

Definition at line 1308 of file Coupleable.C.

1309 {
1310  checkVar(var_name);
1311  if (!isCoupled(var_name))
1312  return *getDefaultValue(var_name, comp);
1313 
1315  coupledCallback(var_name, true);
1316  MooseVariable * var = getVar(var_name, comp);
1317  if (var == NULL)
1318  mooseError("Call corresponding vector variable method");
1319 
1320  if (!_coupleable_neighbor)
1321  return var->dofValuesPreviousNL();
1322  else
1323  return var->dofValuesPreviousNLNeighbor();
1324 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:264
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:607
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
const MooseArray< Number > & dofValuesPreviousNL() override
Returns previous nl solution on element.
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
const MooseArray< Number > & dofValuesPreviousNLNeighbor() override
Returns previous nl solution on neighbor element.
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledScalar()

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

Returns the index for a scalar coupled variable by name.

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

Definition at line 105 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

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

◆ coupledScalarComponents()

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

Return the number of components to the coupled scalar variable.

Parameters
var_nameThe of the coupled variable

Definition at line 304 of file ScalarCoupleable.C.

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

◆ coupledScalarDot()

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

Returns the time derivative of a scalar coupled variable.

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

Definition at line 204 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDot()

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

Returns the second time derivative of a scalar coupled variable.

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

Definition at line 213 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDotDu()

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

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

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

Definition at line 248 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDotOld()

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

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

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

Definition at line 231 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDu()

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

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

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

Definition at line 239 of file ScalarCoupleable.C.

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

◆ coupledScalarDotOld()

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

Returns the old time derivative of a scalar coupled variable.

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

Definition at line 222 of file ScalarCoupleable.C.

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

◆ coupledScalarOrder()

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

Returns the order for a scalar coupled variable by name.

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

Definition at line 112 of file ScalarCoupleable.C.

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

◆ coupledScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 136 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

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

◆ coupledScalarValueOld()

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

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

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

Definition at line 177 of file ScalarCoupleable.C.

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

◆ coupledScalarValueOlder()

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

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

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

Definition at line 189 of file ScalarCoupleable.C.

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

◆ coupledSecond()

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

Returns second derivative of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the second derivative of the coupled variable
See also
Kernel::second

Definition at line 1144 of file Coupleable.C.

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

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

◆ coupledSecondOld()

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

Returns an old second derivative from previous time step of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the old second derivative of the coupled variable
See also
Kernel::secondOld

Definition at line 1165 of file Coupleable.C.

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

◆ coupledSecondOlder()

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

Returns an old second derivative from two time steps previous of a coupled variable.

Parameters
var_nameName of coupled variable
compComponent number for vector of coupled variables
Returns
Reference to a VariableSecond containing the older second derivative of the coupled variable
See also
Kernel::secondOlder

Definition at line 1186 of file Coupleable.C.

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