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

This postprocessor displays the change in the postprocessor between adjacent timesteps. More...

#include <PercentChangePostprocessor.h>

Inheritance diagram for PercentChangePostprocessor:
[legend]

Public Member Functions

 PercentChangePostprocessor (const InputParameters &parameters)
 
virtual void initialize () override
 Called before execute() is ever called so that data can be cleared. More...
 
virtual void execute () override
 Execute method. More...
 
virtual Real getValue () override
 This will get called to actually grab the final value the postprocessor has calculated. More...
 
virtual void finalize () override
 This is called after execute() and after threadJoin()! This is probably where you want to do MPI communication! Finalize is not required for Postprocessor implementations since work may be done in getValue(). More...
 
const std::set< std::string > & getRequestedItems () override
 Return a set containing the names of items requested by the object. More...
 
const std::set< std::string > & getSuppliedItems () override
 Return a set containing the names of items owned by the object. More...
 
virtual void load (std::ifstream &stream)
 Load user data object from a stream. More...
 
virtual void store (std::ofstream &stream)
 Store user data object to a stream. More...
 
SubProblemgetSubProblem () const
 Returns a reference to the subproblem that this postprocessor is tied to. More...
 
bool shouldDuplicateInitialExecution () const
 Returns whether or not this user object should be executed twice during the initial condition when depended upon by an IC. More...
 
virtual Real spatialValue (const Point &) const
 Optional interface function for "evaluating" a UserObject at a spatial position. More...
 
template<typename T >
void gatherSum (T &value)
 Gather the parallel sum of the variable passed in. More...
 
template<typename T >
void gatherMax (T &value)
 
template<typename T >
void gatherMin (T &value)
 
template<typename T1 , typename T2 >
void gatherProxyValueMax (T1 &value, T2 &proxy)
 
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...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp ()
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled ()
 Return the enabled status of the object. More...
 
template<typename... Args>
void mooseError (Args &&...args) const
 
template<typename... Args>
void mooseWarning (Args &&...args) const
 
template<typename... Args>
void mooseDeprecated (Args &&...args) const
 
template<typename... Args>
void mooseInfo (Args &&...args) const
 
virtual void initialSetup ()
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual void timestepSetup ()
 Gets called at the beginning of the timestep before this object is asked to do its job. More...
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 Get the execution flag for the object. More...
 
ExecFlagType execBitFlags () const
 Build and return the execution flags as a bitfield. More...
 
FunctiongetFunction (const std::string &name)
 Get a function with a given name. More...
 
FunctiongetFunctionByName (const FunctionName &name)
 Get a function with a given name. More...
 
DistributiongetDistribution (const std::string &name)
 Get a distribution with a given name. More...
 
DistributiongetDistributionByName (const DistributionName &name)
 Get a distribution with a given name. More...
 
virtual void meshChanged ()
 Called on this object when the mesh changes. More...
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 Get the list of coupled scalar variables. More...
 
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)
 
bool isImplicit ()
 
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...
 
std::string PPName ()
 Returns the name of the Postprocessor. More...
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 Builds hide lists for output objects NOT listed in the 'outputs' parameter. More...
 
const std::set< OutputName > & getOutputs ()
 Get the list of output objects that this class is restricted. More...
 
virtual void threadJoin (const UserObject &) final
 This method is not used and should not be used in a custom GeneralUserObject. More...
 
virtual void subdomainSetup () final
 Gets called when the subdomain changes (i.e. More...
 
virtual const PostprocessorValuegetPostprocessorValue (const std::string &name)
 Store dependency among same object types for proper execution order. More...
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name)
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &name, const std::string &vector_name) override
 Retrieve the value of a VectorPostprocessor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) override
 Retrieve the value of the VectorPostprocessor. 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 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 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 MultiMooseEnum getExecuteOptions ()
 Returns the available options for the 'execute_on' input parameters. 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

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...
 
virtual bool isCoupledScalar (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled_as name. More...
 
virtual unsigned int coupledScalarComponents (const std::string &var_name)
 Return the number of components to the coupled scalar variable. More...
 
virtual unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0)
 Returns the index for a scalar coupled variable by name. More...
 
virtual Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0)
 Returns the order for a scalar coupled variable by name. More...
 
virtual VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0)
 Returns the old (previous time step) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns the older (two time steps previous) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0)
 Returns the time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a scalar coupled variable with respect to the coefficients. More...
 
VariableValuegetDefaultValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default value for an uncoupled variable. More...
 
MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a scalar coupled variable. 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...
 
bool hasPostprocessor (const std::string &name) const
 Determine if the Postprocessor exists. More...
 
bool hasPostprocessorByName (const PostprocessorName &name)
 Determine if the Postprocessor exists. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 Retrieve the old value of a VectorPostprocessor. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name)
 Retrieve the old value of a VectorPostprocessor. More...
 
bool hasVectorPostprocessor (const std::string &name) const
 Determine if the VectorPostprocessor exists. More...
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 Determine if the VectorPostprocessor exists. More...
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name)
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name)
 
const PostprocessorValuegetDefaultPostprocessorValue (const std::string &name)
 Return the default postprocessor value. More...
 

Protected Attributes

const PostprocessorValue_postprocessor
 
const PostprocessorValue_postprocessor_old
 
std::set< std::string > _depend_vars
 
std::set< std::string > _supplied_vars
 
SubProblem_subproblem
 Reference to the Subproblem for this user object. More...
 
FEProblemBase_fe_problem
 Reference to the FEProblemBase for this user object. More...
 
THREAD_ID _tid
 Thread ID of this postprocessor. More...
 
Assembly_assembly
 
const Moose::CoordinateSystemType_coord_sys
 Coordinate system. More...
 
const bool _duplicate_initial_execution
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. 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::vector< ExecFlagType_exec_flags
 execution flag (when is the object executed/evaluated) More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. More...
 
const InputParameters_sc_parameters
 
FEProblemBase_sc_fe_problem
 
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 Coupled vars whose values we provide. More...
 
std::map< std::string, VariableValue * > _default_value
 Will hold the default value for optional coupled scalar variables. More...
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 Vector of coupled variables. More...
 
bool _sc_is_implicit
 True if implicit value is required. More...
 
const InputParameters_coupleable_params
 Local InputParameters. More...
 
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::set< unsigned int > _material_property_dependencies
 The set of material properties (as given by their IDs) that this object depends on. More...
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 If the object is using implicit or explicit form. More...
 
Real & _t
 Time. More...
 
int & _t_step
 The number of the time step. More...
 
Real & _dt
 Time step size. More...
 
Real & _dt_old
 Size of the old time step. More...
 
bool _is_transient
 
std::string _pp_name
 

Detailed Description

This postprocessor displays the change in the postprocessor between adjacent timesteps.

Definition at line 29 of file PercentChangePostprocessor.h.

Constructor & Destructor Documentation

PercentChangePostprocessor::PercentChangePostprocessor ( const InputParameters parameters)

Definition at line 26 of file PercentChangePostprocessor.C.

27  : GeneralPostprocessor(parameters),
28  _postprocessor(getPostprocessorValue("postprocessor")),
30 {
31  mooseDeprecated("PercentChangePostprocessor is deprecated: instead, ",
32  "please use ChangeOverTimestepPostprocessor using the parameter ",
33  "'compute_relative_change' set to 'true'");
34 }
const PostprocessorValue & _postprocessor
const PostprocessorValue & getPostprocessorValueOld(const std::string &name)
virtual const PostprocessorValue & getPostprocessorValue(const std::string &name)
Store dependency among same object types for proper execution order.
GeneralPostprocessor(const InputParameters &parameters)
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
const PostprocessorValue & _postprocessor_old

Member Function Documentation

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 67 of file OutputInterface.C.

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

68 {
69  // Set of available names
70  const std::set<OutputName> & avail = _oi_output_warehouse.getOutputNames();
71 
72  // Check for 'none'; hide variables on all outputs
73  if (_oi_outputs.find("none") != _oi_outputs.end())
74  for (const auto & name : avail)
75  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
76 
77  // Check for empty and 'all' in 'outputs' parameter; do not perform any variable restrictions in
78  // these cases
79  else if (_oi_outputs.empty() || _oi_outputs.find("all") != _oi_outputs.end())
80  return;
81 
82  // Limit the variable output to Output objects listed
83  else
84  {
85  // Create a list of outputs where the variable should be hidden
86  std::set<OutputName> hide;
87  std::set_difference(avail.begin(),
88  avail.end(),
89  _oi_outputs.begin(),
90  _oi_outputs.end(),
91  std::inserter(hide, hide.begin()));
92 
93  // If 'outputs' is specified add the object name to the list of items to hide
94  for (const auto & name : hide)
95  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
96  }
97 }
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.
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 138 of file MaterialPropertyInterface.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyByName().

139 {
140  // If the material property is boundary restrictable, add to the list of materials to check
142  for (const auto & bnd_id : _mi_boundary_ids)
144 
145  // The default is to assume block restrictions
146  else
147  for (const auto & blk_ids : _mi_block_ids)
149 }
virtual void storeDelayedCheckMatProp(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:244
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
const bool _mi_boundary_restricted
BoundaryRestricted flag.
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.
unsigned int ScalarCoupleable::coupledScalar ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns the index for a scalar coupled variable by name.

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

Definition at line 99 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

100 {
101  return getScalarVar(var_name, comp)->number();
102 }
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
unsigned int number() const
Get variable number coming from libMesh.
unsigned int ScalarCoupleable::coupledScalarComponents ( const std::string &  var_name)
protectedvirtualinherited

Return the number of components to the coupled scalar variable.

Parameters
var_nameThe of the coupled variable

Definition at line 189 of file ScalarCoupleable.C.

190 {
191  return _coupled_scalar_vars[var_name].size();
192 }
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.
VariableValue & ScalarCoupleable::coupledScalarDot ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns the time derivative of a scalar coupled variable.

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

Definition at line 161 of file ScalarCoupleable.C.

162 {
163  MooseVariableScalar * var = getScalarVar(var_name, comp);
164  return var->uDot();
165 }
VariableValue & uDot()
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Class for scalar variables (they are different).
VariableValue & ScalarCoupleable::coupledScalarDotDu ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

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

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

Definition at line 168 of file ScalarCoupleable.C.

169 {
170  MooseVariableScalar * var = getScalarVar(var_name, comp);
171  return var->duDotDu();
172 }
VariableValue & duDotDu()
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Class for scalar variables (they are different).
Order ScalarCoupleable::coupledScalarOrder ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns the order for a scalar coupled variable by name.

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

Definition at line 105 of file ScalarCoupleable.C.

106 {
107  if (!isCoupledScalar(var_name, comp))
109 
110  return getScalarVar(var_name, comp)->order();
111 }
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
FEProblemBase & _sc_fe_problem
Order getMaxScalarOrder() const
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
VariableValue & ScalarCoupleable::coupledScalarValue ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns value of a scalar coupled variable.

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

Definition at line 128 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

129 {
130  if (!isCoupledScalar(var_name, comp))
131  return *getDefaultValue(var_name);
132 
133  MooseVariableScalar * var = getScalarVar(var_name, comp);
134  return (_sc_is_implicit) ? var->sln() : var->slnOld();
135 }
VariableValue & sln()
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
bool _sc_is_implicit
True if implicit value is required.
Class for scalar variables (they are different).
VariableValue & slnOld()
VariableValue & ScalarCoupleable::coupledScalarValueOld ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

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

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

Definition at line 138 of file ScalarCoupleable.C.

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

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

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

Definition at line 148 of file ScalarCoupleable.C.

149 {
150  if (!isCoupledScalar(var_name, comp))
151  return *getDefaultValue(var_name);
152 
153  MooseVariableScalar * var = getScalarVar(var_name, comp);
154  if (_sc_is_implicit)
155  return var->slnOlder();
156  else
157  mooseError("Older values not available for explicit schemes");
158 }
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
bool _sc_is_implicit
True if implicit value is required.
Class for scalar variables (they are different).
VariableValue & slnOlder()
template<typename T >
void DependencyResolverInterface::cyclicDependencyError ( CyclicDependencyException< T > &  e,
const std::string &  header 
)
staticinherited

A helper method for cyclic errors.

Definition at line 100 of file DependencyResolverInterface.h.

Referenced by DependencyResolverInterface::DependencyResolverInterface().

102 {
103  std::ostringstream oss;
104 
105  oss << header << ":\n";
106  const typename std::multimap<T, T> & depends = e.getCyclicDependencies();
107  for (typename std::multimap<T, T>::const_iterator it = depends.begin(); it != depends.end(); ++it)
108  oss << (static_cast<T>(it->first))->name() << " -> " << (static_cast<T>(it->second))->name()
109  << "\n";
110  mooseError(oss.str());
111 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
const std::multimap< T, T > & getCyclicDependencies() const
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 224 of file Restartable.h.

225 {
226  return declareRestartableDataWithContext<T>(data_name, NULL);
227 }
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 231 of file Restartable.h.

232 {
233  return declareRestartableDataWithContext<T>(data_name, init_value, NULL);
234 }
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 238 of file Restartable.h.

239 {
241  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
242 
243  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
244  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
245 
247 
248  return data_ptr->get();
249 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
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 253 of file Restartable.h.

256 {
258  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
259 
260  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
261  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
262 
263  data_ptr->set() = init_value;
264 
266 
267  return data_ptr->get();
268 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
std::string MaterialPropertyInterface::deducePropertyName ( const std::string &  name)
protectedinherited
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 345 of file MaterialPropertyInterface.h.

346 {
347  return NULL;
348 }
const MaterialProperty< Real > * MaterialPropertyInterface::defaultMaterialProperty ( const std::string &  name)
inherited

Definition at line 87 of file MaterialPropertyInterface.C.

88 {
89  std::istringstream ss(name);
90  Real real_value;
91 
92  // check if the string parsed cleanly into a Real number
93  if (ss >> real_value && ss.eof())
94  {
95  _default_real_properties.emplace_back(libmesh_make_unique<MaterialProperty<Real>>());
96  auto & default_property = _default_real_properties.back();
97 
98  // resize to accomodate maximum number obf qpoints
99  auto nqp = _mi_feproblem.getMaxQps();
100  default_property->resize(nqp);
101 
102  // set values for all qpoints to the given default
103  for (decltype(nqp) qp = 0; qp < nqp; ++qp)
104  (*default_property)[qp] = real_value;
105 
106  // return the raw pointer inside the shared pointer
107  return default_property.get();
108  }
109 
110  return nullptr;
111 }
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
virtual bool MooseObject::enabled ( )
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 77 of file MooseObject.h.

Referenced by EigenKernel::enabled().

77 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:117
ExecFlagType SetupInterface::execBitFlags ( ) const
inherited

Build and return the execution flags as a bitfield.

Definition at line 100 of file SetupInterface.C.

Referenced by EigenExecutionerBase::init().

101 {
102  unsigned int exec_bit_field = EXEC_NONE;
103  for (unsigned int i = 0; i < _exec_flags.size(); ++i)
104  exec_bit_field |= _exec_flags[i];
105 
106  return static_cast<ExecFlagType>(exec_bit_field);
107 }
std::vector< ExecFlagType > _exec_flags
execution flag (when is the object executed/evaluated)
ExecFlagType
Execution flags - when is the object executed/evaluated.
Definition: MooseTypes.h:90
const std::vector< ExecFlagType > & SetupInterface::execFlags ( ) const
virtualinherited

Get the execution flag for the object.

Reimplemented in MultiAppTransfer.

Definition at line 94 of file SetupInterface.C.

Referenced by ExecuteMooseObjectWarehouse< T >::addObjectMask(), and MultiAppTransfer::execFlags().

95 {
96  return _exec_flags;
97 }
std::vector< ExecFlagType > _exec_flags
execution flag (when is the object executed/evaluated)
void PercentChangePostprocessor::execute ( )
overridevirtual

Execute method.

Implements UserObject.

Definition at line 42 of file PercentChangePostprocessor.C.

43 {
44 }
virtual void GeneralPostprocessor::finalize ( )
inlineoverridevirtualinherited

This is called after execute() and after threadJoin()! This is probably where you want to do MPI communication! Finalize is not required for Postprocessor implementations since work may be done in getValue().

Implements UserObject.

Reimplemented in PointValue, and MemoryUsage.

Definition at line 44 of file GeneralPostprocessor.h.

44 {}
template<typename T >
void UserObject::gatherMax ( T &  value)
inlineinherited

Definition at line 125 of file UserObject.h.

Referenced by MemoryUsage::finalize(), NodalMaxValue::getValue(), NodalExtremeValue::getValue(), and ElementExtremeValue::getValue().

126  {
127  _communicator.max(value);
128  }
template<typename T >
void UserObject::gatherMin ( T &  value)
inlineinherited

Definition at line 131 of file UserObject.h.

Referenced by PointValue::execute(), MemoryUsage::finalize(), ScalarVariable::getValue(), NodalExtremeValue::getValue(), and ElementExtremeValue::getValue().

132  {
133  _communicator.min(value);
134  }
template<typename T1 , typename T2 >
void UserObject::gatherProxyValueMax ( T1 &  value,
T2 &  proxy 
)
inlineinherited

Definition at line 137 of file UserObject.h.

Referenced by ElementVariablesDifferenceMax::finalize(), and NodalProxyMaxValue::getValue().

138  {
139  unsigned int rank;
140  _communicator.maxloc(value, rank);
141  _communicator.broadcast(proxy, rank);
142  }
template<typename T >
void UserObject::gatherSum ( T &  value)
inlineinherited
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 411 of file MaterialPropertyInterface.h.

412 {
413  if (_mi_block_ids.empty())
414  mooseError("getBlockMaterialProperty must be called by a block restrictable object");
415 
416  if (!hasMaterialPropertyByName<T>(name))
417  return std::pair<const MaterialProperty<T> *, std::set<SubdomainID>>(NULL,
418  std::set<SubdomainID>());
419 
420  _material_property_dependencies.insert(_material_data->getPropertyId(name));
421 
422  return std::pair<const MaterialProperty<T> *, std::set<SubdomainID>>(
423  &_material_data->getProperty<T>(name), _mi_feproblem.getMaterialPropertyBlocks(name));
424 }
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:182
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:105
Concrete definition of a parameter value for a specified type.
const std::vector< MooseVariableScalar * > & ScalarCoupleable::getCoupledMooseScalarVars ( )
inherited

Get the list of coupled scalar variables.

Returns
The list of coupled variables

Definition at line 72 of file ScalarCoupleable.C.

Referenced by AuxScalarKernel::AuxScalarKernel(), and ScalarInitialCondition::ScalarInitialCondition().

73 {
75 }
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
Vector of coupled variables.
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 92 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

93 {
95 }
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
VariableValue * ScalarCoupleable::getDefaultValue ( const std::string &  var_name)
protectedinherited

Helper method to return (and insert if necessary) the default value for an uncoupled variable.

Parameters
var_namethe name of the variable for which to retrieve a default value
Returns
VariableValue * a pointer to the associated VarirableValue.

Definition at line 114 of file ScalarCoupleable.C.

Referenced by ScalarCoupleable::coupledScalarValue(), ScalarCoupleable::coupledScalarValueOld(), and ScalarCoupleable::coupledScalarValueOlder().

115 {
116  std::map<std::string, VariableValue *>::iterator default_value_it = _default_value.find(var_name);
117  if (default_value_it == _default_value.end())
118  {
121  default_value_it = _default_value.insert(std::make_pair(var_name, value)).first;
122  }
123 
124  return default_value_it->second;
125 }
MooseArray< Real > VariableValue
FEProblemBase & _sc_fe_problem
Order getMaxScalarOrder() const
const InputParameters & _coupleable_params
Local InputParameters.
std::map< std::string, VariableValue * > _default_value
Will hold the default value for optional coupled scalar variables.
Real defaultCoupledValue(const std::string &coupling_name) const
Get the default value for an optionally coupled variable.
Distribution & DistributionInterface::getDistribution ( const std::string &  name)
inherited

Get a distribution with a given name.

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

Definition at line 34 of file DistributionInterface.C.

35 {
36  DistributionName dist_name = _dni_params.get<DistributionName>(name);
37  return _dni_feproblem.getDistribution(dist_name);
38 }
virtual Distribution & getDistribution(const std::string &name)
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
const InputParameters & _dni_params
Parameters of the object with this interface.
Distribution & DistributionInterface::getDistributionByName ( const DistributionName &  name)
inherited

Get a distribution with a given name.

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

Definition at line 41 of file DistributionInterface.C.

Referenced by Sampler::Sampler().

42 {
43  return _dni_feproblem.getDistribution(name);
44 }
virtual Distribution & getDistribution(const std::string &name)
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
MultiMooseEnum SetupInterface::getExecuteOptions ( )
staticinherited

Returns the available options for the 'execute_on' input parameters.

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

Definition at line 110 of file SetupInterface.C.

Referenced by AddNodalNormalsAction::act(), AdvancedOutput::addValidParams(), AdvancedOutput::initExecutionTypes(), OutputOnWarehouse::OutputOnWarehouse(), validParams< CommonOutputAction >(), validParams< Output >(), and validParams< SetupInterface >().

111 {
112  return MultiMooseEnum("none=0x00 initial=0x01 linear=0x02 nonlinear=0x04 timestep_end=0x08 "
113  "timestep_begin=0x10 final=0x20 custom=0x100",
114  "linear");
115 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Function & FunctionInterface::getFunction ( const std::string &  name)
inherited

Get a function with a given name.

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

Definition at line 35 of file FunctionInterface.C.

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

Get a function with a given name.

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

Definition at line 41 of file FunctionInterface.C.

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

42 {
43  return _fni_feproblem.getFunction(name, _fni_tid);
44 }
virtual Function & getFunction(const std::string &name, THREAD_ID tid=0)
FEProblemBase & _fni_feproblem
Reference to FEProblemBase instance.
THREAD_ID _fni_tid
Thread ID.
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 164 of file MaterialPropertyInterface.C.

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

Definition at line 170 of file MaterialPropertyInterface.C.

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

171 {
172  std::shared_ptr<Material> discrete =
174 
175  // Check block compatibility
176  if (!discrete->hasBlocks(_mi_block_ids))
177  {
178  std::ostringstream oss;
179  oss << "The Material object '" << discrete->name()
180  << "' is defined on blocks that are incompatible with the retrieving object '" << _mi_name
181  << "':\n";
182  oss << " " << discrete->name();
183  for (const auto & sbd_id : discrete->blockIDs())
184  oss << " " << sbd_id;
185  oss << "\n";
186  oss << " " << _mi_name;
187  for (const auto & block_id : _mi_block_ids)
188  oss << " " << block_id;
189  oss << "\n";
190  mooseError(oss.str());
191  }
192 
193  // Check boundary compatibility
194  if (!discrete->hasBoundary(_mi_boundary_ids))
195  {
196  std::ostringstream oss;
197  oss << "The Material object '" << discrete->name()
198  << "' is defined on boundaries that are incompatible with the retrieving object '"
199  << _mi_name << "':\n";
200  oss << " " << discrete->name();
201  for (const auto & bnd_id : discrete->boundaryIDs())
202  oss << " " << bnd_id;
203  oss << "\n";
204  oss << " " << _mi_name;
205  for (const auto & bnd_id : _mi_boundary_ids)
206  oss << " " << bnd_id;
207  oss << "\n";
208  mooseError(oss.str());
209  }
210 
211  return *discrete;
212 }
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:182
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.
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 287 of file MaterialPropertyInterface.h.

288 {
289  // Check if the supplied parameter is a valid input parameter key
290  std::string prop_name = deducePropertyName(name);
291 
292  // Check if it's just a constant
293  const MaterialProperty<T> * default_property = defaultMaterialProperty<T>(prop_name);
294  if (default_property)
295  return *default_property;
296 
297  return getMaterialPropertyByName<T>(prop_name);
298 }
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.
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 120 of file MaterialPropertyInterface.C.

121 {
123 }
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:121
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 114 of file MaterialPropertyInterface.C.

115 {
117 }
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:105
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 126 of file MaterialPropertyInterface.C.

127 {
129 }
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:162
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 132 of file MaterialPropertyInterface.C.

133 {
135 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames(const std::string &prop_name)
Get a vector of block id equivalences that the material property is defined on.
Definition: SubProblem.C:178
template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyByName ( const MaterialPropertyName &  name)
inherited

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.

Parameters
nameThe name of the material property to retrieve
Returns
Reference to the material property with the name 'name'

Definition at line 357 of file MaterialPropertyInterface.h.

358 {
360  checkMaterialProperty(name);
361 
362  // mark property as requested
363  markMatPropRequested(name);
364 
365  // Update the boolean flag.
367 
368  _material_property_dependencies.insert(_material_data->getPropertyId(name));
369 
370  return _material_data->getProperty<T>(name);
371 }
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.
bool MaterialPropertyInterface::getMaterialPropertyCalled ( ) const
inlineinherited

Returns true if getMaterialProperty() has been called, false otherwise.

Definition at line 173 of file MaterialPropertyInterface.h.

bool _get_material_property_called
Initialized to false.
template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyOld ( const std::string &  name)
inherited

Definition at line 302 of file MaterialPropertyInterface.h.

303 {
304  if (!_stateful_allowed)
305  mooseError("Stateful material properties not allowed for this object."
306  " Old property for \"",
307  name,
308  "\" was requested.");
309 
310  // Check if the supplied parameter is a valid input parameter key
311  std::string prop_name = deducePropertyName(name);
312 
313  // Check if it's just a constant
314  const MaterialProperty<T> * default_property = defaultMaterialProperty<T>(prop_name);
315  if (default_property)
316  return *default_property;
317 
318  return getMaterialPropertyOldByName<T>(prop_name);
319 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
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.
bool _stateful_allowed
True by default.
template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyOldByName ( const MaterialPropertyName &  name)
inherited

Definition at line 375 of file MaterialPropertyInterface.h.

376 {
377  if (!_stateful_allowed)
378  mooseError("Stateful material properties not allowed for this object."
379  " Old property for \"",
380  name,
381  "\" was requested.");
382 
383  // mark property as requested
384  markMatPropRequested(name);
385 
386  _material_property_dependencies.insert(_material_data->getPropertyId(name));
387 
388  return _material_data->getPropertyOld<T>(name);
389 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
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.
bool _stateful_allowed
True by default.
template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyOlder ( const std::string &  name)
inherited

Definition at line 323 of file MaterialPropertyInterface.h.

324 {
325  if (!_stateful_allowed)
326  mooseError("Stateful material properties not allowed for this object."
327  " Older property for \"",
328  name,
329  "\" was requested.");
330 
331  // Check if the supplied parameter is a valid input parameter key
332  std::string prop_name = deducePropertyName(name);
333 
334  // Check if it's just a constant
335  const MaterialProperty<T> * default_property = defaultMaterialProperty<T>(prop_name);
336  if (default_property)
337  return *default_property;
338 
339  return getMaterialPropertyOlderByName<T>(prop_name);
340 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
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.
bool _stateful_allowed
True by default.
template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyOlderByName ( const MaterialPropertyName &  name)
inherited

Definition at line 393 of file MaterialPropertyInterface.h.

394 {
395  if (!_stateful_allowed)
396  mooseError("Stateful material properties not allowed for this object."
397  " Older property for \"",
398  name,
399  "\" was requested.");
400 
401  // mark property as requested
402  markMatPropRequested(name);
403 
404  _material_property_dependencies.insert(_material_data->getPropertyId(name));
405 
406  return _material_data->getPropertyOlder<T>(name);
407 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
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.
bool _stateful_allowed
True by default.
const std::set<unsigned int>& MaterialPropertyInterface::getMatPropDependencies ( ) const
inlineinherited

Retrieve the set of material properties that this object depends on.

Returns
The IDs corresponding to the material properties that MUST be reinited before evaluating this object

Definition at line 181 of file MaterialPropertyInterface.h.

Referenced by LineMaterialSamplerBase< T >::execute().

182  {
184  }
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
MooseApp& MooseObject::getMooseApp ( )
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 72 of file MooseObject.h.

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

72 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
const std::set< OutputName > & OutputInterface::getOutputs ( )
inherited

Get the list of output objects that this class is restricted.

Returns
A set of OutputNames

Definition at line 100 of file OutputInterface.C.

101 {
102  return _oi_outputs;
103 }
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.
template<typename T >
const T & MooseObject::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

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

Definition at line 122 of file MooseObject.h.

Referenced by FEProblemBase::addMaterial(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), EigenKernel::EigenKernel(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), TimeSequenceStepper::init(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), SideSetsAroundSubdomain::modify(), RenameBlock::modify(), MooseObject::parameters(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

123 {
124  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
125 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
const PostprocessorValue & GeneralUserObject::getPostprocessorValue ( const std::string &  name)
virtualinherited

Store dependency among same object types for proper execution order.

Definition at line 51 of file GeneralUserObject.C.

52 {
53  _depend_vars.insert(_pars.get<PostprocessorName>(name));
55 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
const PostprocessorValue & getPostprocessorValue(const std::string &name)
Retrieve the value of a Postprocessor or one of it&#39;s old or older values.
std::set< std::string > _depend_vars
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
const PostprocessorValue & GeneralUserObject::getPostprocessorValueByName ( const PostprocessorName &  name)
virtualinherited

Definition at line 58 of file GeneralUserObject.C.

Referenced by LinearCombinationPostprocessor::LinearCombinationPostprocessor(), Terminator::Terminator(), and VectorOfPostprocessors::VectorOfPostprocessors().

59 {
60  _depend_vars.insert(name);
62 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name)
Retrieve the value of the Postprocessor.
std::set< std::string > _depend_vars
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOld ( const std::string &  name)
inherited

Definition at line 40 of file PostprocessorInterface.C.

41 {
42  // Return the default if the Postprocessor does not exist and a default does, otherwise
43  // continue as usual
46  else
47  return _pi_feproblem.getPostprocessorValueOld(_ppi_params.get<PostprocessorName>(name));
48 }
PostprocessorValue & getPostprocessorValueOld(const std::string &name)
Get the reference to the old value of a post-processor.
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOldByName ( const PostprocessorName &  name)
inherited

Definition at line 68 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

69 {
71 }
PostprocessorValue & getPostprocessorValueOld(const std::string &name)
Get the reference to the old value of a post-processor.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlder ( const std::string &  name)
inherited

Definition at line 51 of file PostprocessorInterface.C.

52 {
53  // Return the default if the Postprocessor does not exist and a default does, otherwise
54  // continue as usual
57  else
58  return _pi_feproblem.getPostprocessorValueOlder(_ppi_params.get<PostprocessorName>(name));
59 }
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
PostprocessorValue & getPostprocessorValueOlder(const std::string &name)
Get the reference to the older value of a post-processor.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlderByName ( const PostprocessorName &  name)
inherited

Definition at line 74 of file PostprocessorInterface.C.

75 {
77 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
PostprocessorValue & getPostprocessorValueOlder(const std::string &name)
Get the reference to the older value of a post-processor.
const std::set< std::string > & GeneralUserObject::getRequestedItems ( )
overridevirtualinherited

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

Implements DependencyResolverInterface.

Definition at line 39 of file GeneralUserObject.C.

40 {
41  return _depend_vars;
42 }
std::set< std::string > _depend_vars
MooseVariableScalar * ScalarCoupleable::getScalarVar ( const std::string &  var_name,
unsigned int  comp 
)
protectedinherited

Extract pointer to a scalar coupled variable.

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

Definition at line 175 of file ScalarCoupleable.C.

Referenced by ScalarCoupleable::coupledScalar(), ScalarCoupleable::coupledScalarDot(), ScalarCoupleable::coupledScalarDotDu(), ScalarCoupleable::coupledScalarOrder(), ScalarCoupleable::coupledScalarValue(), ScalarCoupleable::coupledScalarValueOld(), ScalarCoupleable::coupledScalarValueOlder(), and ParsedODEKernel::ParsedODEKernel().

176 {
177  if (_coupled_scalar_vars.find(var_name) != _coupled_scalar_vars.end())
178  {
179  if (comp < _coupled_scalar_vars[var_name].size())
180  return _coupled_scalar_vars[var_name][comp];
181  else
182  mooseError("Trying to get a non-existent component of variable '" + var_name + "'");
183  }
184  else
185  mooseError("Trying to get a non-existent variable '" + var_name + "'");
186 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.
SubProblem& UserObject::getSubProblem ( ) const
inlineinherited

Returns a reference to the subproblem that this postprocessor is tied to.

Definition at line 86 of file UserObject.h.

86 { return _subproblem; }
SubProblem & _subproblem
Reference to the Subproblem for this user object.
Definition: UserObject.h:146
const std::set< std::string > & GeneralUserObject::getSuppliedItems ( )
overridevirtualinherited

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

Implements DependencyResolverInterface.

Definition at line 45 of file GeneralUserObject.C.

46 {
47  return _supplied_vars;
48 }
std::set< std::string > _supplied_vars
template<class T >
const T & UserObjectInterface::getUserObject ( const std::string &  name)
inherited

Get an user object with a given parameter name.

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

Definition at line 85 of file UserObjectInterface.h.

86 {
87  unsigned int tid = isDiscreteUserObject(getUserObjectBase(name)) ? _uoi_tid : 0;
88  return _uoi_feproblem.getUserObject<T>(_uoi_params.get<UserObjectName>(name), tid);
89 }
bool isDiscreteUserObject(const UserObject &uo) const
Check if the user object is a DiscreteElementUserObject.
const InputParameters & _uoi_params
Parameters of the object with this interface.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
THREAD_ID _uoi_tid
Thread ID.
const T & getUserObject(const std::string &name, unsigned int tid=0)
Get the user object by its name.
const UserObject & getUserObjectBase(const std::string &name)
Get an user object with a given parameter name.
const UserObject & UserObjectInterface::getUserObjectBase ( const std::string &  name)
inherited

Get an user object with a given parameter name.

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

Definition at line 28 of file UserObjectInterface.C.

Referenced by UserObjectInterface::getUserObject(), InitialCondition::getUserObjectBase(), and AuxKernel::getUserObjectBase().

29 {
30  return _uoi_feproblem.getUserObjectBase(_uoi_params.get<UserObjectName>(name));
31 }
const InputParameters & _uoi_params
Parameters of the object with this interface.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
const UserObject & getUserObjectBase(const std::string &name)
Get the user object by its name.
const UserObject & UserObjectInterface::getUserObjectBaseByName ( const std::string &  name)
inherited

Get an user object with a given name.

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

Definition at line 34 of file UserObjectInterface.C.

Referenced by UserObjectInterface::getUserObjectByName().

35 {
36  return _uoi_feproblem.getUserObjectBase(name);
37 }
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
const UserObject & getUserObjectBase(const std::string &name)
Get the user object by its name.
template<class T >
const T & UserObjectInterface::getUserObjectByName ( const std::string &  name)
inherited

Get an user object with a given name.

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

Definition at line 93 of file UserObjectInterface.h.

94 {
95  unsigned int tid = isDiscreteUserObject(getUserObjectBaseByName(name)) ? _uoi_tid : 0;
96  return _uoi_feproblem.getUserObject<T>(name, tid);
97 }
bool isDiscreteUserObject(const UserObject &uo) const
Check if the user object is a DiscreteElementUserObject.
const UserObject & getUserObjectBaseByName(const std::string &name)
Get an user object with a given name.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
THREAD_ID _uoi_tid
Thread ID.
const T & getUserObject(const std::string &name, unsigned int tid=0)
Get the user object by its name.
Real PercentChangePostprocessor::getValue ( )
overridevirtual

This will get called to actually grab the final value the postprocessor has calculated.

Implements Postprocessor.

Definition at line 47 of file PercentChangePostprocessor.C.

48 {
49  return std::fabs((std::fabs(_postprocessor) - std::fabs(_postprocessor_old)) *
50  std::pow(std::fabs(_postprocessor), -1));
51 }
const PostprocessorValue & _postprocessor
const PostprocessorValue & _postprocessor_old
const VectorPostprocessorValue & GeneralUserObject::getVectorPostprocessorValue ( const std::string &  name,
const std::string &  vector_name 
)
overridevirtualinherited

Retrieve the value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor parameter (see below)
vector_nameThe name of the particular vector you want.
Returns
A reference to the desired value

The name required by this method is the name that is hard-coded into your source code. For example, if you have a Kernel that requires a VectorPostprocessor you may have an input file with "pp = my_pp", this function requires the "pp" name as input (see .../moose_test/functions/VectorPostprocessorFunction.C)

see getVectorPostprocessorValueOld getVectorPostprocessorValueByName getVectorPostprocessorValueOldByName

Reimplemented from VectorPostprocessorInterface.

Definition at line 65 of file GeneralUserObject.C.

67 {
68  _depend_vars.insert(_pars.get<VectorPostprocessorName>(name));
70 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::set< std::string > _depend_vars
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
virtual const VectorPostprocessorValue & getVectorPostprocessorValue(const std::string &name, const std::string &vector_name)
Retrieve the value of a VectorPostprocessor.
const VectorPostprocessorValue & GeneralUserObject::getVectorPostprocessorValueByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name 
)
overridevirtualinherited

Retrieve the value of the VectorPostprocessor.

Parameters
nameVectorPostprocessor name (see below)
vector_nameThe name of the particular vector you want.
Returns
A reference to the desired value

The name required by this method is the name defined in the input file. For example, if you have a Kernel that requires a VectorPostprocessor you may have an input file with "pp = my_pp", this method requires the "my_pp" name as input (see .../moose_test/functions/VectorPostprocessorFunction.C)

see getVectorPostprocessorValue getVectorPostprocessorValueOldByName getVectorPostprocessorValueByName

Reimplemented from VectorPostprocessorInterface.

Definition at line 73 of file GeneralUserObject.C.

75 {
76  _depend_vars.insert(name);
78 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
virtual const VectorPostprocessorValue & getVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name)
Retrieve the value of the VectorPostprocessor.
std::set< std::string > _depend_vars
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOld ( const std::string &  name,
const std::string &  vector_name 
)
inherited

Retrieve the old value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor parameter
vector_nameThe name of the particular vector you want.
Returns
The value of the VectorPostprocessor

see getVectorPostprocessorValue

Definition at line 44 of file VectorPostprocessorInterface.C.

46 {
48  _vpi_params.get<VectorPostprocessorName>(name), vector_name);
49 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
Get the reference to the old value of a post-processor.
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOldByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name 
)
inherited

Retrieve the old value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor
vector_nameThe name of the particular vector you want.
Returns
The value of the VectorPostprocessor

If within the validParams for the object the addVectorPostprocessorParam was called this method will retun a reference to the default value specified in the call to the addVectorPostprocessorParam function if the postVectorPostprocessor does not exist.

see getVectorPostprocessorValueByName

Definition at line 52 of file VectorPostprocessorInterface.C.

54 {
55  return _vpi_feproblem.getVectorPostprocessorValueOld(name, vector_name);
56 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
Get the reference to the old value of a post-processor.
template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getZeroMaterialProperty ( const std::string &  prop_name)
inherited

Return a material property that is initialized to zero by default and does not need to (but can) be declared by another material.

Definition at line 444 of file MaterialPropertyInterface.h.

445 {
446  // static zero property storage
447  static MaterialProperty<T> zero;
448 
449  // resize to accomodate maximum number of qpoints
450  // (in multiapp scenarios getMaxQps can return different values in each app; we need the max)
451  unsigned int nqp = _mi_feproblem.getMaxQps();
452  if (nqp > zero.size())
453  zero.resize(nqp);
454 
455  // set values for all qpoints to zero
456  for (unsigned int qp = 0; qp < nqp; ++qp)
457  mooseSetToZero<T>(zero[qp]);
458 
459  return zero;
460 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual void resize(int n)
Resizes the property to the size n.
unsigned int getMaxQps() const
Concrete definition of a parameter value for a specified type.
unsigned int size() const
template<typename T >
bool MaterialPropertyInterface::hasMaterialProperty ( const std::string &  name)
inherited

Check if the material property exists.

Parameters
namethe name of the property to query
Returns
true if the property exists, otherwise false

Definition at line 428 of file MaterialPropertyInterface.h.

429 {
430  // Check if the supplied parameter is a valid input parameter key
431  std::string prop_name = deducePropertyName(name);
432  return _material_data->haveProperty<T>(prop_name);
433 }
std::string deducePropertyName(const std::string &name)
Small helper to look up a material property name through the input parameter keys.
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
template<typename T >
bool MaterialPropertyInterface::hasMaterialPropertyByName ( const std::string &  name)
inherited

Definition at line 437 of file MaterialPropertyInterface.h.

438 {
439  return _material_data->haveProperty<T>(name);
440 }
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
bool PostprocessorInterface::hasPostprocessor ( const std::string &  name) const
inherited

Determine if the Postprocessor exists.

Parameters
nameThe name of the Postprocessor parameter
Returns
True if the Postprocessor exists
See also
hasPostprocessorByName getPostprocessorValue

Definition at line 80 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel(), PostprocessorInterface::getPostprocessorValue(), PostprocessorInterface::getPostprocessorValueOld(), PostprocessorInterface::getPostprocessorValueOlder(), and TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction().

81 {
82  return _pi_feproblem.hasPostprocessor(_ppi_params.get<PostprocessorName>(name));
83 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasPostprocessor(const std::string &name)
Check existence of the postprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
bool PostprocessorInterface::hasPostprocessorByName ( const PostprocessorName &  name)
inherited

Determine if the Postprocessor exists.

Parameters
nameThe name of the Postprocessor
Returns
True if the Postprocessor exists
See also
hasPostprocessor getPostprocessorValueByName

Definition at line 86 of file PostprocessorInterface.C.

Referenced by VectorOfPostprocessors::VectorOfPostprocessors().

87 {
88  return _pi_feproblem.hasPostprocessor(name);
89 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasPostprocessor(const std::string &name)
Check existence of the postprocessor.
bool VectorPostprocessorInterface::hasVectorPostprocessor ( const std::string &  name) const
inherited

Determine if the VectorPostprocessor exists.

Parameters
nameThe name of the VectorPostprocessor parameter
Returns
True if the VectorPostprocessor exists
See also
hasVectorPostprocessorByName getVectorPostprocessorValue

Definition at line 59 of file VectorPostprocessorInterface.C.

60 {
61  return _vpi_feproblem.hasVectorPostprocessor(_vpi_params.get<VectorPostprocessorName>(name));
62 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool hasVectorPostprocessor(const std::string &name)
Check existence of the VectorPostprocessor.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
bool VectorPostprocessorInterface::hasVectorPostprocessorByName ( const VectorPostprocessorName &  name) const
inherited

Determine if the VectorPostprocessor exists.

Parameters
nameThe name of the VectorPostprocessor
Returns
True if the VectorPostprocessor exists
See also
hasVectorPostprocessor getVectorPostprocessorValueByName

Definition at line 65 of file VectorPostprocessorInterface.C.

67 {
69 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool hasVectorPostprocessor(const std::string &name)
Check existence of the VectorPostprocessor.
void PercentChangePostprocessor::initialize ( )
overridevirtual

Called before execute() is ever called so that data can be cleared.

Implements UserObject.

Definition at line 37 of file PercentChangePostprocessor.C.

38 {
39 }
void SetupInterface::initialSetup ( )
virtualinherited
bool ScalarCoupleable::isCoupledScalar ( const std::string &  var_name,
unsigned int  i = 0 
)
protectedvirtualinherited

Returns true if a variables has been coupled_as name.

Parameters
var_nameThe of the coupled variable
iBy default 0, in general the index to test in a vector of MooseVariable pointers.

Definition at line 78 of file ScalarCoupleable.C.

Referenced by ScalarCoupleable::coupledScalarOrder(), ScalarCoupleable::coupledScalarValue(), ScalarCoupleable::coupledScalarValueOld(), and ScalarCoupleable::coupledScalarValueOlder().

79 {
80  std::map<std::string, std::vector<MooseVariableScalar *>>::iterator it =
81  _coupled_scalar_vars.find(var_name);
82  if (it != _coupled_scalar_vars.end())
83  return (i < it->second.size());
84  else
85  {
86  // Make sure the user originally requested this value in the InputParameter syntax
87  if (!_coupleable_params.hasCoupledValue(var_name))
88  mooseError("The coupled scalar variable \"",
89  var_name,
90  "\" was never added to this objects's "
91  "InputParameters, please double-check "
92  "your spelling");
93 
94  return false;
95  }
96 }
bool hasCoupledValue(const std::string &coupling_name) const
Return whether or not the coupled variable exists.
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
const InputParameters & _coupleable_params
Local InputParameters.
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.
bool TransientInterface::isImplicit ( )
inlineinherited

Definition at line 41 of file TransientInterface.h.

41 { return _is_implicit; }
bool _is_implicit
If the object is using implicit or explicit form.
bool MooseObject::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 67 of file MooseObject.h.

Referenced by BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), GeneratedMesh::buildMesh(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), MultiAppNearestNodeTransfer::getLocalNodes(), MultiAppNearestNodeTransfer::getNearestNode(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), MooseParsedVectorFunction::initialSetup(), Console::initialSetup(), Receiver::initialSetup(), SolutionFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), AdvancedOutput::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), BreakBoundaryOnSubdomain::modify(), MeshExtruder::modify(), MeshSideSet::modify(), AssignElementSubdomainID::modify(), RenameBlock::modify(), ParsedSubdomainMeshModifier::modify(), SubdomainBoundingBox::modify(), EigenExecutionerBase::normalizeSolution(), Output::Output(), Exodus::outputSetup(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), SolutionUserObject::readExodusII(), RenameBlock::RenameBlock(), Piecewise::setData(), SolutionUserObject::SolutionUserObject(), and TimePeriod::TimePeriod().

67 { return _pars.isParamValid(name); }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
void SetupInterface::jacobianSetup ( )
virtualinherited

Gets called just before the Jacobian is computed and before this object is asked to do its job.

Definition at line 79 of file SetupInterface.C.

80 {
81 }
void UserObject::load ( std::ifstream &  stream)
virtualinherited

Load user data object from a stream.

Parameters
streamStream to load from

Definition at line 73 of file UserObject.C.

74 {
75 }
void MaterialPropertyInterface::markMatPropRequested ( const std::string &  name)
protectedinherited

A proxy method for _mi_feproblem.markMatPropRequested(name)

Definition at line 152 of file MaterialPropertyInterface.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyByName(), MaterialPropertyInterface::getMaterialPropertyOldByName(), and MaterialPropertyInterface::getMaterialPropertyOlderByName().

153 {
155 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual void markMatPropRequested(const std::string &)
Helper method for adding a material property name to the _material_property_requested set...
Definition: SubProblem.C:275
virtual void MeshChangedInterface::meshChanged ( )
inlinevirtualinherited

Called on this object when the mesh changes.

Reimplemented in DiracKernel, Console, OversampleOutput, Exodus, Nemesis, GeometryBase, and EqualValueBoundaryConstraint.

Definition at line 43 of file MeshChangedInterface.h.

43 {}
template<typename... Args>
void MooseObject::mooseDeprecated ( Args &&...  args) const
inlineinherited
template<typename... Args>
void MooseObject::mooseError ( Args &&...  args) const
inlineinherited

Definition at line 80 of file MooseObject.h.

Referenced by FEProblemBase::addInitialCondition(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AnnularMesh::AnnularMesh(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), EigenExecutionerBase::chebyshev(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), SubProblem::checkMatProps(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), FEProblemBase::computeResidual(), Material::computeSubdomainProperties(), PenetrationAux::computeValue(), TimeStepper::constrainStep(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), DebugResidualAux::DebugResidualAux(), BicubicSplineFunction::derivative(), DGKernel::DGKernel(), SolutionUserObject::discontinuousPointValue(), SolutionUserObject::discontinuousPointValueGradient(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), PerflogDumper::execute(), NodalValueSampler::execute(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), FindValueOnLine::execute(), MultiAppInterpolationTransfer::execute(), TimeExtremeValue::execute(), LeastSquaresFit::execute(), FEProblemBase::executeControls(), FileOutput::FileOutput(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FunctionDT::FunctionDT(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), GeneratedMesh::GeneratedMesh(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), GeneratedMesh::getMaxInDimension(), AnnularMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), GeneratedMesh::getMinInDimension(), AnnularMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMesh::GetPixelInfo(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObjectBase(), NumVars::getValue(), PerformanceData::getValue(), Residual::getValue(), FindValueOnLine::getValueAtPoint(), DisplacedProblem::getVariable(), FEProblemBase::getVariable(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), FullSolveMultiApp::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), KernelBase::KernelBase(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< T >::LineMaterialSamplerBase(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), SideSetsFromNormals::modify(), SideSetsFromPoints::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), AssignElementSubdomainID::modify(), AddAllSideSetsByNormals::modify(), ElementDeleterBase::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), NodalBC::NodalBC(), NodalConstraint::NodalConstraint(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), VTKOutput::output(), XDA::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PatternedMesh::PatternedMesh(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMultilinear::PiecewiseMultilinear(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), LStableDirk2::postStep(), LStableDirk3::postStep(), ImplicitMidpoint::postStep(), ExplicitTVDRK2::postStep(), AStableDirk4::postStep(), LStableDirk4::postStep(), ExplicitRK2::postStep(), Predictor::Predictor(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), Piecewise::setData(), EigenProblem::setEigenproblemType(), Sampler::setNumberOfRequiedRandomSeeds(), Split::setup(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromPoints::SideSetsFromPoints(), SolutionUserObject::SolutionUserObject(), FullSolveMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), Console::systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), Transient::Transient(), TransientMultiApp::TransientMultiApp(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), and VolumeHistogram::VolumeHistogram().

81  {
82  std::ostringstream oss;
83  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
84  std::string msg = oss.str();
85  callMooseErrorRaw(msg, &_app);
86  }
void mooseStreamAll(std::ostringstream &ss)
Definition: MooseError.C:78
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:45
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
template<typename... Args>
void MooseObject::mooseInfo ( Args &&...  args) const
inlineinherited

Definition at line 101 of file MooseObject.h.

102  {
103  moose::internal::mooseInfoStream(_console, std::forward<Args>(args)...);
104  }
void mooseInfoStream(S &oss, Args &&...args)
Definition: MooseError.h:145
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
template<typename... Args>
void MooseObject::mooseWarning ( Args &&...  args) const
inlineinherited
const std::string& MooseObject::name ( ) const
inlineinherited

Get the name of the object.

Returns
The name of the object

Definition at line 47 of file MooseObject.h.

Referenced by FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), Output::advancedExecuteOn(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), AStableDirk4::AStableDirk4(), Function::average(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), AuxKernel::coupledCallback(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), MultiApp::createApp(), DGKernel::DGKernel(), AB2PredictorCorrector::estimateTimeError(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), GeneralUserObject::GeneralUserObject(), MultiApp::getBoundingBox(), Control::getControllableParameterHelper(), Control::getControllableValue(), AuxKernel::getDependObjects(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), OutputWarehouse::getOutput(), Transient::getTimeStepperName(), InitialCondition::getUserObject(), AuxKernel::getUserObject(), InitialCondition::getUserObjectByName(), AuxKernel::getUserObjectByName(), AdvancedOutput::hasOutputHelper(), FEProblemBase::init(), CSVReader::initialize(), MultiAppProjectionTransfer::initialSetup(), InitialCondition::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), KernelBase::KernelBase(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MaterialDerivativeTestKernelBase< T >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), ElementDeleterBase::modify(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), DOFMapOutput::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::parameters(), Executioner::parentOutputPositionChanged(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), Material::resetQpProperties(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), OutputWarehouse::setFileNumbers(), MooseMesh::setSubdomainName(), Split::setup(), TransientMultiApp::setupApp(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), Function::timeDerivative(), TransientMultiApp::TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), and AdvancedOutput::wantOutput().

47 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:114
const InputParameters& MooseObject::parameters ( ) const
inlineinherited
std::string Postprocessor::PPName ( )
inlineinherited

Returns the name of the Postprocessor.

Definition at line 48 of file Postprocessor.h.

48 { return _pp_name; }
std::string _pp_name
Definition: Postprocessor.h:51
void SetupInterface::residualSetup ( )
virtualinherited

Gets called just before the residual is computed and before this object is asked to do its job.

Definition at line 84 of file SetupInterface.C.

85 {
86 }
bool UserObject::shouldDuplicateInitialExecution ( ) const
inlineinherited

Returns whether or not this user object should be executed twice during the initial condition when depended upon by an IC.

Definition at line 92 of file UserObject.h.

const bool _duplicate_initial_execution
Definition: UserObject.h:158
template<typename T >
void DependencyResolverInterface::sort ( typename std::vector< T > &  vector)
staticinherited

Given a vector, sort using the getRequested/SuppliedItems sets.

Definition at line 63 of file DependencyResolverInterface.h.

Referenced by DependencyResolverInterface::DependencyResolverInterface().

64 {
65  DependencyResolver<T> resolver;
66 
67  typename std::vector<T>::iterator start = vector.begin();
68  typename std::vector<T>::iterator end = vector.end();
69 
70  for (typename std::vector<T>::iterator iter = start; iter != end; ++iter)
71  {
72  const std::set<std::string> & requested_items = (*iter)->getRequestedItems();
73 
74  for (typename std::vector<T>::iterator iter2 = start; iter2 != end; ++iter2)
75  {
76  if (iter == iter2)
77  continue;
78 
79  const std::set<std::string> & supplied_items = (*iter2)->getSuppliedItems();
80 
81  std::set<std::string> intersect;
82  std::set_intersection(requested_items.begin(),
83  requested_items.end(),
84  supplied_items.begin(),
85  supplied_items.end(),
86  std::inserter(intersect, intersect.end()));
87 
88  // If the intersection isn't empty then there is a dependency here
89  if (!intersect.empty())
90  resolver.insertDependency(*iter, *iter2);
91  }
92  }
93 
94  // Sort based on dependencies
95  std::stable_sort(start, end, resolver);
96 }
void insertDependency(const T &key, const T &value)
Insert a dependency pair - the first value or the "key" depends on the second value or the "value"...
virtual Real UserObject::spatialValue ( const Point &  ) const
inlinevirtualinherited

Optional interface function for "evaluating" a UserObject at a spatial position.

If a UserObject overrides this function that UserObject can then be used in a Transfer to transfer information from one domain to another.

Reimplemented in NearestPointBase< UserObjectType >, NearestPointBase< LayeredAverage >, LayeredSideIntegral, and LayeredIntegral.

Definition at line 99 of file UserObject.h.

Referenced by SpatialUserObjectAux::computeValue(), MultiAppDTKUserObjectEvaluator::evaluate(), and MultiAppUserObjectTransfer::execute().

100  {
101  mooseError(name(), " does not satisfy the Spatial UserObject interface!");
102  }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
void MaterialPropertyInterface::statefulPropertiesAllowed ( bool  stateful_allowed)
inherited

Derived classes can declare whether or not they work with stateful material properties.

See, for example, DiracKernel. By default, they are allowed.

Definition at line 158 of file MaterialPropertyInterface.C.

Referenced by DiracKernel::DiracKernel().

159 {
160  _stateful_allowed = stateful_allowed;
161 }
bool _stateful_allowed
True by default.
void UserObject::store ( std::ofstream &  stream)
virtualinherited

Store user data object to a stream.

Parameters
streamStream to store to

Definition at line 78 of file UserObject.C.

79 {
80 }
void GeneralUserObject::subdomainSetup ( )
finalvirtualinherited

Gets called when the subdomain changes (i.e.

in a Jacobian or residual loop) and before this object is asked to do its job

Reimplemented from SetupInterface.

Definition at line 88 of file GeneralUserObject.C.

89 {
90  mooseError("GeneralUserObjects do not execute subdomainSetup method, this function does nothing "
91  "and should not be used.");
92 }
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
void GeneralUserObject::threadJoin ( const UserObject )
finalvirtualinherited

This method is not used and should not be used in a custom GeneralUserObject.

Implements UserObject.

Definition at line 81 of file GeneralUserObject.C.

82 {
83  mooseError("GeneralUserObjects do not execute using threads, this function does nothing and "
84  "should not be used.");
85 }
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
void SetupInterface::timestepSetup ( )
virtualinherited

Gets called at the beginning of the timestep before this object is asked to do its job.

Reimplemented in SolutionUserObject, NumNonlinearIterations, and MemoryUsage.

Definition at line 74 of file SetupInterface.C.

75 {
76 }

Member Data Documentation

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 108 of file MooseObject.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), Executioner::addAttributeReporter(), FEProblemBase::addMaterial(), FEProblemBase::addMultiApp(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), FileMesh::buildMesh(), FEProblemBase::checkNonlinearConvergence(), OversampleOutput::cloneMesh(), FEProblemBase::computeJacobian(), FEProblemBase::computeResidualType(), Console::Console(), TimeStepper::constrainStep(), MultiApp::createApp(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), InversePowerMethod::execute(), NonlinearEigen::execute(), Transient::execute(), Steady::execute(), FileOutput::FileOutput(), FEProblemBase::forceOutput(), MooseObject::getMooseApp(), InversePowerMethod::init(), NonlinearEigen::init(), Transient::init(), Steady::init(), MooseMesh::init(), NumPicardIterations::initialize(), TimePeriod::initialSetup(), Console::initialSetup(), MultiApp::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPetscOutput(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), InversePowerMethod::InversePowerMethod(), MooseObject::mooseError(), MooseMesh::MooseMesh(), NonlinearEigen::NonlinearEigen(), Tecplot::output(), Exodus::output(), Nemesis::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), Console::outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), Console::outputSystemInformation(), MultiApp::parentOutputPositionChanged(), PerformanceData::PerformanceData(), PetscOutput::petscLinearOutput(), PetscOutput::petscNonlinearOutput(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), FEProblemBase::setRestartFile(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), Transient::Transient(), and Console::write().

Assembly& UserObject::_assembly
protectedinherited

Definition at line 153 of file UserObject.h.

Referenced by InternalSideUserObject::getNeighborElemVolume().

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 37 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), CreateProblemAction::act(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), FEProblemBase::advanceMultiApps(), SimplePredictor::apply(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualType(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), AB2PredictorCorrector::converged(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MultiApp::globalAppToLocal(), InversePowerMethod::init(), NonlinearEigen::init(), Steady::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), Transient::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), FEProblemBase::useFECache(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

const Moose::CoordinateSystemType& UserObject::_coord_sys
protectedinherited

Coordinate system.

Definition at line 156 of file UserObject.h.

const InputParameters& ScalarCoupleable::_coupleable_params
protectedinherited
std::vector<MooseVariableScalar *> ScalarCoupleable::_coupled_moose_scalar_vars
protectedinherited

Vector of coupled variables.

Definition at line 144 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::getCoupledMooseScalarVars(), and ScalarCoupleable::ScalarCoupleable().

std::map<std::string, std::vector<MooseVariableScalar *> > ScalarCoupleable::_coupled_scalar_vars
protectedinherited
const ExecFlagType& SetupInterface::_current_execute_flag
protectedinherited

Reference to FEProblemBase.

Definition at line 85 of file SetupInterface.h.

std::vector<std::unique_ptr<MaterialProperty<Real> > > MaterialPropertyInterface::_default_real_properties
protectedinherited

Storage vector for MaterialProperty<Real> default objects.

Definition at line 243 of file MaterialPropertyInterface.h.

Referenced by MaterialPropertyInterface::defaultMaterialProperty().

std::map<std::string, VariableValue *> ScalarCoupleable::_default_value
protectedinherited

Will hold the default value for optional coupled scalar variables.

Definition at line 141 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::getDefaultValue(), and ScalarCoupleable::~ScalarCoupleable().

std::set<std::string> GeneralUserObject::_depend_vars
protectedinherited
Real& TransientInterface::_dt
protectedinherited

Time step size.

Definition at line 63 of file TransientInterface.h.

Referenced by TotalVariableValue::execute(), and VariableTimeIntegrationAux::getIntegralValue().

Real& TransientInterface::_dt_old
protectedinherited

Size of the old time step.

Definition at line 66 of file TransientInterface.h.

Referenced by VariableTimeIntegrationAux::getIntegralValue().

const bool UserObject::_duplicate_initial_execution
protectedinherited

Definition at line 158 of file UserObject.h.

Referenced by UserObject::shouldDuplicateInitialExecution().

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.

Definition at line 117 of file MooseObject.h.

Referenced by MooseObject::enabled().

std::vector<ExecFlagType> SetupInterface::_exec_flags
protectedinherited

execution flag (when is the object executed/evaluated)

Definition at line 82 of file SetupInterface.h.

Referenced by SetupInterface::execBitFlags(), SetupInterface::execFlags(), and SetupInterface::SetupInterface().

FEProblemBase& UserObject::_fe_problem
protectedinherited
bool MaterialPropertyInterface::_get_material_property_called
protectedinherited

Initialized to false.

Gets set to true when getMaterialProperty() is called. Clients of this class can inquire whether getMaterialProperty() has been called by calling getMaterialPropertyCalled().

Definition at line 240 of file MaterialPropertyInterface.h.

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

bool TransientInterface::_is_implicit
protectedinherited

If the object is using implicit or explicit form.

This does NOT mean time scheme, but which values are going to be used in the object - either from current time or old time. Note that even explicit schemes have implicit form (it is the time derivative "kernel")

Definition at line 54 of file TransientInterface.h.

Referenced by EigenKernel::computeJacobian(), EigenKernel::computeOffDiagJacobian(), EigenKernel::EigenKernel(), EigenKernel::enabled(), and TransientInterface::isImplicit().

bool TransientInterface::_is_transient
protectedinherited

Definition at line 69 of file TransientInterface.h.

std::shared_ptr<MaterialData> MaterialPropertyInterface::_material_data
protectedinherited
Moose::MaterialDataType MaterialPropertyInterface::_material_data_type
protectedinherited
std::set<unsigned int> MaterialPropertyInterface::_material_property_dependencies
protectedinherited
FEProblemBase& MeshChangedInterface::_mci_feproblem
protectedinherited

Reference to FEProblemBase instance.

Definition at line 47 of file MeshChangedInterface.h.

Referenced by MeshChangedInterface::MeshChangedInterface().

FEProblemBase& MaterialPropertyInterface::_mi_feproblem
protectedinherited
const std::string MaterialPropertyInterface::_mi_name
protectedinherited

The name of the object that this interface belongs to.

Definition at line 191 of file MaterialPropertyInterface.h.

Referenced by MaterialPropertyInterface::checkMaterialProperty(), and MaterialPropertyInterface::getMaterialByName().

const InputParameters& MaterialPropertyInterface::_mi_params
protectedinherited
const THREAD_ID MaterialPropertyInterface::_mi_tid
protectedinherited

Current threaded it.

Definition at line 203 of file MaterialPropertyInterface.h.

Referenced by MaterialPropertyInterface::getMaterialByName().

const std::string& MooseObject::_name
protectedinherited
const InputParameters& MooseObject::_pars
protectedinherited
const PostprocessorValue& PercentChangePostprocessor::_postprocessor
protected

Definition at line 38 of file PercentChangePostprocessor.h.

Referenced by getValue().

const PostprocessorValue & PercentChangePostprocessor::_postprocessor_old
protected

Definition at line 38 of file PercentChangePostprocessor.h.

Referenced by getValue().

std::string Postprocessor::_pp_name
protectedinherited

Definition at line 51 of file Postprocessor.h.

Referenced by Receiver::initialSetup(), and Postprocessor::PPName().

FEProblemBase& ScalarCoupleable::_sc_fe_problem
protectedinherited
bool ScalarCoupleable::_sc_is_implicit
protectedinherited
const InputParameters& ScalarCoupleable::_sc_parameters
protectedinherited

Definition at line 60 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::ScalarCoupleable().

bool MaterialPropertyInterface::_stateful_allowed
protectedinherited
SubProblem& UserObject::_subproblem
protectedinherited
std::set<std::string> GeneralUserObject::_supplied_vars
protectedinherited
Real& TransientInterface::_t
protectedinherited
int& TransientInterface::_t_step
protectedinherited

The number of the time step.

Definition at line 60 of file TransientInterface.h.

FEProblemBase& TransientInterface::_ti_feproblem
protectedinherited

Definition at line 46 of file TransientInterface.h.

Referenced by SolutionFunction::SolutionFunction().

const InputParameters& TransientInterface::_ti_params
protectedinherited

Definition at line 44 of file TransientInterface.h.

THREAD_ID UserObject::_tid
protectedinherited

The documentation for this class was generated from the following files: