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

#include <QuadraturePointMarker.h>

Inheritance diagram for QuadraturePointMarker:
[legend]

Public Types

enum  MarkerValue { DONT_MARK = -1, COARSEN, DO_NOTHING, REFINE }
 This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark". More...
 

Public Member Functions

 QuadraturePointMarker (const InputParameters &parameters)
 
virtual void computeMarker ()
 
bool isActive () const
 
virtual void markerSetup ()
 Is called before any element looping is started so any "global" computation can be done. 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...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
const std::vector< SubdomainName > & blocks () const
 Return the block names for this object. More...
 
unsigned int numBlocks () const
 Return the number of blocks for this object. More...
 
virtual const std::set< SubdomainID > & blockIDs () const
 Return the block subdomain ids for this object. More...
 
bool hasBlocks (const SubdomainName &name) const
 Test if the supplied block name is valid for this object. More...
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 Test if the supplied vector of block names are valid for this object. More...
 
bool hasBlocks (const SubdomainID &id) const
 Test if the supplied block ids are valid for this object. More...
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 Test if the supplied vector block ids are valid for this object. More...
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 Test if the supplied set of block ids are valid for this object. More...
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects. More...
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects. More...
 
template<typename T >
bool hasBlockMaterialProperty (const std::string &prop_name)
 Check if a material property is valid for all blocks of this object. More...
 
const std::set< SubdomainID > & meshBlockIDs () const
 Return all of the SubdomainIDs for the mesh. More...
 
virtual bool blockRestricted () const
 Returns true if this object has been restricted to a boundary. More...
 
void checkVariable (const MooseVariableFEBase &variable) const
 Helper for checking that the ids for this object are in agreement with the variables on the supplied variable. More...
 
virtual void initialSetup ()
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual void timestepSetup ()
 Gets called at the beginning of the timestep before this object is asked to do its job. More...
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual void subdomainSetup ()
 Gets called when the subdomain changes (i.e. More...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 (DEPRECATED) Get the execution flag for the object TODO: ExecFlagType More...
 
ExecFlagType execBitFlags () const
 (DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType More...
 
const std::set< MooseVariableFEBase * > & getMooseVariableDependencies () const
 Retrieve the set of MooseVariableFEBases that this object depends on. More...
 
template<class T >
const T & getUserObject (const std::string &name)
 Get an user object with a given parameter name. More...
 
template<class T >
const T & getUserObjectByName (const std::string &name)
 Get an user object with a given name. More...
 
const UserObjectgetUserObjectBase (const std::string &name)
 Get an user object with a given parameter name. More...
 
const UserObjectgetUserObjectBaseByName (const std::string &name)
 Get an user object with a given name. More...
 
bool hasPostprocessor (const std::string &name) const
 Determine if the Postprocessor exists. More...
 
bool hasPostprocessorByName (const PostprocessorName &name)
 Determine if the Postprocessor exists. More...
 
virtual void meshChanged ()
 Called on this object when the mesh changes. More...
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 Builds hide lists for output objects NOT listed in the 'outputs' parameter. More...
 
const std::set< OutputName > & getOutputs ()
 Get the list of output objects that this class is restricted. More...
 
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 ()
 
template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 Retrieve pointer to a material property with the mesh blocks where it is defined The name required by this method is the name defined in the input file. More...
 
template<typename T >
const MaterialProperty< T > & getZeroMaterialProperty (const std::string &prop_name)
 Return a material property that is initialized to zero by default and does not need to (but can) be declared by another material. More...
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 Retrieve the block ids that the material property is defined. More...
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 Retrieve the block names that the material property is defined. More...
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 Retrieve the boundary ids that the material property is defined. More...
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 Retrieve the boundary namess that the material property is defined. More...
 
void statefulPropertiesAllowed (bool)
 Derived classes can declare whether or not they work with stateful material properties. More...
 
bool getMaterialPropertyCalled () const
 Returns true if getMaterialProperty() has been called, false otherwise. More...
 
const std::set< unsigned int > & getMatPropDependencies () const
 Retrieve the set of material properties that this object depends on. More...
 
template<>
const MaterialProperty< Real > * defaultMaterialProperty (const std::string &name)
 
template<>
const ADMaterialPropertyObject< Real > * defaultADMaterialProperty (const std::string &name)
 
const PostprocessorValuegetPostprocessorValue (const std::string &name)
 Retrieve the value of a Postprocessor or one of it's old or older values. More...
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name)
 Retrieve the value of the Postprocessor. More...
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name)
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name)
 
const PostprocessorValuegetDefaultPostprocessorValue (const std::string &name)
 Return the default postprocessor value. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialProperty (const std::string &name)
 Retrieve reference to material property or one of it's old or older values. More...
 
template<typename T >
const ADMaterialPropertyObject< T > & getADMaterialProperty (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name)
 Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file. More...
 
template<typename T >
const ADMaterialPropertyObject< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
MaterialgetMaterial (const std::string &name)
 Return a Material reference - usable for computing directly. More...
 
MaterialgetMaterialByName (const std::string &name, bool no_warn=false)
 
template<typename T >
bool hasMaterialProperty (const std::string &name)
 Check if the material property exists. More...
 
template<typename T >
bool hasMaterialPropertyByName (const std::string &name)
 

Static Public Member Functions

static MooseEnum markerStates ()
 Helper function for getting the valid refinement flag states a marker can use as a MooseEnum. More...
 
static ExecFlagEnum getExecuteOptions ()
 (DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType 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 MarkerValue computeElementMarker () override
 
virtual MarkerValue computeQpMarker ()=0
 Override this to compute a marker value at each quadrature point. More...
 
ErrorVector & getErrorVector (std::string indicator)
 Get an ErrorVector that will be filled up with values corresponding to the indicator passed in. More...
 
const MooseArray< Real > & getMarkerValue (std::string name)
 This is used to get the values of other Markers. More...
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty. More...
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 An initialization routine needed for dual constructors. More...
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 Check if the blocks this object operates on all have the same coordinate system, and if so return it. More...
 
void addMooseVariableDependency (MooseVariableFEBase *var)
 Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on. More...
 
void addMooseVariableDependency (std::vector< MooseVariableFEBase *> vars)
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 
virtual bool isCoupled (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled as name. More...
 
unsigned int coupledComponents (const std::string &var_name)
 Number of coupled components. More...
 
virtual void coupledCallback (const std::string &var_name, bool is_old)
 
virtual unsigned int coupled (const std::string &var_name, unsigned int comp=0)
 Returns the index for a coupled variable by name. More...
 
virtual const VariableValuecoupledValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled variable. More...
 
template<ComputeStage compute_stage>
const VariableValueType< compute_stage >::typeadCoupledValueTemplate (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled variable for use in Automatic Differentiation. More...
 
virtual const VariableValuecoupledVectorTagValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a coupled variable for a given tag. More...
 
virtual const VariableValuecoupledMatrixTagValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a coupled variable for a given tag. More...
 
virtual const VectorVariableValuecoupledVectorValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a coupled vector variable. More...
 
virtual VariableValuewritableCoupledValue (const std::string &var_name, unsigned int comp=0)
 Returns a writable reference to a coupled variable. More...
 
virtual const VariableValuecoupledValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old value from previous time step of a coupled variable. More...
 
virtual const VariableValuecoupledValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old value from two time steps previous of a coupled variable. More...
 
virtual const VariableValuecoupledValuePreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns value of previous Newton iterate of a coupled variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old value from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old value from two time steps previous of a coupled vector variable. More...
 
virtual const VariableGradientcoupledGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable. More...
 
template<ComputeStage compute_stage>
const VariableGradientType< compute_stage >::typeadCoupledGradientTemplate (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable for use in Automatic Differentation. More...
 
virtual const VariableGradientcoupledGradientOld (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from previous time step of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from two time steps previous of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientPreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled variable for previous Newton iterate. More...
 
virtual const VariableGradientcoupledGradientDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of the gradient of a coupled variable. More...
 
virtual const VariableGradientcoupledGradientDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of the gradient of a coupled variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradient (const std::string &var_name, unsigned int comp=0)
 Returns gradient of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOld (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from previous time step of a coupled vector variable. More...
 
virtual const VectorVariableGradientcoupledVectorGradientOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old gradient from two time steps previous of a coupled vector variable. More...
 
virtual const VectorVariableCurlcoupledCurl (const std::string &var_name, unsigned int comp=0)
 Returns curl of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOld (const std::string &var_name, unsigned int comp=0)
 Returns an old curl from previous time step of a coupled variable. More...
 
virtual const VectorVariableCurlcoupledCurlOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old curl from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecond (const std::string &var_name, unsigned int comp=0)
 Returns second derivative of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOld (const std::string &var_name, unsigned int comp=0)
 Returns an old second derivative from previous time step of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old second derivative from two time steps previous of a coupled variable. More...
 
virtual const VariableSecondcoupledSecondPreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns second derivative of a coupled variable for the previous Newton iterate. More...
 
virtual const VariableValuecoupledDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotOld (const std::string &var_name, unsigned int comp=0)
 Old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledDotDotOld (const std::string &var_name, unsigned int comp=0)
 Old second time derivative of a coupled variable. More...
 
virtual const VectorVariableValuecoupledVectorDot (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDot (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotOld (const std::string &var_name, unsigned int comp=0)
 Old time derivative of a coupled vector variable. More...
 
virtual const VectorVariableValuecoupledVectorDotDotOld (const std::string &var_name, unsigned int comp=0)
 Old second time derivative of a coupled vector variable. More...
 
virtual const VariableValuecoupledDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a coupled variable with respect to the coefficients. More...
 
virtual const VariableValuecoupledDotDotDu (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a coupled variable with respect to the coefficients. More...
 
virtual const VariableValuecoupledNodalValue (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValueOld (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from previous time step of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns an old nodal value from two time steps previous of a coupled variable. More...
 
virtual const VariableValuecoupledNodalValuePreviousNL (const std::string &var_name, unsigned int comp=0)
 Returns nodal values of a coupled variable for previous Newton iterate. More...
 
virtual const VariableValuecoupledNodalDot (const std::string &var_name, unsigned int comp=0)
 Nodal values of time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotDot (const std::string &var_name, unsigned int comp=0)
 Nodal values of second time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotOld (const std::string &var_name, unsigned int comp=0)
 Nodal values of old time derivative of a coupled variable. More...
 
virtual const VariableValuecoupledNodalDotDotOld (const std::string &var_name, unsigned int comp=0)
 Nodal values of old second time derivative of a coupled variable. More...
 
virtual const DenseVector< Number > & coupledSolutionDoFs (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the current solution vector of a coupled variable for the local element. More...
 
virtual const DenseVector< Number > & coupledSolutionDoFsOld (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the old solution vector of a coupled variable for the local element. More...
 
virtual const DenseVector< Number > & coupledSolutionDoFsOlder (const std::string &var_name, unsigned int comp=0)
 Returns DoFs in the older solution vector of a coupled variable for the local element. More...
 
void checkVar (const std::string &var_name)
 Check that the right kind of variable is being coupled in. More...
 
MooseVariableFEBasegetFEVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a base finite element coupled variable. More...
 
MooseVariablegetVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled variable. More...
 
VectorMooseVariablegetVectorVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a coupled vector variable. More...
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in. More...
 
void checkMaterialProperty (const std::string &name)
 A helper method for checking material properties This method was required to avoid a compiler problem with the template getMaterialProperty method. More...
 
void markMatPropRequested (const std::string &)
 A proxy method for _mi_feproblem.markMatPropRequested(name) More...
 
std::string deducePropertyName (const std::string &name)
 Small helper to look up a material property name through the input parameter keys. More...
 
template<typename T >
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 Helper function to parse default material property values. More...
 
template<typename T >
const ADMaterialPropertyObject< T > * defaultADMaterialProperty (const std::string &name)
 Helper function to parse default material property values. More...
 

Protected Attributes

QBase *& _qrule
 The quadrature rule for the system. More...
 
const MooseArray< Point > & _q_point
 Position of the current quadrature point. More...
 
unsigned int _qp
 The current quadrature point. More...
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
Adaptivity_adaptivity
 
SystemBase_sys
 
THREAD_ID _tid
 
Assembly_assembly
 
MooseVariable_field_var
 
const Elem *& _current_elem
 
MooseMesh_mesh
 
std::set< std::string > _depend
 Depend Markers. More...
 
std::set< std::string > _supplied
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
std::shared_ptr< MaterialData_blk_material_data
 Pointer to the MaterialData class for this object. More...
 
const ExecFlagEnum_execute_enum
 Execute settings for this oejct. More...
 
const std::vector< ExecFlagType_exec_flags
 (DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. 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...
 
const InputParameters_mi_params
 Parameters of the object with this interface. More...
 
const std::string _mi_name
 The name of the object that this interface belongs to. More...
 
Moose::MaterialDataType _material_data_type
 The type of data. More...
 
std::shared_ptr< MaterialData_material_data
 Pointer to the material data class that stores properties. More...
 
FEProblemBase_mi_feproblem
 Reference to the FEProblemBase class. More...
 
const THREAD_ID _mi_tid
 Current threaded it. More...
 
bool _stateful_allowed
 True by default. More...
 
bool _get_material_property_called
 Initialized to false. More...
 
std::vector< std::unique_ptr< MaterialProperty< Real > > > _default_real_properties
 Storage vector for MaterialProperty<Real> default objects. More...
 
std::vector< std::unique_ptr< ADMaterialPropertyObject< Real > > > _default_ad_real_properties
 Storage vector for ADMaterialPropertyObject<Real> default objects. More...
 
std::set< unsigned int > _material_property_dependencies
 The set of material properties (as given by their IDs) that this object depends on. More...
 

Detailed Description

Definition at line 22 of file QuadraturePointMarker.h.

Member Enumeration Documentation

◆ MarkerValue

enum Marker::MarkerValue
inherited

This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark".

Enumerator
DONT_MARK 
COARSEN 
DO_NOTHING 
REFINE 

Definition at line 56 of file Marker.h.

57  {
58  DONT_MARK = -1,
59  COARSEN,
60  DO_NOTHING,
61  REFINE
62  };

Constructor & Destructor Documentation

◆ QuadraturePointMarker()

QuadraturePointMarker::QuadraturePointMarker ( const InputParameters parameters)

Definition at line 45 of file QuadraturePointMarker.C.

46  : Marker(parameters),
47  Coupleable(this, false),
51  _qp(0)
52 {
53  const std::vector<MooseVariableFEBase *> & coupled_vars = getCoupledMooseVars();
54  for (const auto & var : coupled_vars)
56 }
Assembly & _assembly
Definition: Marker.h:113
MaterialPropertyInterface(const MooseObject *moose_object, const std::set< SubdomainID > &block_ids, const std::set< BoundaryID > &boundary_ids)
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object.
const MooseArray< Point > & qPoints()
Returns the reference to the quadrature points.
Definition: Assembly.h:216
QBase *& qRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:210
void addMooseVariableDependency(MooseVariableFEBase *var)
Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on...
Coupleable(const MooseObject *moose_object, bool nodal)
Constructing the object.
Definition: Coupleable.C:19
unsigned int _qp
The current quadrature point.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
QBase *& _qrule
The quadrature rule for the system.
Marker(const InputParameters &parameters)
Definition: Marker.C:35
const std::vector< MooseVariableFEBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition: Coupleable.h:64
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
Definition: MooseTypes.h:324
const MooseArray< Point > & _q_point
Position of the current quadrature point.

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

◆ addMooseVariableDependency() [1/2]

void MooseVariableDependencyInterface::addMooseVariableDependency ( MooseVariableFEBase var)
inlineprotectedinherited

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

Definition at line 37 of file MooseVariableDependencyInterface.h.

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

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

◆ addMooseVariableDependency() [2/2]

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

Definition at line 41 of file MooseVariableDependencyInterface.h.

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

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

◆ buildOutputHideVariableList()

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

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

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

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

Definition at line 62 of file OutputInterface.C.

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

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

◆ checkMaterialProperty()

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

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

Definition at line 144 of file MaterialPropertyInterface.C.

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

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

◆ checkVar()

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.

◆ computeElementMarker()

Marker::MarkerValue QuadraturePointMarker::computeElementMarker ( )
overrideprotectedvirtual

Implements Marker.

Definition at line 59 of file QuadraturePointMarker.C.

60 {
61  MarkerValue current_mark = DONT_MARK;
62 
63  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
64  {
65  MarkerValue new_mark = computeQpMarker();
66 
67  current_mark = std::max(current_mark, new_mark);
68  }
69 
70  return current_mark;
71 }
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...
Definition: Marker.h:56
unsigned int _qp
The current quadrature point.
QBase *& _qrule
The quadrature rule for the system.
virtual MarkerValue computeQpMarker()=0
Override this to compute a marker value at each quadrature point.

◆ computeMarker()

void Marker::computeMarker ( )
virtualinherited

Definition at line 70 of file Marker.C.

71 {
72  int mark = computeElementMarker();
74 }
virtual MarkerValue computeElementMarker()=0
MooseVariable & _field_var
Definition: Marker.h:115
void setNodalValue(OutputType value, unsigned int idx=0)

◆ computeQpMarker()

virtual MarkerValue QuadraturePointMarker::computeQpMarker ( )
protectedpure virtual

Override this to compute a marker value at each quadrature point.

The ultimate value for the element will be taken as the maximum (most conservative) value for all quadrature points on the element.

Returns
The MarkerValue at one quadrature point.

Implemented in ValueRangeMarker, and ValueThresholdMarker.

Referenced by computeElementMarker().

◆ 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

◆ deducePropertyName()

std::string MaterialPropertyInterface::deducePropertyName ( const std::string &  name)
protectedinherited

◆ defaultADMaterialProperty() [1/2]

template<>
const ADMaterialPropertyObject<Real>* MaterialPropertyInterface::defaultADMaterialProperty ( const std::string &  name)
inherited

Definition at line 93 of file MaterialPropertyInterface.C.

94 {
95  std::istringstream ss(name);
96  Real real_value;
97 
98  // check if the string parsed cleanly into a Real number
99  if (ss >> real_value && ss.eof())
100  {
101  _default_ad_real_properties.emplace_back(libmesh_make_unique<ADMaterialPropertyObject<Real>>());
102  auto & default_property = _default_ad_real_properties.back();
103 
104  // resize to accomodate maximum number obf qpoints
105  auto nqp = _mi_feproblem.getMaxQps();
106  default_property->resize(nqp);
107 
108  // set values for all qpoints to the given default
109  for (decltype(nqp) qp = 0; qp < nqp; ++qp)
110  (*default_property)[qp] = real_value;
111 
112  // return the raw pointer inside the shared pointer
113  return default_property.get();
114  }
115 
116  return nullptr;
117 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
std::vector< std::unique_ptr< ADMaterialPropertyObject< Real > > > _default_ad_real_properties
Storage vector for ADMaterialPropertyObject<Real> default objects.
unsigned int getMaxQps() const

◆ defaultADMaterialProperty() [2/2]

template<typename T >
const ADMaterialPropertyObject< T > * MaterialPropertyInterface::defaultADMaterialProperty ( const std::string &  name)
protectedinherited

Helper function to parse default material property values.

This is implemented as a specialization for supported types and returns NULL in all other cases.

Definition at line 378 of file MaterialPropertyInterface.h.

379 {
380  return NULL;
381 }

◆ defaultMaterialProperty() [1/2]

template<typename T >
const MaterialProperty< T > * MaterialPropertyInterface::defaultMaterialProperty ( const std::string &  name)
protectedinherited

Helper function to parse default material property values.

This is implemented as a specialization for supported types and returns NULL in all other cases.

Definition at line 370 of file MaterialPropertyInterface.h.

371 {
372  return NULL;
373 }

◆ defaultMaterialProperty() [2/2]

const MaterialProperty< Real > * MaterialPropertyInterface::defaultMaterialProperty ( const std::string &  name)
inherited

Definition at line 65 of file MaterialPropertyInterface.C.

66 {
67  std::istringstream ss(name);
68  Real real_value;
69 
70  // check if the string parsed cleanly into a Real number
71  if (ss >> real_value && ss.eof())
72  {
73  _default_real_properties.emplace_back(libmesh_make_unique<MaterialProperty<Real>>());
74  auto & default_property = _default_real_properties.back();
75 
76  // resize to accomodate maximum number obf qpoints
77  auto nqp = _mi_feproblem.getMaxQps();
78  default_property->resize(nqp);
79 
80  // set values for all qpoints to the given default
81  for (decltype(nqp) qp = 0; qp < nqp; ++qp)
82  (*default_property)[qp] = real_value;
83 
84  // return the raw pointer inside the shared pointer
85  return default_property.get();
86  }
87 
88  return nullptr;
89 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
std::vector< std::unique_ptr< MaterialProperty< Real > > > _default_real_properties
Storage vector for MaterialProperty<Real> default objects.
unsigned int getMaxQps() const

◆ 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

◆ execBitFlags()

ExecFlagType SetupInterface::execBitFlags ( ) const
inherited

(DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType

Definition at line 85 of file SetupInterface.C.

86 {
87  // TODO: ExecFlagType
88  mooseDeprecated("The execBitFlags method is being removed because MOOSE was updated to use a "
89  "ExecFlagEnum for execute flags. This method maintains the behavior of the "
90  "original method but the use of this method should be removed from your "
91  "application. The ExecFlagEnum should be inspected directly via the "
92  "getExecuteOnEnum() method.");
93 
94  unsigned int exec_bit_field = EXEC_NONE;
95  for (const auto & flag : _exec_flags)
96  exec_bit_field |= flag.id();
97  return ExecFlagType("deprecated", exec_bit_field);
98 }
MooseEnumItem ExecFlagType
Definition: Moose.h:85
const ExecFlagType EXEC_NONE
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const int & id() const
Return the numeric, name, or raw name.
Definition: MooseEnumItem.h:37
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ execFlags()

const std::vector< ExecFlagType > & SetupInterface::execFlags ( ) const
virtualinherited

(DEPRECATED) Get the execution flag for the object TODO: ExecFlagType

Reimplemented in MultiAppTransfer.

Definition at line 73 of file SetupInterface.C.

74 {
75  // TODO: ExecFlagType
76  mooseDeprecated("The execFlags() method is being removed because MOOSE has been updated to use a "
77  "ExecFlagEnum for execute flags. The current flags should be retrieved from "
78  "the \"exeucte_on\" parameters of your object or by using the \"_execute_enum\" "
79  "reference to the parameter or the getExecuteOnEnum() method.");
80 
81  return _exec_flags;
82 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ getADMaterialProperty()

template<typename T >
const ADMaterialPropertyObject< T > & MaterialPropertyInterface::getADMaterialProperty ( const std::string &  name)
inherited

Definition at line 312 of file MaterialPropertyInterface.h.

313 {
314  // Check if the supplied parameter is a valid input parameter key
315  std::string prop_name = deducePropertyName(name);
316 
317  // Check if it's just a constant
318  const ADMaterialPropertyObject<T> * default_property = defaultADMaterialProperty<T>(prop_name);
319  if (default_property)
320  return *default_property;
321 
322  return getADMaterialPropertyByName<T>(prop_name);
323 }
std::string deducePropertyName(const std::string &name)
Small helper to look up a material property name through the input parameter keys.

◆ getADMaterialPropertyByName()

template<typename T >
const ADMaterialPropertyObject< T > & MaterialPropertyInterface::getADMaterialPropertyByName ( const MaterialPropertyName &  name)
inherited

Definition at line 408 of file MaterialPropertyInterface.h.

409 {
411 
413  checkMaterialProperty(name);
414 
415  // mark property as requested
416  markMatPropRequested(name);
417 
418  // Update the boolean flag.
420 
421  _material_property_dependencies.insert(_material_data->getPropertyId(name));
422 
423  return _material_data->getADProperty<T>(name);
424 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
void setUsingADFlag(bool using_ad)
Set the global automatic differentiaion (AD) flag which indicates whether any consumer has requested ...
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
void markMatPropRequested(const std::string &)
A proxy method for _mi_feproblem.markMatPropRequested(name)
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
void checkMaterialProperty(const std::string &name)
A helper method for checking material properties This method was required to avoid a compiler problem...
bool _get_material_property_called
Initialized to false.
void checkExecutionStage()
Check and throw an error if the execution has progressed past the construction stage.

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

◆ getBlockMaterialProperty()

template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > MaterialPropertyInterface::getBlockMaterialProperty ( const MaterialPropertyName &  name)
inherited

Retrieve pointer to a material property with the mesh blocks where it is defined The name required by this method is the name defined in the input file.

This function can be thought as the combination of getMaterialPropertyByName and getMaterialPropertyBlocks. It can be called after the action of all actions.

Parameters
nameThe name of the material property to retrieve
Returns
Pointer to the material property with the name 'name' and the set of blocks where the property is valid

Definition at line 464 of file MaterialPropertyInterface.h.

465 {
466  if (_mi_block_ids.empty())
467  mooseError("getBlockMaterialProperty must be called by a block restrictable object");
468 
469  if (!hasMaterialPropertyByName<T>(name))
470  return std::pair<const MaterialProperty<T> *, std::set<SubdomainID>>(NULL,
471  std::set<SubdomainID>());
472 
473  _material_property_dependencies.insert(_material_data->getPropertyId(name));
474 
475  return std::pair<const MaterialProperty<T> *, std::set<SubdomainID>>(
476  &_material_data->getProperty<T>(name), _mi_feproblem.getMaterialPropertyBlocks(name));
477 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
virtual std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:280
Concrete definition of a parameter value for a specified type.

◆ 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

◆ getDefaultPostprocessorValue()

const PostprocessorValue & PostprocessorInterface::getDefaultPostprocessorValue ( const std::string &  name)
inherited

Return the default postprocessor value.

Parameters
nameThe name of the postprocessor parameter
Returns
A const reference to the default value

Definition at line 86 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

87 {
89 }
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.

◆ getErrorVector()

ErrorVector & Marker::getErrorVector ( std::string  indicator)
protectedinherited

Get an ErrorVector that will be filled up with values corresponding to the indicator passed in.

Note that this returns a reference... and the return value should be stored as a reference!

Parameters
indicatorThe name of the indicator to get an ErrorVector for.

Definition at line 77 of file Marker.C.

78 {
79  return _adaptivity.getErrorVector(indicator);
80 }
Adaptivity & _adaptivity
Definition: Marker.h:108
ErrorVector & getErrorVector(const std::string &indicator_field)
Get an ErrorVector that will be filled up with values corresponding to the indicator field name passe...
Definition: Adaptivity.C:280

◆ getExecuteOnEnum()

const ExecFlagEnum & SetupInterface::getExecuteOnEnum ( ) const
inherited

Return the execute on MultiMooseEnum for this object.

Definition at line 67 of file SetupInterface.C.

Referenced by ExecuteMooseObjectWarehouse< Transfer >::addObjectMask(), EigenExecutionerBase::init(), AttribExecOns::initFrom(), and MultiAppTransfer::MultiAppTransfer().

68 {
69  return _execute_enum;
70 }
const ExecFlagEnum & _execute_enum
Execute settings for this oejct.

◆ getExecuteOptions()

ExecFlagEnum SetupInterface::getExecuteOptions ( )
staticinherited

(DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType

Returns
A MooseEnum with the available 'execute_on' options, the default is 'residual'

Definition at line 101 of file SetupInterface.C.

102 {
103  // TODO: ExecFlagType
104  ::mooseDeprecated("The 'getExecuteOptions' was replaced by the ExecFlagEnum class because MOOSE "
105  "was updated to use this for the execute flags and the new function provides "
106  "additional arguments for modification of the enum.");
108 }
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:724
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ 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

◆ getMarkerValue()

const MooseArray< Real > & Marker::getMarkerValue ( std::string  name)
protectedinherited

This is used to get the values of other Markers.

This is useful for making combo-markers that take multiple markers and combine them to make one.

Parameters
nameThe name of the other Marker that you want to have access to.
Returns
A reference that will hold the value of the marker in it's 0 (zeroth) position.

Definition at line 83 of file Marker.C.

Referenced by ComboMarker::ComboMarker().

84 {
85  _depend.insert(name);
86  return _sys.getVariable(_tid, name).dofValues();
87 }
SystemBase & _sys
Definition: Marker.h:109
THREAD_ID _tid
Definition: Marker.h:111
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:101
virtual const MooseArray< Number > & dofValues()=0
Returns dof solution on element.
std::set< std::string > _depend
Depend Markers.
Definition: Marker.h:121
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getMaterial()

Material & MaterialPropertyInterface::getMaterial ( const std::string &  name)
inherited

Return a Material reference - usable for computing directly.

Parameters
nameThe name of the input parameter or explicit material name.
no_warnIf true, suppress warning about retrieving the material potentially during its calculation. If you don't know what this is/means, then you don't need it.

Definition at line 170 of file MaterialPropertyInterface.C.

171 {
172  return getMaterialByName(_mi_params.get<MaterialName>(name));
173 }
Material & getMaterialByName(const std::string &name, bool no_warn=false)
const InputParameters & _mi_params
Parameters of the object with this interface.

◆ getMaterialByName()

Material & MaterialPropertyInterface::getMaterialByName ( const std::string &  name,
bool  no_warn = false 
)
inherited

Definition at line 176 of file MaterialPropertyInterface.C.

Referenced by MaterialPropertyInterface::getMaterial(), and MaterialVectorPostprocessor::MaterialVectorPostprocessor().

177 {
178  std::shared_ptr<Material> discrete =
180 
181  // Check block compatibility
182  if (!discrete->hasBlocks(_mi_block_ids))
183  {
184  std::ostringstream oss;
185  oss << "The Material object '" << discrete->name()
186  << "' is defined on blocks that are incompatible with the retrieving object '" << _mi_name
187  << "':\n";
188  oss << " " << discrete->name();
189  for (const auto & sbd_id : discrete->blockIDs())
190  oss << " " << sbd_id;
191  oss << "\n";
192  oss << " " << _mi_name;
193  for (const auto & block_id : _mi_block_ids)
194  oss << " " << block_id;
195  oss << "\n";
196  mooseError(oss.str());
197  }
198 
199  // Check boundary compatibility
200  if (!discrete->hasBoundary(_mi_boundary_ids))
201  {
202  std::ostringstream oss;
203  oss << "The Material object '" << discrete->name()
204  << "' is defined on boundaries that are incompatible with the retrieving object '"
205  << _mi_name << "':\n";
206  oss << " " << discrete->name();
207  for (const auto & bnd_id : discrete->boundaryIDs())
208  oss << " " << bnd_id;
209  oss << "\n";
210  oss << " " << _mi_name;
211  for (const auto & bnd_id : _mi_boundary_ids)
212  oss << " " << bnd_id;
213  oss << "\n";
214  mooseError(oss.str());
215  }
216 
217  return *discrete;
218 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const THREAD_ID _mi_tid
Current threaded it.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
Moose::MaterialDataType _material_data_type
The type of data.
std::shared_ptr< Material > getMaterial(std::string name, Moose::MaterialDataType type, THREAD_ID tid=0, bool no_warn=false)
Return a pointer to a Material object.
const std::set< BoundaryID > & _mi_boundary_ids
Storage for the boundary ids created by BoundaryRestrictable.
const std::string _mi_name
The name of the object that this interface belongs to.

◆ getMaterialProperty()

template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialProperty ( const std::string &  name)
inherited

Retrieve reference to material property or one of it's old or older values.

The name required by this method is the name that is hard-coded into your source code as the input parameter key. If no input parameter is found this behaves like the getMaterialPropertyByName family as a fall back.

Parameters
nameThe name of the parameter key of the material property to retrieve
Returns
Reference to the desired material property

Definition at line 297 of file MaterialPropertyInterface.h.

298 {
299  // Check if the supplied parameter is a valid input parameter key
300  std::string prop_name = deducePropertyName(name);
301 
302  // Check if it's just a constant
303  const MaterialProperty<T> * default_property = defaultMaterialProperty<T>(prop_name);
304  if (default_property)
305  return *default_property;
306 
307  return getMaterialPropertyByName<T>(prop_name);
308 }
std::string deducePropertyName(const std::string &name)
Small helper to look up a material property name through the input parameter keys.
Concrete definition of a parameter value for a specified type.

◆ getMaterialPropertyBlockNames()

std::vector< SubdomainName > MaterialPropertyInterface::getMaterialPropertyBlockNames ( const std::string &  name)
inherited

Retrieve the block names that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the block names for the property

Definition at line 126 of file MaterialPropertyInterface.C.

127 {
129 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames(const std::string &prop_name)
Get a vector of block id equivalences that the material property is defined on.
Definition: SubProblem.C:296

◆ getMaterialPropertyBlocks()

std::set< SubdomainID > MaterialPropertyInterface::getMaterialPropertyBlocks ( const std::string &  name)
inherited

Retrieve the block ids that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the block ids for the property

Definition at line 120 of file MaterialPropertyInterface.C.

121 {
123 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:280

◆ getMaterialPropertyBoundaryIDs()

std::set< BoundaryID > MaterialPropertyInterface::getMaterialPropertyBoundaryIDs ( const std::string &  name)
inherited

Retrieve the boundary ids that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the boundary ids for the property

Definition at line 132 of file MaterialPropertyInterface.C.

133 {
135 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::set< BoundaryID > getMaterialPropertyBoundaryIDs(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:337

◆ getMaterialPropertyBoundaryNames()

std::vector< BoundaryName > MaterialPropertyInterface::getMaterialPropertyBoundaryNames ( const std::string &  name)
inherited

Retrieve the boundary namess that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the boundary names for the property

Definition at line 138 of file MaterialPropertyInterface.C.