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

VectorConstantIC just returns a constant value. More...

#include <VectorConstantIC.h>

Inheritance diagram for VectorConstantIC:
[legend]

Public Types

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

Public Member Functions

 VectorConstantIC (const InputParameters &parameters)
 
virtual RealVectorValue value (const Point &p) override
 The value of the variable at a point. More...
 
virtual MooseVariableFEBasevariable () override
 retrieves the MOOSE variable that this initial condition acts upon More...
 
virtual void compute () override
 Workhorse method for projecting the initial conditions for block initial conditions. More...
 
virtual void computeNodal (const Point &p) override
 Workhorse method for projecting the initial conditions for boundary restricted initial conditions. More...
 
virtual GradientType gradient (const Point &)
 The gradient of the variable at a point. More...
 
void setCZeroVertices ()
 set the temporary solution vector for node projections of C0 variables More...
 
template<>
void setCZeroVertices ()
 
void setHermiteVertices ()
 set the temporary solution vector for node projections of Hermite variables More...
 
template<>
void setHermiteVertices ()
 
void setOtherCOneVertices ()
 set the temporary solution vector for node projections of non-Hermitian C1 variables More...
 
template<>
void setOtherCOneVertices ()
 
Real dotHelper (const GradientType &op1, const GradientType &op2)
 Helps perform multiplication of GradientTypes: a normal dot product for vectors and a contraction for tensors. More...
 
template<>
Real dotHelper (const GradientType &op1, const GradientType &op2)
 
void choleskySolve (bool is_volume)
 Perform the cholesky solves for edge, side, and interior projections. More...
 
const std::set< std::string > & getDependObjects () const
 getter method for dependent user objects More...
 
virtual void initialSetup ()
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual const std::set< std::string > & getRequestedItems () override
 Return a set containing the names of items requested by the object. More...
 
virtual const std::set< std::string > & getSuppliedItems () override
 Return a set containing the names of items owned by the object. More...
 
template<typename T2 >
const T2 & getUserObject (const std::string &name)
 reimplements the getUserObject method from UserObjectInterface More...
 
template<typename T >
const T & getUserObject (const std::string &name)
 
template<typename T2 >
const T2 & getUserObjectByName (const UserObjectName &name)
 reimplements the getUserObjectByName method from UserObjectInterface More...
 
template<typename T >
const T & getUserObjectByName (const UserObjectName &name)
 
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)
 reimplements the getUserObjectBase method from UserObjectInterface More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & 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...
 
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 ()
 
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...
 
const UserObjectgetUserObjectBaseByName (const std::string &name)
 Get an user object with a given name. More...
 
virtual const std::set< BoundaryID > & boundaryIDs () const
 Return the boundary IDs for this object. More...
 
const std::vector< BoundaryName > & boundaryNames () const
 Return the boundary names for this object. More...
 
unsigned int numBoundaryIDs () const
 Return the number of boundaries for this object. More...
 
bool hasBoundary (const BoundaryName &name) const
 Test if the supplied boundary name is valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 Test if the supplied vector of boundary names are valid for this object. More...
 
bool hasBoundary (const BoundaryID &id) const
 Test if the supplied boundary ids are valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 Test if the supplied vector boundary ids are valid for this object. More...
 
bool hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const
 Test if the supplied set of boundary ids are valid for this object. More...
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 Test if the class boundary ids are a subset of the supplied objects. More...
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
template<typename T >
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 Check if a material property is valid for all boundaries of this object. More...
 
virtual bool boundaryRestricted () const
 Returns true if this object has been restricted to a boundary. More...
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 Returns the set of all boundary ids for the entire mesh. More...
 

Static Public Member Functions

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

Public Attributes

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

Protected Member Functions

virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty. More...
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 An initialization routine needed for dual constructors. More...
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 Check if the blocks this object operates on all have the same coordinate system, and if so return it. More...
 
virtual 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...
 
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...
 
bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 A helper method to avoid circular #include problems. More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 

Protected Attributes

const Real _x_value
 
const Real _y_value
 
const Real _z_value
 
FEProblemBase_fe_problem
 
THREAD_ID _tid
 
Assembly_assembly
 
Real & _t
 Time. More...
 
const Moose::CoordinateSystemType_coord_sys
 The coordinate system type for this problem, references the value in Assembly. More...
 
MooseVariableFE< T > & _var
 The variable that this initial condition is acting upon. More...
 
const Elem *& _current_elem
 The current element we are on will retrieving values at specific points in the domain. More...
 
const Node * _current_node
 The current node if the point we are evaluating at also happens to be a node. More...
 
unsigned int _qp
 The current quadrature point, contains the "nth" node number when visiting nodes. More...
 
DenseMatrix< Real > _Ke
 Matrix storage member. More...
 
DenseVector< Number > _Fe
 Linear b vector. More...
 
DenseVector< Number > _Ue
 Linear solution vector. More...
 
const FEType & _fe_type
 The finite element type for the IC variable. More...
 
FEContinuity _cont
 The type of continuity, e.g. C0, C1. More...
 
std::vector< dof_id_type > _dof_indices
 The global DOF indices. More...
 
std::vector< unsigned int > _side_dofs
 Side/edge DOF indices. More...
 
unsigned int _n_qp
 The number of quadrature points for a given element. More...
 
unsigned int _n_nodes
 The number of nodes for a given element. More...
 
std::vector< char > _dof_is_fixed
 Whether the degree of freedom is fixed (true/false) More...
 
std::vector< int > _free_dof
 Stores the ids of the free dofs. More...
 
dof_id_type _free_dofs
 The number of free dofs. More...
 
dof_id_type _current_dof
 The current dof being operated on. More...
 
dof_id_type _nc
 number of dofs per node per variable More...
 
const std::vector< std::vector< ValueType > > * _phi
 pointers to shape functions More...
 
const std::vector< std::vector< GradientType > > * _dphi
 pointers to shape function gradients More...
 
const std::vector< Real > * _JxW
 pointers to the Jacobian * quadrature weights for current element More...
 
const std::vector< Point > * _xyz_values
 pointers to the xyz coordinates of the quadrature points for the current element More...
 
unsigned int _n
 node counter More...
 
unsigned int _dim
 the mesh dimension More...
 
SystemBase_sys
 The system object. More...
 
std::set< std::string > _depend_vars
 Dependent variables. More...
 
std::set< std::string > _supplied_vars
 Supplied variables. More...
 
std::set< std::string > _depend_uo
 Depend UserObjects. More...
 
const bool _ignore_uo_dependency
 If set, UOs retrieved by this IC will not be executed before this IC. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
std::shared_ptr< MaterialData_blk_material_data
 Pointer to the MaterialData class for this object. More...
 
const InputParameters_c_parameters
 
const std::string & _c_name
 The name of the object this interface is part of. More...
 
FEProblemBase_c_fe_problem
 
std::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, 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...
 

Detailed Description

VectorConstantIC just returns a constant value.

Definition at line 33 of file VectorConstantIC.h.

Member Typedef Documentation

◆ FEBaseType

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

Definition at line 41 of file InitialConditionTempl.h.

◆ GradientType

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

Definition at line 43 of file InitialConditionTempl.h.

◆ ValueType

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

Definition at line 42 of file InitialConditionTempl.h.

Member Enumeration Documentation

◆ TEST_TYPE

A flag changing the behavior of hasBoundary.

Enumerator
ALL 
ANY 

Definition at line 35 of file BoundaryRestrictable.h.

Constructor & Destructor Documentation

◆ VectorConstantIC()

VectorConstantIC::VectorConstantIC ( const InputParameters parameters)

Definition at line 28 of file VectorConstantIC.C.

30  _x_value(getParam<Real>("x_value")),
31  _y_value(getParam<Real>("y_value")),
32  _z_value(getParam<Real>("z_value"))
33 {
34 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
InitialConditionTempl< RealVectorValue > VectorInitialCondition

Member Function Documentation

◆ adCoupledGradientTemplate()

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

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

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

Definition at line 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

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

◆ checkVar()

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

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

Parameters
var_nameThe name of the coupled variable

Definition at line 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.

◆ choleskySolve()

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

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

Definition at line 415 of file InitialConditionTempl.C.

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

◆ compute()

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

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

Implements InitialConditionBase.

Definition at line 55 of file InitialConditionTempl.C.

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

◆ computeNodal()

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

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

Implements InitialConditionBase.

Definition at line 483 of file InitialConditionTempl.C.

484 {
485  _var.reinitNode();
486  _var.computeNodalValues(); // has to call this to resize the internal array
487  auto return_value = value(p);
488 
489  _var.setNodalValue(return_value); // update variable data, which is referenced by others, so the
490  // value is up-to-date
491 
492  // We are done, so update the solution vector
493  {
494  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
495  _var.insert(_var.sys().solution());
496  }
497 }
MooseVariableFE< T > & _var
The variable that this initial condition is acting upon.
virtual void computeNodalValues() override
Compute nodal values of this variable.
virtual ValueType value(const Point &p)=0
The value of the variable at a point.
void insert(NumericVector< Number > &residual) override
void setNodalValue(OutputType value, unsigned int idx=0)
virtual NumericVector< Number > & solution()=0
void reinitNode() override
SystemBase & sys()
Get the system this variable is part of.

◆ coupled()

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

Returns the index for a coupled variable by name.

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

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

Definition at line 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

◆ coupledMatrixTagValue()

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

Returns value of a coupled variable for a given tag.

This couples the diag vector of matrix

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

Definition at line 353 of file Coupleable.C.

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

◆ coupledNodalDot()

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

Nodal values of time derivative of a coupled variable.

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

Definition at line 1327 of file Coupleable.C.

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

◆ coupledNodalDotDot()

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

Nodal values of second time derivative of a coupled variable.

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

Definition at line 1346 of file Coupleable.C.

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

◆ coupledNodalDotDotOld()

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

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

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

Definition at line 1384 of file Coupleable.C.

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

◆ coupledNodalDotOld()

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

Nodal values of old time derivative of a coupled variable.

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

Definition at line 1365 of file Coupleable.C.

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

◆ coupledNodalValue()

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

Returns nodal values of a coupled variable.

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

Definition at line 1233 of file Coupleable.C.

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

◆ coupledNodalValueOld()

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

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

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

Definition at line 1256 of file Coupleable.C.

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

◆ coupledNodalValueOlder()

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

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

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

Definition at line 1280 of file Coupleable.C.

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

◆ coupledNodalValuePreviousNL()

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

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

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

Definition at line 1308 of file Coupleable.C.

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

◆ coupledSecond()

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

Returns second derivative of a coupled variable.

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

Definition at line 1144 of file Coupleable.C.

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

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

◆ coupledSecondOld()

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

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

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

Definition at line 1165 of file Coupleable.C.

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

◆ coupledSecondOlder()

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

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

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

Definition at line 1186 of file Coupleable.C.

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

◆ coupledSecondPreviousNL()

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

Returns second derivative of a coupled variable for the previous Newton iterate.

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

Definition at line 1212 of file Coupleable.C.

1213 {
1214  checkVar(var_name);
1215  if (!isCoupled(var_name)) // Return default 0
1216  return _default_second;
1217 
1219  coupledCallback(var_name, true);
1220  if (_c_nodal)
1221  mooseError(_c_name, ": Nodal variables do not have second derivatives");
1222 
1223  MooseVariable * var = getVar(var_name, comp);
1224  if (var == NULL)
1225  mooseError("Call corresponding vector variable method");
1226  if (!_coupleable_neighbor)
1227  return var->secondSlnPreviousNL();
1228  else
1229  return var->secondSlnPreviousNLNeighbor();
1230 }
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
FEProblemBase & _c_fe_problem
Definition: Coupleable.h:607
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
VariableSecond _default_second
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:652
void needsPreviousNewtonIteration(bool state)
Set a flag that indicated that user required values for the previous Newton iterate.
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableSecond & secondSlnPreviousNLNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableSecond & secondSlnPreviousNL()

◆ coupledSolutionDoFs()

const DenseVector< Number > & Coupleable::coupledSolutionDoFs ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns DoFs in the current solution vector of a coupled variable for the local element.

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

Definition at line 1402 of file Coupleable.C.

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

◆ coupledSolutionDoFsOld()

const DenseVector< Number > & Coupleable::coupledSolutionDoFsOld ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns DoFs in the old solution vector of a coupled variable for the local element.

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

Definition at line 1422 of file Coupleable.C.

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

◆ coupledSolutionDoFsOlder()

const DenseVector< Number > & Coupleable::coupledSolutionDoFsOlder ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns DoFs in the older solution vector of a coupled variable for the local element.

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

Definition at line 1443 of file Coupleable.C.

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

◆ coupledValue()

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

Returns value of a coupled variable.

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

Definition at line 305 of file Coupleable.C.

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

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

◆ coupledValueOld()

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

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

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

Definition at line 408 of file Coupleable.C.

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

409 {
410  checkVar(var_name);
411  if (!isCoupled(var_name))
412  return *getDefaultValue(var_name, comp);
413 
414  validateExecutionerType(var_name, "coupledValueOld");
415  coupledCallback(var_name, true);
416  MooseVariable * var = getVar(var_name, comp);
417  if (var == NULL)
418  mooseError("Call coupledVectorValueOld for coupled vector variables");
419 
421  {
422  if (_c_nodal)
423  return (_c_is_implicit) ? var->dofValuesOld() : var->dofValuesOlder();
424  else
425  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
426  }
427  else
428  {
429  if (_c_nodal)
431  else
432  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
433  }
434 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const MooseArray< Number > & dofValuesOlder() override
Returns older dof solution on element.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOldNeighbor()
const FieldVariableValue & slnOlderNeighbor()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled variable.
Definition: Coupleable.C:200
VariableValue * getDefaultValue(const std::string &var_name, unsigned int comp)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
Definition: Coupleable.C:264
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const MooseArray< Number > & dofValuesOld() override
Returns old dof solution on element.
const FieldVariableValue & slnOld()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const MooseArray< Number > & dofValuesOlderNeighbor() override
Returns older dof solution on neighbor element.
const MooseArray< Number > & dofValuesOldNeighbor() override
Returns old dof solution on neighbor element.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableValue & slnOlder()

◆ coupledValueOlder()

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

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

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

Definition at line 437 of file Coupleable.C.

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

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

◆ coupledValuePreviousNL()

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

Returns value of previous Newton iterate of a coupled variable.

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

Definition at line 486 of file Coupleable.C.

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

◆ coupledVectorDot()

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

Time derivative of a coupled vector variable.

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

Definition at line 697 of file Coupleable.C.

698 {
699  checkVar(var_name);
700  if (!isCoupled(var_name)) // Return default 0
702 
703  validateExecutionerType(var_name, "coupledVectorDot");
704  VectorMooseVariable * var = getVectorVar(var_name, comp);
705  if (var == NULL)
706  mooseError("Call corresponding standard variable method");
707 
709  {
710  if (_c_nodal)
711  mooseError("Vector variables are not required to be continuous and so should not be used "
712  "with nodal compute objects");
713  else
714  return var->uDot();
715  }
716  else
717  {
718  if (_c_nodal)
719  mooseError("Vector variables are not required to be continuous and so should not be used "
720  "with nodal compute objects");
721  else
722  return var->uDotNeighbor();
723  }
724 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
const FieldVariableValue & uDot()
const FieldVariableValue & uDotNeighbor()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorDotDot()

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

Second time derivative of a coupled vector variable.

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

Definition at line 727 of file Coupleable.C.

728 {
729  checkVar(var_name);
730  if (!isCoupled(var_name)) // Return default 0
732 
733  validateExecutionerType(var_name, "coupledVectorDotDot");
734  VectorMooseVariable * var = getVectorVar(var_name, comp);
735  if (var == NULL)
736  mooseError("Call corresponding standard variable method");
737 
739  {
740  if (_c_nodal)
741  mooseError("Vector variables are not required to be continuous and so should not be used "
742  "with nodal compute objects");
743  else
744  return var->uDotDot();
745  }
746  else
747  {
748  if (_c_nodal)
749  mooseError("Vector variables are not required to be continuous and so should not be used "
750  "with nodal compute objects");
751  else
752  return var->uDotDotNeighbor();
753  }
754 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
const FieldVariableValue & uDotDotNeighbor()
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
const FieldVariableValue & uDotDot()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorDotDotOld()

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

Old second time derivative of a coupled vector variable.

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

Definition at line 787 of file Coupleable.C.

788 {
789  checkVar(var_name);
790  if (!isCoupled(var_name)) // Return default 0
792 
793  validateExecutionerType(var_name, "coupledVectorDotDotOld");
794  VectorMooseVariable * var = getVectorVar(var_name, comp);
795  if (var == NULL)
796  mooseError("Call corresponding standard variable method");
797 
799  {
800  if (_c_nodal)
801  mooseError("Vector variables are not required to be continuous and so should not be used "
802  "with nodal compute objects");
803  else
804  return var->uDotDotOld();
805  }
806  else
807  {
808  if (_c_nodal)
809  mooseError("Vector variables are not required to be continuous and so should not be used "
810  "with nodal compute objects");
811  else
812  return var->uDotDotOldNeighbor();
813  }
814 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
const FieldVariableValue & uDotDotOldNeighbor()
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
const FieldVariableValue & uDotDotOld()
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167

◆ coupledVectorDotOld()

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

Old time derivative of a coupled vector variable.

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

Definition at line 757 of file Coupleable.C.

758 {
759  checkVar(var_name);
760  if (!isCoupled(var_name)) // Return default 0
762 
763  validateExecutionerType(var_name, "coupledVectorDotOld");
764  VectorMooseVariable * var = getVectorVar(var_name, comp);
765  if (var == NULL)
766  mooseError("Call corresponding standard variable method");
767 
769  {
770  if (_c_nodal)
771  mooseError("Vector variables are not required to be continuous and so should not be used "
772  "with nodal compute objects");
773  else
774  return var->uDotOld();
775  }
776  else
777  {
778  if (_c_nodal)
779  mooseError("Vector variables are not required to be continuous and so should not be used "
780  "with nodal compute objects");
781  else
782  return var->uDotOldNeighbor();
783  }
784 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
const FieldVariableValue & uDotOldNeighbor()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
VectorVariableValue _default_vector_value_zero
This will always be zero because the default values for optionally coupled variables is always consta...
Definition: Coupleable.h:678
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
Definition: Coupleable.C:167
const FieldVariableValue & uDotOld()

◆ coupledVectorGradient()

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

Returns gradient of a coupled vector variable.

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

Definition at line 1007 of file Coupleable.C.

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

◆ coupledVectorGradientOld()

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

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

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

Definition at line 1028 of file Coupleable.C.

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

◆ coupledVectorGradientOlder()

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

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

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

Definition at line 1050 of file Coupleable.C.

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

◆ coupledVectorTagValue()

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

Returns value of a coupled variable for a given tag.

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

Definition at line 333 of file Coupleable.C.

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

◆ coupledVectorValue()

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

Returns value of a coupled vector variable.

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

Definition at line 373 of file Coupleable.C.

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

◆ coupledVectorValueOld()

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

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

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

Definition at line 515 of file Coupleable.C.

516 {
517  if (!isCoupled(var_name))
518  return *getVectorDefaultValue(var_name);
519 
520  validateExecutionerType(var_name, "coupledVectorValueOld");
521  coupledCallback(var_name, true);
522  VectorMooseVariable * var = getVectorVar(var_name, comp);
523  if (var == NULL)
524  mooseError("Call coupledValueOld for coupled scalar field variables");
525 
527  {
528  if (_c_nodal)
529  mooseError("Vector variables are not required to be continuous and so should not be used "
530  "with nodal compute objects");
531  else
532  return (_c_is_implicit) ? var->slnOld() : var->slnOlder();
533  }
534  else
535  {
536  if (_c_nodal)
537  mooseError("Vector variables are not required to be continuous and so should not be used "
538  "with nodal compute objects");
539  else
540  return (_c_is_implicit) ? var->slnOldNeighbor() : var->slnOlderNeighbor();
541  }
542 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
VectorVariableValue * getVectorDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled vector variable...
Definition: Coupleable.C:291
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOldNeighbor()
const FieldVariableValue & slnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
const FieldVariableValue & slnOld()
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableValue & slnOlder()

◆ coupledVectorValueOlder()

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

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

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

Definition at line 545 of file Coupleable.C.

546 {
547  if (!isCoupled(var_name))
548  return *getVectorDefaultValue(var_name);
549 
550  validateExecutionerType(var_name, "coupledVectorValueOlder");
551  coupledCallback(var_name, true);
552  VectorMooseVariable * var = getVectorVar(var_name, comp);
553  if (var == NULL)
554  mooseError("Call coupledValueOlder for coupled scalar field variables");
555 
557  {
558  if (_c_nodal)
559  mooseError("Vector variables are not required to be continuous and so should not be used "
560  "with nodal compute objects");
561  else
562  {
563  if (_c_is_implicit)
564  return var->slnOlder();
565  else
566  mooseError("Older values not available for explicit schemes");
567  }
568  }
569  else
570  {
571  if (_c_nodal)
572  mooseError("Vector variables are not required to be continuous and so should not be used "
573  "with nodal compute objects");
574  else
575  {
576  if (_c_is_implicit)
577  return var->slnOlderNeighbor();
578  else
579  mooseError("Older values not available for explicit schemes");
580  }
581  }
582 }
void validateExecutionerType(const std::string &name, const std::string &fn_name) const
Checks to make sure that the current Executioner has set "_is_transient" when old/older values are co...
Definition: Coupleable.C:1468
bool _c_nodal
True if we provide coupling to nodal values.
Definition: Coupleable.h:622
VectorMooseVariable * getVectorVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled vector variable.
Definition: Coupleable.C:217
VectorVariableValue * getVectorDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled vector variable...
Definition: Coupleable.C:291
Class for stuff related to variables.
Definition: Adaptivity.h:30
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const FieldVariableValue & slnOlderNeighbor()
bool _c_is_implicit
True if implicit value is required.
Definition: Coupleable.h:625
virtual bool isCoupled(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled as name.
Definition: Coupleable.C:131
virtual void coupledCallback(const std::string &var_name, bool is_old)
Definition: Coupleable.C:126
bool _coupleable_neighbor
Whether or not this object is a "neighbor" object: ie all of it&#39;s coupled values should be neighbor v...
Definition: Coupleable.h:726
const FieldVariableValue & slnOlder()

◆ cyclicDependencyError()

template<typename T >
void DependencyResolverInterface::cyclicDependencyError ( CyclicDependencyException< T > &  e,
const std::string &  header 
)
staticinherited

A helper method for cyclic errors.

Definition at line 95 of file DependencyResolverInterface.h.

97 {
98  std::ostringstream oss;
99 
100  oss << header << ":\n";
101  const typename std::multimap<T, T> & depends = e.getCyclicDependencies();
102  for (typename std::multimap<T, T>::const_iterator it = depends.begin(); it != depends.end(); ++it)
103  oss << (static_cast<T>(it->first))->name() << " -> " << (static_cast<T>(it->second))->name()
104  << "\n";
105  mooseError(oss.str());
106 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const std::multimap< T, T > & getCyclicDependencies() const

◆ declareRecoverableData() [1/2]

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

Declare a piece of data as "recoverable".

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

Note - this data will NOT be restored on Restart!

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

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

Definition at line 269 of file Restartable.h.

270 {
271  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
272 
273  registerRecoverableDataOnApp(full_name);
274 
275  return declareRestartableDataWithContext<T>(data_name, nullptr);
276 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRecoverableData() [2/2]

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

Declare a piece of data as "restartable" and initialize it.

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

Note - this data will NOT be restored on Restart!

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

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

Definition at line 280 of file Restartable.h.

281 {
282  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
283 
284  registerRecoverableDataOnApp(full_name);
285 
286  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
287 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRestartableData() [1/2]

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 202 of file Restartable.h.

203 {
204  return declareRestartableDataWithContext<T>(data_name, nullptr);
205 }

◆ declareRestartableData() [2/2]

template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name,
const T &  init_value 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

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

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

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

Definition at line 209 of file Restartable.h.

210 {
211  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
212 }

◆ declareRestartableDataWithContext() [1/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

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

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions

Definition at line 216 of file Restartable.h.

217 {
218  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
219  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
220  T & restartable_data_ref = data_ptr->get();
221 
222  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
223 
224  return restartable_data_ref;
225 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:197
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithContext() [2/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
const T &  init_value,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

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

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
init_valueThe initial value of the data
contextContext pointer that will be passed to the load and store functions

Definition at line 229 of file Restartable.h.

232 {
233  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
234  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
235  data_ptr->set() = init_value;
236 
237  T & restartable_data_ref = data_ptr->get();
238  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
239 
240  return restartable_data_ref;
241 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:197
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithObjectName()

template<typename T >
T & Restartable::declareRestartableDataWithObjectName ( std::string  data_name,
std::string  object_name 
)
protectedinherited

Declare a piece of data as "restartable".

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

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.

Definition at line 245 of file Restartable.h.

246 {
247  return declareRestartableDataWithObjectNameWithContext<T>(data_name, object_name, nullptr);
248 }

◆ declareRestartableDataWithObjectNameWithContext()

template<typename T >
T & Restartable::declareRestartableDataWithObjectNameWithContext ( std::string  data_name,
std::string  object_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

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

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

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
contextContext pointer that will be passed to the load and store functions

Definition at line 252 of file Restartable.h.

255 {
256  std::string old_name = _restartable_name;
257 
258  _restartable_name = object_name;
259 
260  T & value = declareRestartableDataWithContext<T>(data_name, context);
261 
262  _restartable_name = old_name;
263 
264  return value;
265 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191

◆ dotHelper() [1/2]

template<typename T >
Real InitialConditionTempl< T >::dotHelper ( const GradientType op1,
const GradientType op2 
)
inherited

Helps perform multiplication of GradientTypes: a normal dot product for vectors and a contraction for tensors.

Definition at line 400 of file InitialConditionTempl.C.

401 {
402  return op1 * op2;
403 }

◆ dotHelper() [2/2]

template<>
Real InitialConditionTempl< RealVectorValue >::dotHelper ( const GradientType op1,
const GradientType op2 
)
inherited

Definition at line 407 of file InitialConditionTempl.C.

409 {
410  return op1.contract(op2);
411 }

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 91 of file MooseObject.h.

Referenced by EigenKernel::enabled().

91 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:180

◆ getBlockCoordSystem()

Moose::CoordinateSystemType BlockRestrictable::getBlockCoordSystem ( )
protectedinherited

Check if the blocks this object operates on all have the same coordinate system, and if so return it.

Definition at line 285 of file BlockRestrictable.C.

286 {
287  if (!_blk_mesh)
288  mooseError("No mesh available in BlockRestrictable::checkCoordSystem()");
289  if (!_blk_feproblem)
290  mooseError("No problem available in BlockRestrictable::checkCoordSystem()");
291 
292  const auto & subdomains = blockRestricted() ? blockIDs() : meshBlockIDs();
293 
294  if (subdomains.empty())
295  mooseError("No subdomains found in the problem.");
296 
297  // make sure all subdomains are using the same coordinate system
298  auto coord_system = _blk_feproblem->getCoordSystem(*subdomains.begin());
299  for (auto subdomain : subdomains)
300  if (_blk_feproblem->getCoordSystem(subdomain) != coord_system)
301  mooseError("This object requires all subdomains to have the same coordinate system.");
302 
303  return coord_system;
304 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
FEProblemBase * _blk_feproblem
Pointer to FEProblemBase.
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a boundary.
virtual Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) override
const std::set< SubdomainID > & meshBlockIDs() const
Return all of the SubdomainIDs for the mesh.
MooseMesh * _blk_mesh
Pointer to Mesh.

◆ getCheckedPointerParam()

template<typename T >
T MooseObject::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const
inlineinherited

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 72 of file MooseObject.h.

73  {
74  return parameters().getCheckedPointerParam<T>(name, error_string);
75  }
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...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getCoupledMooseVars()

const std::vector<MooseVariableFEBase *>& Coupleable::getCoupledMooseVars ( ) const
inlineinherited

◆ getCoupledStandardMooseVars()

const std::vector<MooseVariable *>& Coupleable::getCoupledStandardMooseVars ( ) const
inlineinherited

Get the list of standard coupled variables.

Returns
The list of standard coupled variables

Definition at line 73 of file Coupleable.h.

74  {
76  }
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
Definition: Coupleable.h:616

◆ getCoupledVars()

const std::map<std::string, std::vector<MooseVariableFEBase *> >& Coupleable::getCoupledVars ( )
inlineinherited

Get the list of coupled variables.

Returns
The list of coupled variables

Definition at line 55 of file Coupleable.h.

Referenced by AuxKernel::AuxKernel(), and InitialConditionBase::InitialConditionBase().

56  {
57  return _coupled_vars;
58  }
std::map< std::string, std::vector< MooseVariableFEBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:610

◆ getCoupledVectorMooseVars()

const std::vector<VectorMooseVariable *>& Coupleable::getCoupledVectorMooseVars ( ) const
inlineinherited

Get the list of vector coupled variables.

Returns
The list of vector coupled variables

Definition at line 82 of file Coupleable.h.

83  {
85  }
std::vector< VectorMooseVariable * > _coupled_vector_moose_vars
Vector of vector coupled variables.
Definition: Coupleable.h:619

◆ getDependObjects()

const std::set<std::string>& InitialConditionBase::getDependObjects ( ) const
inlineinherited

getter method for dependent user objects

Definition at line 68 of file InitialConditionBase.h.

68 { return _depend_uo; }
std::set< std::string > _depend_uo
Depend UserObjects.

◆ getFEVar()

MooseVariableFEBase * Coupleable::getFEVar ( const std::string &  var_name,
unsigned int  comp 
)
protectedinherited

Extract pointer to a base finite element coupled variable.

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

Definition at line 186 of file Coupleable.C.

Referenced by Coupleable::coupled(), Coupleable::coupledSolutionDoFs(), Coupleable::coupledSolutionDoFsOld(), and Coupleable::coupledSolutionDoFsOlder().

187 {
188  if (comp < _coupled_vars[var_name].size())
189  {
190  // Error check - don't couple elemental to nodal
191  if (!(_coupled_vars[var_name][comp])->isNodal() && _c_nodal)
192  mooseError(_c_name, ": You cannot couple an elemental variable to a nodal variable");
193  return _coupled_vars[var_name][comp];
194  }
195  else
196  mooseError(_c_name, ": Trying to get a non-existent component of variable '", var_name, "'");
197 }
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
std::map< std::string, std::vector< MooseVariableFEBase * > > _coupled_vars
Coupled vars whose values we provide.
Definition: Coupleable.h:610
const std::string & _c_name
The name of the object this interface is part of.
Definition: Coupleable.h:604

◆ getFEVariableCoupleableMatrixTags()

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

Definition at line 93 of file Coupleable.h.

std::set< TagID > _fe_coupleable_matrix_tags
Definition: Coupleable.h:774

◆ getFEVariableCoupleableVectorTags()

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

Definition at line 91 of file Coupleable.h.

std::set< TagID > _fe_coupleable_vector_tags
Definition: Coupleable.h:772

◆ getFunction()

Function & FunctionInterface::getFunction ( const std::string &  name)
inherited

Get a function with a given name.

Parameters
nameThe name of the parameter key of the function to retrieve
Returns
The function with name associated with the parameter 'name'

Definition at line 30 of file FunctionInterface.C.

Referenced by FunctionDT::FunctionDT().

31 {
32  return _fni_feproblem.getFunction(_fni_params.get<FunctionName>(name), _fni_tid);
33 }
virtual Function & getFunction(const std::string &name, THREAD_ID tid=0)
FEProblemBase & _fni_feproblem
Reference to FEProblemBase instance.
const InputParameters & _fni_params
Parameters of the object with this interface.
THREAD_ID _fni_tid
Thread ID.

◆ getFunctionByName()

Function & FunctionInterface::getFunctionByName ( const FunctionName &  name)
inherited

Get a function with a given name.

Parameters
nameThe name of the function to retrieve
Returns
The function with name 'name'

Definition at line 36 of file FunctionInterface.C.

Referenced by CompositeFunction::CompositeFunction(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GenericFunctionMaterial::GenericFunctionMaterial(), LinearCombinationFunction::LinearCombinationFunction(), and LineFunctionSampler::LineFunctionSampler().

37 {
38  return _fni_feproblem.getFunction(name, _fni_tid);
39 }
virtual Function & getFunction(const std::string &name, THREAD_ID tid=0)
FEProblemBase & _fni_feproblem
Reference to FEProblemBase instance.
THREAD_ID _fni_tid
Thread ID.

◆ getMooseApp()

MooseApp& MooseObject::getMooseApp ( ) const
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 86 of file MooseObject.h.

Referenced by RestartableDataIO::createBackup(), RestartableDataIO::deserializeRestartableData(), ConsoleUtils::outputMeshInformation(), Resurrector::restartRestartableData(), and RestartableDataIO::restoreBackup().

86 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ getParam()

template<typename T >
const T & MooseObject::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 185 of file MooseObject.h.

Referenced by FEProblemBase::addMaterialHelper(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), DerivativeParsedMaterial::DerivativeParsedMaterial(), EigenKernel::EigenKernel(), FEProblemBase::FEProblemBase(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), SideSetsBetweenSubdomainsGenerator::generate(), ExtraNodesetGenerator::generate(), MeshExtruderGenerator::generate(), SideSetsAroundSubdomainGenerator::generate(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), TimeSequenceStepper::init(), AttribThread::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), SideSetsAroundSubdomain::modify(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterial::ParsedMaterial(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

186 {
187  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
188 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getRequestedItems()

const std::set< std::string > & InitialConditionBase::getRequestedItems ( )
overridevirtualinherited

Return a set containing the names of items requested by the object.

Implements DependencyResolverInterface.

Definition at line 65 of file InitialConditionBase.C.

66 {
67  return _depend_vars;
68 }
std::set< std::string > _depend_vars
Dependent variables.

◆ getSuppliedItems()

const std::set< std::string > & InitialConditionBase::getSuppliedItems ( )
overridevirtualinherited

Return a set containing the names of items owned by the object.

Implements DependencyResolverInterface.

Definition at line 71 of file InitialConditionBase.C.

72 {
73  return _supplied_vars;
74 }
std::set< std::string > _supplied_vars
Supplied variables.

◆ getUserObject() [1/2]

template<typename T2 >
const T2& InitialConditionBase::getUserObject ( const std::string &  name)
inherited

reimplements the getUserObject method from UserObjectInterface

◆ getUserObject() [2/2]

template<typename T >
const T& InitialConditionBase::getUserObject ( const std::string &  name)
inherited

Definition at line 126 of file InitialConditionBase.h.

127 {
129  _depend_uo.insert(_pars.get<UserObjectName>(name));
130  return UserObjectInterface::getUserObject<T>(name);
131 }
std::set< std::string > _depend_uo
Depend UserObjects.
const bool _ignore_uo_dependency
If set, UOs retrieved by this IC will not be executed before this IC.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getUserObjectBase()

const UserObject & InitialConditionBase::getUserObjectBase ( const std::string &  name)
inherited

reimplements the getUserObjectBase method from UserObjectInterface

Definition at line 77 of file InitialConditionBase.C.

78 {
80  _depend_uo.insert(_pars.get<UserObjectName>(name));
82 }
std::set< std::string > _depend_uo
Depend UserObjects.
const bool _ignore_uo_dependency
If set, UOs retrieved by this IC will not be executed before this IC.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
const UserObject & getUserObjectBase(const std::string &name)
Get an user object with a given parameter name.

◆ getUserObjectBaseByName()

const UserObject & UserObjectInterface::getUserObjectBaseByName ( const std::string &  name)
inherited

Get an user object with a given name.

Parameters
nameThe name of the user object to retrieve
Returns
The user object with the name

Definition at line 30 of file UserObjectInterface.C.

Referenced by UserObjectInterface::getUserObjectByName().

31 {
32  return _uoi_feproblem.getUserObjectBase(name);
33 }
const UserObject & getUserObjectBase(const std::string &name) const
Get the user object by its name.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.

◆ getUserObjectByName() [1/3]

template<class T >
const T & UserObjectInterface::getUserObjectByName ( const std::string &  name)
inherited

Get an user object with a given name.

Parameters
nameThe name of the user object to retrieve
Returns
The user object with the name

Definition at line 89 of file UserObjectInterface.h.

90 {
91  unsigned int tid = needThreadedCopy(getUserObjectBaseByName(name)) ? _uoi_tid : 0;
92  return _uoi_feproblem.getUserObject<T>(name, tid);
93 }
T & getUserObject(const std::string &name, unsigned int tid=0) const
Get the user object by its name.
const UserObject & getUserObjectBaseByName(const std::string &name)
Get an user object with a given name.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
THREAD_ID _uoi_tid
Thread ID.
bool needThreadedCopy(const UserObject &uo) const
Check if the threaded copy of the user object is needed.

◆ getUserObjectByName() [2/3]

template<typename T2 >
const T2& InitialConditionBase::getUserObjectByName ( const UserObjectName &  name)
inherited

reimplements the getUserObjectByName method from UserObjectInterface

◆ getUserObjectByName() [3/3]

template<typename T >
const T& InitialConditionBase::getUserObjectByName ( const UserObjectName &  name)
inherited

Definition at line 135 of file InitialConditionBase.h.

136 {
138  _depend_uo.insert(name);
139  return UserObjectInterface::getUserObjectByName<T>(name);
140 }
std::set< std::string > _depend_uo
Depend UserObjects.
const bool _ignore_uo_dependency
If set, UOs retrieved by this IC will not be executed before this IC.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getVar()

MooseVariable * Coupleable::getVar ( const std::string &  var_name,
unsigned int  comp 
)
protectedinherited

Extract pointer to a coupled variable.

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

Definition at line 200 of file Coupleable.C.

Referenced by Coupleable::adCoupledGradientTemplate(), Coupleable::adCoupledValueTemplate(), ShapeUserObject< SideUserObject >::coupled(), AuxKernel::coupledDot(), Coupleable::coupledDot(), Coupleable::coupledDotDot(), Coupleable::coupledDotDotDu(), Coupleable::coupledDotDotOld(), AuxKernel::coupledDotDu(), Coupleable::coupledDotDu(), Coupleable::coupledDotOld(), Coupleable::coupledGradient(), Coupleable::coupledGradientDot(), Coupleable::coupledGradientDotDot(), Coupleable::coupledGradientOld(), Coupleable::coupledGradientOlder(), Coupleable::coupledGradientPreviousNL(), Coupleable::coupledMatrixTagValue(), NeighborCoupleable::coupledNeighborGradient(), NeighborCoupleable::coupledNeighborGradientOld(), NeighborCoupleable::coupledNeighborGradientOlder(), NeighborCoupleable::coupledNeighborSecond(), NeighborCoupleable::coupledNeighborSolutionDoFs(), NeighborCoupleable::coupledNeighborSolutionDoFsOld(), NeighborCoupleable::coupledNeighborSolutionDoFsOlder(), NeighborCoupleable::coupledNeighborValue(), NeighborCoupleable::coupledNeighborValueDot(), NeighborCoupleable::coupledNeighborValueDotDu(), NeighborCoupleable::coupledNeighborValueOld(), NeighborCoupleable::coupledNeighborValueOlder(), Coupleable::coupledNodalDot(), Coupleable::coupledNodalDotDot(), Coupleable::coupledNodalDotDotOld(), Coupleable::coupledNodalDotOld(), Coupleable::coupledNodalValue(), Coupleable::coupledNodalValueOld(), Coupleable::coupledNodalValueOlder(), Coupleable::coupledNodalValuePreviousNL(), Coupleable::coupledSecond(), Coupleable::coupledSecondOld(), Coupleable::coupledSecondOlder(), Coupleable::coupledSecondPreviousNL(), Coupleable::coupledValue(), Coupleable::coupledValueOld(), Coupleable::coupledValueOlder(), Coupleable::coupledValuePreviousNL(), Coupleable::coupledVectorTagValue(), ParsedAux::ParsedAux(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), and SphericalAverage::SphericalAverage().

201 {
202  if (comp < _coupled_vars[var_name].size())
203  {
204  // Error check - don't couple elemental to nodal
205  if (!(_coupled_vars[var_name][comp])->isNodal() && _c_nodal)
206  mooseError(_c_name, ": You cannot couple an elemental variable to a nodal variable");
207  if (auto * coupled_var = dynamic_cast<MooseVariable *>(_coupled_vars[var_name][comp]))
208  return coupled_var;
209  else
210  mooseError("Variable of wrong type");
211  }
212  else
213  mooseError(_c_name, ": Trying to get a non-existent component of variable '", var_name, "'");
214 }
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: