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

User object that reads an existing solution from an input file and uses it in the current simulation. More...

#include <SolutionUserObject.h>

Inheritance diagram for SolutionUserObject:
[legend]

Public Member Functions

 SolutionUserObject (const InputParameters &parameters)
 
virtual ~SolutionUserObject ()
 
virtual void timestepSetup () override
 When reading ExodusII files, this will update the interpolation times. More...
 
unsigned int getLocalVarIndex (const std::string &var_name) const
 Returns the local index for a given variable name. More...
 
Real pointValueWrapper (Real t, const Point &p, const std::string &var_name, const MooseEnum &weighting_type=weightingType()) const
 Returns a value at a specific location and variable checking for multiple values and weighting these values to obtain a single unique value (see SolutionFunction) More...
 
Real pointValue (Real t, const Point &p, const unsigned int local_var_index) const
 Returns a value at a specific location and variable (see SolutionFunction) More...
 
Real pointValue (Real t, const Point &p, const std::string &var_name) const
 Returns a value at a specific location and variable (see SolutionFunction) More...
 
std::map< const Elem *, Real > discontinuousPointValue (Real t, Point pt, const unsigned int local_var_index) const
 Returns a value at a specific location and variable for cases where the solution is multivalued at element faces Use pointValue for continuous shape functions or if you are sure your point is within an element! More...
 
std::map< const Elem *, Real > discontinuousPointValue (Real t, const Point &p, const std::string &var_name) const
 Returns a value at a specific location and variable for cases where the solution is multivalued at element faces Use pointValue for continuous shape functions or if you are sure your point is within an element! More...
 
RealGradient pointValueGradientWrapper (Real t, const Point &p, const std::string &var_name, const MooseEnum &weighting_type=weightingType()) const
 Returns the gradient at a specific location and variable checking for multiple values and weighting these values to obtain a single unique value (see SolutionFunction) More...
 
RealGradient pointValueGradient (Real t, const Point &p, const std::string &var_name) const
 Returns the gradient at a specific location and variable (see SolutionFunction) More...
 
RealGradient pointValueGradient (Real t, Point pt, const unsigned int local_var_index) const
 Returns the gradient at a specific location and variable (see SolutionFunction) More...
 
std::map< const Elem *, RealGradient > discontinuousPointValueGradient (Real t, const Point &p, const std::string &var_name) const
 Returns the gradient at a specific location and variable for cases where the gradient is multivalued (e.g. More...
 
std::map< const Elem *, RealGradient > discontinuousPointValueGradient (Real t, Point pt, const unsigned int local_var_index) const
 Returns the gradient at a specific location and variable for cases where the gradient is multivalued (e.g. More...
 
Real directValue (const Node *node, const std::string &var_name) const
 Return a value directly from a Node. More...
 
Real directValue (const Elem *elem, const std::string &var_name) const
 Return a value from the centroid of an element. More...
 
virtual void initialize () override
 Called before execute() is ever called so that data can be cleared. More...
 
virtual void finalize () override
 Finalize. More...
 
virtual void execute () override
 Execute method. More...
 
virtual void initialSetup () override
 Initialize the System and Mesh objects for the solution being read. More...
 
const std::vector< std::string > & variableNames () const
 
bool isVariableNodal (const std::string &var_name) const
 
unsigned int getMeshFileDimension () const
 Return the spatial dimension of the mesh file. 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)
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
virtual void 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...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 (DEPRECATED) Get the execution flag for the object TODO: ExecFlagType More...
 
ExecFlagType execBitFlags () const
 (DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType More...
 
FunctiongetFunction (const std::string &name)
 Get a function with a given name. More...
 
FunctiongetFunctionByName (const FunctionName &name)
 Get a function with a given name. More...
 
DistributiongetDistribution (const std::string &name)
 Get a distribution with a given name. More...
 
DistributiongetDistributionByName (const DistributionName &name)
 Get a distribution with a given name. More...
 
virtual void meshChanged ()
 Called on this object when the mesh changes. More...
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 Get the list of coupled scalar variables. More...
 
std::set< TagID > & getScalarVariableCoupleableVectorTags ()
 
std::set< TagID > & getScalarVariableCoupleableMatrixTags ()
 
void addScalarVariableCoupleableVectorTag (TagID tag)
 
void addScalarVariableCoupleableMatrixTag (TagID tag)
 
template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 Retrieve pointer to a material property with the mesh blocks where it is defined The name required by this method is the name defined in the input file. More...
 
template<typename T >
const MaterialProperty< T > & getZeroMaterialProperty (const std::string &prop_name)
 Return a material property that is initialized to zero by default and does not need to (but can) be declared by another material. More...
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 Retrieve the block ids that the material property is defined. More...
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 Retrieve the block names that the material property is defined. More...
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 Retrieve the boundary ids that the material property is defined. More...
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 Retrieve the boundary namess that the material property is defined. More...
 
void statefulPropertiesAllowed (bool)
 Derived classes can declare whether or not they work with stateful material properties. More...
 
bool getMaterialPropertyCalled () const
 Returns true if getMaterialProperty() has been called, false otherwise. More...
 
const std::set< unsigned int > & getMatPropDependencies () const
 Retrieve the set of material properties that this object depends on. More...
 
template<>
const MaterialProperty< Real > * defaultMaterialProperty (const std::string &name)
 
template<>
const ADMaterialPropertyObject< Real > * defaultADMaterialProperty (const std::string &name)
 
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...
 
virtual void threadJoin (const UserObject &) override
 This method is not used and should not be used in a custom GeneralUserObject. More...
 
virtual void subdomainSetup () override
 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
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &name, const std::string &vector_name, bool use_broadcast) override
 Retrieve the value of a VectorPostprocessor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) override
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool use_broadcast) 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 ADMaterialPropertyObject< T > & getADMaterialProperty (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name)
 Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file. More...
 
template<typename T >
const ADMaterialPropertyObject< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
MaterialgetMaterial (const std::string &name)
 Return a Material reference - usable for computing directly. More...
 
MaterialgetMaterialByName (const std::string &name, bool no_warn=false)
 
template<typename T >
bool hasMaterialProperty (const std::string &name)
 Check if the material property exists. More...
 
template<typename T >
bool hasMaterialPropertyByName (const std::string &name)
 

Static Public Member Functions

static MooseEnum weightingType ()
 
static ExecFlagEnum getExecuteOptions ()
 (DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType More...
 
template<typename T >
static void sort (typename std::vector< T > &vector)
 Given a vector, sort using the getRequested/SuppliedItems sets. More...
 
template<typename T >
static void cyclicDependencyError (CyclicDependencyException< T > &e, const std::string &header)
 A helper method for cyclic errors. More...
 

Public Attributes

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

Protected Member Functions

void readXda ()
 Method for reading XDA mesh and equation systems file(s) This method is called by the constructor when 'file_type = xda' is set in the input file. More...
 
void readExodusII ()
 Method for reading an ExodusII file, which is called when 'file_type = exodusII is set in the input file. More...
 
virtual Real directValue (dof_id_type dof_index) const
 Method for extracting value of solution based on the DOF, this is called by the public overloaded function that accept a node or element pointer. More...
 
MooseEnum getSolutionFileType ()
 Get the type of file that was read. More...
 
void updateExodusTimeInterpolation (Real time)
 Updates the times for interpolating ExodusII data. More...
 
bool updateExodusBracketingTimeIndices (Real time)
 Updates the time indices to interpolate between for ExodusII data. More...
 
Real evalMeshFunction (const Point &p, const unsigned int local_var_index, unsigned int func_num) const
 A wrapper method for calling the various MeshFunctions used for reading the data. More...
 
std::map< const Elem *, Real > evalMultiValuedMeshFunction (const Point &p, const unsigned int local_var_index, unsigned int func_num) const
 A wrapper method for calling the various MeshFunctions that calls the mesh function functionality for evaluating discontinuous shape functions near a face (where it's multivalued) More...
 
RealGradient evalMeshFunctionGradient (const Point &p, const unsigned int local_var_index, unsigned int func_num) const
 A wrapper method interfacing with the libMesh mesh function for evaluating the gradient. More...
 
std::map< const Elem *, RealGradient > evalMultiValuedMeshFunctionGradient (const Point &p, const unsigned int local_var_index, unsigned int func_num) const
 A wrapper method interfacing with the libMesh mesh function that calls the gradient functionality for evaluating potentially discontinuous gradients at element's faces (where it's multivalued) More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 
virtual bool isCoupledScalar (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled_as name. More...
 
virtual unsigned int coupledScalarComponents (const std::string &var_name)
 Return the number of components to the coupled scalar variable. More...
 
virtual unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0)
 Returns the index for a scalar coupled variable by name. More...
 
virtual Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0)
 Returns the order for a scalar coupled variable by name. More...
 
virtual VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0)
 Returns the old (previous time step) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns the older (two time steps previous) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0)
 Returns the time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0)
 Returns the second time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0)
 Returns the old time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0)
 Returns the old second time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a scalar coupled variable with respect to the coefficients. More...
 
virtual VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0)
 Second time derivative of a scalar coupled variable with respect to the coefficients. More...
 
VariableValuegetDefaultValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default value for an uncoupled variable. More...
 
void checkVar (const std::string &var_name)
 Check that the right kind of variable is being coupled in. More...
 
MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a scalar coupled variable. More...
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 Checks to make sure that the current Executioner has set "_is_transient" when old/older values are coupled in. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 
void checkMaterialProperty (const std::string &name)
 A helper method for checking material properties This method was required to avoid a compiler problem with the template getMaterialProperty method. More...
 
void markMatPropRequested (const std::string &)
 A proxy method for _mi_feproblem.markMatPropRequested(name) More...
 
std::string deducePropertyName (const std::string &name)
 Small helper to look up a material property name through the input parameter keys. More...
 
template<typename T >
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 Helper function to parse default material property values. More...
 
template<typename T >
const ADMaterialPropertyObject< T > * defaultADMaterialProperty (const std::string &name)
 Helper function to parse default material property values. More...
 
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)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the old value of a VectorPostprocessor. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the old value of a VectorPostprocessor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const std::string &name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 Return the old scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const std::string &name, const std::string &vector_name)
 Return the old scatter value for the post processor. 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

MooseEnum _file_type
 File type to read (0 = xda; 1 = ExodusII) More...
 
std::string _mesh_file
 The XDA or ExodusII file that is being read. More...
 
std::string _es_file
 The XDA file that contians the EquationSystems data (xda only) More...
 
std::string _system_name
 The system name to extract from the XDA file (xda only) More...
 
std::vector< std::string > _system_variables
 A list of variables to extract from the read system. More...
 
std::map< std::string, unsigned int > _local_variable_index
 Stores the local index need by MeshFunction. More...
 
std::map< std::string, bool > _local_variable_nodal
 Stores flag indicating if the variable is nodal. More...
 
int _exodus_time_index
 Current ExodusII time index. More...
 
bool _interpolate_times
 Flag for triggering interpolation of ExodusII data. More...
 
std::unique_ptr< MeshBase > _mesh
 Pointer the libmesh::mesh object. More...
 
std::unique_ptr< EquationSystems > _es
 Pointer to the libmesh::EquationSystems object. More...
 
System * _system
 Pointer libMesh::System class storing the read solution. More...
 
std::unique_ptr< MeshFunction > _mesh_function
 Pointer the libMesh::MeshFunction object that the read data is stored. More...
 
std::unique_ptr< ExodusII_IO > _exodusII_io
 Pointer to the libMesh::ExodusII used to read the files. More...
 
std::unique_ptr< NumericVector< Number > > _serialized_solution
 Pointer to the serial solution vector. More...
 
std::unique_ptr< EquationSystems > _es2
 Pointer to second libMesh::EquationSystems object, used for interpolation. More...
 
System * _system2
 Pointer to a second libMesh::System object, used for interpolation. More...
 
std::unique_ptr< MeshFunction > _mesh_function2
 Pointer to second libMesh::MeshFuntion, used for interpolation. More...
 
std::unique_ptr< NumericVector< Number > > _serialized_solution2
 Pointer to second serial solution, used for interpolation. More...
 
Real _interpolation_time
 Interpolation time. More...
 
Real _interpolation_factor
 Interpolation weight factor. More...
 
const std::vector< Real > * _exodus_times
 The times available in the ExodusII file. More...
 
int _exodus_index1
 Time index 1, used for interpolation. More...
 
int _exodus_index2
 Time index 2, used for interpolation. More...
 
std::vector< Real > _scale
 Scale parameter. More...
 
std::vector< Real > _scale_multiplier
 scale_multiplier parameter More...
 
std::vector< Real > _translation
 Translation. More...
 
RealVectorValue _rotation0_vector
 vector about which to rotate More...
 
Real _rotation0_angle
 angle (in degrees) which to rotate through about vector _rotation0_vector More...
 
RealTensorValue _r0
 Rotation matrix that performs the "_rotation0_angle about rotation0_vector". More...
 
RealVectorValue _rotation1_vector
 vector about which to rotate More...
 
Real _rotation1_angle
 angle (in degrees) which to rotate through about vector _rotation1_vector More...
 
RealTensorValue _r1
 Rotation matrix that performs the "_rotation1_angle about rotation1_vector". More...
 
MultiMooseEnum _transformation_order
 transformations (rotations, translation, scales) are performed in this order More...
 
bool _initialized
 True if initial_setup has executed. More...
 
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
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
const ExecFlagEnum_execute_enum
 Execute settings for this oejct. More...
 
const std::vector< ExecFlagType_exec_flags
 (DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. More...
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 The name of the object this interface is part of. More...
 
FEProblemBase_sc_fe_problem
 
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 Coupled vars whose values we provide. More...
 
std::map< std::string, VariableValue * > _default_value
 Will hold the default value for optional coupled scalar variables. More...
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 Vector of coupled variables. More...
 
bool _sc_is_implicit
 True if implicit value is required. More...
 
const InputParameters_coupleable_params
 Local InputParameters. More...
 
THREAD_ID _sc_tid
 Thread ID of the thread using this object. More...
 
const Real & _real_zero
 Scalar zero. More...
 
const VariableValue_scalar_zero
 Zero value of a scalar variable. More...
 
const Point & _point_zero
 Zero point. More...
 
const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 
const InputParameters_mi_params
 Parameters of the object with this interface. More...
 
const std::string _mi_name
 The name of the object that this interface belongs to. More...
 
Moose::MaterialDataType _material_data_type
 The type of data. More...
 
std::shared_ptr< MaterialData_material_data
 Pointer to the material data class that stores properties. More...
 
FEProblemBase_mi_feproblem
 Reference to the FEProblemBase class. More...
 
const THREAD_ID _mi_tid
 Current threaded it. More...
 
bool _stateful_allowed
 True by default. More...
 
bool _get_material_property_called
 Initialized to false. More...
 
std::vector< std::unique_ptr< MaterialProperty< Real > > > _default_real_properties
 Storage vector for MaterialProperty<Real> default objects. More...
 
std::vector< std::unique_ptr< ADMaterialPropertyObject< Real > > > _default_ad_real_properties
 Storage vector for ADMaterialPropertyObject<Real> default objects. More...
 
std::set< unsigned int > _material_property_dependencies
 The set of material properties (as given by their IDs) that this object depends on. More...
 
const InputParameters_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
 

Static Private Attributes

static Threads::spin_mutex _solution_user_object_mutex
 

Detailed Description

User object that reads an existing solution from an input file and uses it in the current simulation.

Definition at line 37 of file SolutionUserObject.h.

Constructor & Destructor Documentation

◆ SolutionUserObject()

SolutionUserObject::SolutionUserObject ( const InputParameters parameters)

Definition at line 105 of file SolutionUserObject.C.

107  _file_type(MooseEnum("xda=0 exodusII=1 xdr=2")),
108  _mesh_file(getParam<MeshFileName>("mesh")),
109  _es_file(getParam<FileName>("es")),
110  _system_name(getParam<std::string>("system")),
111  _system_variables(getParam<std::vector<std::string>>("system_variables")),
112  _exodus_time_index(-1),
113  _interpolate_times(false),
114  _system(nullptr),
115  _system2(nullptr),
116  _interpolation_time(0.0),
118  _exodus_times(nullptr),
119  _exodus_index1(-1),
120  _exodus_index2(-1),
121  _scale(getParam<std::vector<Real>>("scale")),
122  _scale_multiplier(getParam<std::vector<Real>>("scale_multiplier")),
123  _translation(getParam<std::vector<Real>>("translation")),
124  _rotation0_vector(getParam<RealVectorValue>("rotation0_vector")),
125  _rotation0_angle(getParam<Real>("rotation0_angle")),
126  _r0(RealTensorValue()),
127  _rotation1_vector(getParam<RealVectorValue>("rotation1_vector")),
128  _rotation1_angle(getParam<Real>("rotation1_angle")),
129  _r1(RealTensorValue()),
130  _transformation_order(getParam<MultiMooseEnum>("transformation_order")),
131  _initialized(false)
132 {
133  // form rotation matrices with the specified angles
134  Real halfPi = std::acos(0.0);
135  Real a;
136  Real b;
137 
138  a = std::cos(halfPi * -_rotation0_angle / 90);
139  b = std::sin(halfPi * -_rotation0_angle / 90);
140  // the following is an anticlockwise rotation about z
141  RealTensorValue rot0_z(a, -b, 0, b, a, 0, 0, 0, 1);
142  // form the rotation matrix that will take rotation0_vector to the z axis
143  RealTensorValue vec0_to_z = RotationMatrix::rotVecToZ(_rotation0_vector);
144  // _r0 is then: rotate points so vec0 lies along z; then rotate about angle0; then rotate points
145  // back
146  _r0 = vec0_to_z.transpose() * (rot0_z * vec0_to_z);
147 
148  a = std::cos(halfPi * -_rotation1_angle / 90);
149  b = std::sin(halfPi * -_rotation1_angle / 90);
150  // the following is an anticlockwise rotation about z
151  RealTensorValue rot1_z(a, -b, 0, b, a, 0, 0, 0, 1);
152  // form the rotation matrix that will take rotation1_vector to the z axis
153  RealTensorValue vec1_to_z = RotationMatrix::rotVecToZ(_rotation1_vector);
154  // _r1 is then: rotate points so vec1 lies along z; then rotate about angle1; then rotate points
155  // back
156  _r1 = vec1_to_z.transpose() * (rot1_z * vec1_to_z);
157 
158  if (isParamValid("timestep") && getParam<std::string>("timestep") == "-1")
159  mooseError("A \"timestep\" of -1 is no longer supported for interpolation. Instead simply "
160  "remove this parameter altogether for interpolation");
161 }
std::vector< Real > _scale_multiplier
scale_multiplier parameter
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
std::string _es_file
The XDA file that contians the EquationSystems data (xda only)
RealTensorValue rotVecToZ(RealVectorValue vec)
provides a rotation matrix that will rotate the vector vec to the z axis (the "2" direction) ...
RealVectorValue _rotation1_vector
vector about which to rotate
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::vector< Real > * _exodus_times
The times available in the ExodusII file.
RealVectorValue _rotation0_vector
vector about which to rotate
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:185
int _exodus_index1
Time index 1, used for interpolation.
int _exodus_time_index
Current ExodusII time index.
Real _rotation0_angle
angle (in degrees) which to rotate through about vector _rotation0_vector
RealTensorValue _r0
Rotation matrix that performs the "_rotation0_angle about rotation0_vector".
std::string _system_name
The system name to extract from the XDA file (xda only)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
RealTensorValue _r1
Rotation matrix that performs the "_rotation1_angle about rotation1_vector".
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32
Real _interpolation_time
Interpolation time.
System * _system2
Pointer to a second libMesh::System object, used for interpolation.
bool _initialized
True if initial_setup has executed.
MultiMooseEnum _transformation_order
transformations (rotations, translation, scales) are performed in this order
std::vector< Real > _scale
Scale parameter.
bool _interpolate_times
Flag for triggering interpolation of ExodusII data.
GeneralUserObject(const InputParameters &parameters)
Real _interpolation_factor
Interpolation weight factor.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:81
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)
int _exodus_index2
Time index 2, used for interpolation.
std::string _mesh_file
The XDA or ExodusII file that is being read.
System * _system
Pointer libMesh::System class storing the read solution.
Real _rotation1_angle
angle (in degrees) which to rotate through about vector _rotation1_vector
std::vector< Real > _translation
Translation.

◆ ~SolutionUserObject()

SolutionUserObject::~SolutionUserObject ( )
virtual

Definition at line 163 of file SolutionUserObject.C.

163 {}

Member Function Documentation

◆ addScalarVariableCoupleableMatrixTag()

void ScalarCoupleable::addScalarVariableCoupleableMatrixTag ( TagID  tag)
inlineinherited

Definition at line 59 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledMatrixTagScalarValue().

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

◆ addScalarVariableCoupleableVectorTag()

void ScalarCoupleable::addScalarVariableCoupleableVectorTag ( TagID  tag)
inlineinherited

Definition at line 57 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::coupledVectorTagScalarValue().

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

◆ checkMaterialProperty()

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

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

Definition at line 144 of file MaterialPropertyInterface.C.

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

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

◆ checkVar()

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

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

Parameters
var_nameThe name of the coupled variable

Definition at line 257 of file ScalarCoupleable.C.

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

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

◆ coupledMatrixTagScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 162 of file ScalarCoupleable.C.

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

◆ coupledScalar()

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

Returns the index for a scalar coupled variable by name.

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

Definition at line 105 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

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

◆ coupledScalarComponents()

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

Return the number of components to the coupled scalar variable.

Parameters
var_nameThe of the coupled variable

Definition at line 304 of file ScalarCoupleable.C.

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

◆ coupledScalarDot()

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

Returns the time derivative of a scalar coupled variable.

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

Definition at line 204 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDot()

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

Returns the second time derivative of a scalar coupled variable.

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

Definition at line 213 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDotDu()

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

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

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

Definition at line 248 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDotOld()

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

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

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

Definition at line 231 of file ScalarCoupleable.C.

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

◆ coupledScalarDotDu()

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

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

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

Definition at line 239 of file ScalarCoupleable.C.

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

◆ coupledScalarDotOld()

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

Returns the old time derivative of a scalar coupled variable.

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

Definition at line 222 of file ScalarCoupleable.C.

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

◆ coupledScalarOrder()

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

Returns the order for a scalar coupled variable by name.

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

Definition at line 112 of file ScalarCoupleable.C.

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

◆ coupledScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 136 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

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

◆ coupledScalarValueOld()

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

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

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

Definition at line 177 of file ScalarCoupleable.C.

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

◆ coupledScalarValueOlder()

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

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

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

Definition at line 189 of file ScalarCoupleable.C.

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

◆ coupledVectorTagScalarValue()

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

Returns value of a scalar coupled variable.

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

Definition at line 147 of file ScalarCoupleable.C.

150 {
151  checkVar(var_name);
152  if (!isCoupledScalar(var_name, comp))
153  return *getDefaultValue(var_name);
154 
156 
157  MooseVariableScalar * var = getScalarVar(var_name, comp);
158  return var->vectorTagSln(tag);
159 }
virtual bool isCoupledScalar(const std::string &var_name, unsigned int i=0)
Returns true if a variables has been coupled_as name.
void checkVar(const std::string &var_name)
Check that the right kind of variable is being coupled in.
VariableValue * getDefaultValue(const std::string &var_name)
Helper method to return (and insert if necessary) the default value for an uncoupled variable...
MooseVariableScalar * getScalarVar(const std::string &var_name, unsigned int comp)
Extract pointer to a scalar coupled variable.
void addScalarVariableCoupleableVectorTag(TagID tag)
Class for scalar variables (they are different).
VariableValue & vectorTagSln(TagID tag)

◆ cyclicDependencyError()

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

A helper method for cyclic errors.

Definition at line 95 of file DependencyResolverInterface.h.

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

◆ declareRecoverableData() [1/2]

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

Declare a piece of data as "recoverable".

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

Note - this data will NOT be restored on Restart!

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

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

Definition at line 269 of file Restartable.h.

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

◆ declareRecoverableData() [2/2]

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

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

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

Note - this data will NOT be restored on Restart!

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

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

Definition at line 280 of file Restartable.h.

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

◆ declareRestartableData() [1/2]

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 202 of file Restartable.h.

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

◆ declareRestartableData() [2/2]

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

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

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

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

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

Definition at line 209 of file Restartable.h.

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

◆ declareRestartableDataWithContext() [1/2]

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 216 of file Restartable.h.

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

◆ declareRestartableDataWithContext() [2/2]

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

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

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

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

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

Definition at line 229 of file Restartable.h.

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

◆ declareRestartableDataWithObjectName()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 245 of file Restartable.h.

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

◆ declareRestartableDataWithObjectNameWithContext()

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 252 of file Restartable.h.

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

◆ deducePropertyName()

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

◆ defaultADMaterialProperty() [1/2]

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

Definition at line 93 of file MaterialPropertyInterface.C.

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

◆ defaultADMaterialProperty() [2/2]

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

Helper function to parse default material property values.

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

Definition at line 378 of file MaterialPropertyInterface.h.

379 {
380  return NULL;
381 }

◆ defaultMaterialProperty() [1/2]

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

Helper function to parse default material property values.

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

Definition at line 370 of file MaterialPropertyInterface.h.

371 {
372  return NULL;
373 }

◆ defaultMaterialProperty() [2/2]

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

Definition at line 65 of file MaterialPropertyInterface.C.

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

◆ directValue() [1/3]

Real SolutionUserObject::directValue ( const Node *  node,
const std::string &  var_name 
) const

Return a value directly from a Node.

Parameters
nodeA pointer to the node at which a value is desired
var_nameThe variable from which to extract a value
Returns
The desired value for the given node and variable name

Definition at line 357 of file SolutionUserObject.C.

Referenced by SolutionAux::computeValue(), and directValue().

358 {
359  // Get the libmesh variable and system numbers
360  unsigned int var_num = _system->variable_number(var_name);
361  unsigned int sys_num = _system->number();
362 
363  // Get the node id and associated dof
364  dof_id_type node_id = node->id();
365  dof_id_type dof_id = _system->get_mesh().node_ref(node_id).dof_number(sys_num, var_num, 0);
366 
367  // Return the desired value for the dof
368  return directValue(dof_id);
369 }
Real directValue(const Node *node, const std::string &var_name) const
Return a value directly from a Node.
System * _system
Pointer libMesh::System class storing the read solution.

◆ directValue() [2/3]

Real SolutionUserObject::directValue ( const Elem *  elem,
const std::string &  var_name 
) const

Return a value from the centroid of an element.

Parameters
elemA pointer to the element at which a value is desired
var_nameThe variable from which to extract a value
Returns
The desired value for the given element and variable name

Definition at line 372 of file SolutionUserObject.C.

373 {
374  // Get the libmesh variable and system numbers
375  unsigned int var_num = _system->variable_number(var_name);
376  unsigned int sys_num = _system->number();
377 
378  // Get the element id and associated dof
379  dof_id_type elem_id = elem->id();
380  dof_id_type dof_id = _system->get_mesh().elem_ptr(elem_id)->dof_number(sys_num, var_num, 0);
381 
382  // Return the desired value
383  return directValue(dof_id);
384 }
Real directValue(const Node *node, const std::string &var_name) const
Return a value directly from a Node.
System * _system
Pointer libMesh::System class storing the read solution.

◆ directValue() [3/3]

Real SolutionUserObject::directValue ( dof_id_type  dof_index) const
protectedvirtual

Method for extracting value of solution based on the DOF, this is called by the public overloaded function that accept a node or element pointer.

Parameters
dof_indexThe DOF of the solution desired
Returns
The solution at the given DOF

Definition at line 953 of file SolutionUserObject.C.

954 {
955  Real val = (*_serialized_solution)(dof_index);
956  if (_file_type == 1 && _interpolate_times)
957  {
958  Real val2 = (*_serialized_solution2)(dof_index);
959  val = val + (val2 - val) * _interpolation_factor;
960  }
961  return val;
962 }
bool _interpolate_times
Flag for triggering interpolation of ExodusII data.
Real _interpolation_factor
Interpolation weight factor.
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)

◆ discontinuousPointValue() [1/2]

std::map<const Elem *, Real> SolutionUserObject::discontinuousPointValue ( Real  t,
Point  pt,
const unsigned int  local_var_index 
) const

Returns a value at a specific location and variable for cases where the solution is multivalued at element faces Use pointValue for continuous shape functions or if you are sure your point is within an element!

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
local_var_indexThe local index of the variable to be evaluated
Returns
The desired value for the given variable at a location

Referenced by discontinuousPointValue(), and pointValueWrapper().

◆ discontinuousPointValue() [2/2]

std::map< const Elem *, Real > SolutionUserObject::discontinuousPointValue ( Real  t,
const Point &  p,
const std::string &  var_name 
) const

Returns a value at a specific location and variable for cases where the solution is multivalued at element faces Use pointValue for continuous shape functions or if you are sure your point is within an element!

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
var_nameThe variable to be evaluated
Returns
The desired value for the given variable at a location

Definition at line 734 of file SolutionUserObject.C.

737 {
738  const unsigned int local_var_index = getLocalVarIndex(var_name);
739  return discontinuousPointValue(t, p, local_var_index);
740 }
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.
std::map< const Elem *, Real > discontinuousPointValue(Real t, Point pt, const unsigned int local_var_index) const
Returns a value at a specific location and variable for cases where the solution is multivalued at el...

◆ discontinuousPointValueGradient() [1/2]

std::map< const Elem *, RealGradient > SolutionUserObject::discontinuousPointValueGradient ( Real  t,
const Point &  p,
const std::string &  var_name 
) const

Returns the gradient at a specific location and variable for cases where the gradient is multivalued (e.g.

at element faces) Use pointValueGradient for continuous gradients or if you are sure your point is within an element!

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
var_nameThe variable to be evaluated
Returns
The desired value for the given variable at a location

Definition at line 891 of file SolutionUserObject.C.

Referenced by pointValueGradientWrapper().

894 {
895  const unsigned int local_var_index = getLocalVarIndex(var_name);
896  return discontinuousPointValueGradient(t, p, local_var_index);
897 }
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.
std::map< const Elem *, RealGradient > discontinuousPointValueGradient(Real t, const Point &p, const std::string &var_name) const
Returns the gradient at a specific location and variable for cases where the gradient is multivalued ...

◆ discontinuousPointValueGradient() [2/2]

std::map<const Elem *, RealGradient> SolutionUserObject::discontinuousPointValueGradient ( Real  t,
Point  pt,
const unsigned int  local_var_index 
) const

Returns the gradient at a specific location and variable for cases where the gradient is multivalued (e.g.

at element faces) Use pointValueGradient for continuous gradients or if you are sure your point is within an element!

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
local_var_indexThe local index of the variable to be evaluated
Returns
The desired value for the given variable at a location

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 91 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

◆ evalMeshFunction()

Real SolutionUserObject::evalMeshFunction ( const Point &  p,
const unsigned int  local_var_index,
unsigned int  func_num 
) const
protected

A wrapper method for calling the various MeshFunctions used for reading the data.

Parameters
pThe location at which data is desired
local_var_indexThe local index of the variable to extract data from
func_numThe MeshFunction index to use (1 = _mesh_function; 2 = _mesh_function2)

Definition at line 965 of file SolutionUserObject.C.

968 {
969  // Storage for mesh function output
970  DenseVector<Number> output;
971 
972  // Extract a value from the _mesh_function
973  {
974  Threads::spin_mutex::scoped_lock lock(_solution_user_object_mutex);
975  if (func_num == 1)
976  (*_mesh_function)(p, 0.0, output);
977 
978  // Extract a value from _mesh_function2
979  else if (func_num == 2)
980  (*_mesh_function2)(p, 0.0, output);
981 
982  else
983  mooseError("The func_num must be 1 or 2");
984  }
985 
986  // Error if the data is out-of-range, which will be the case if the mesh functions are evaluated
987  // outside the domain
988  if (output.size() == 0)
989  {
990  std::ostringstream oss;
991  p.print(oss);
992  mooseError("Failed to access the data for variable '",
993  _system_variables[local_var_index],
994  "' at point ",
995  oss.str(),
996  " in the '",
997  name(),
998  "' SolutionUserObject");
999  }
1000  return output(local_var_index);
1001 }
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
static Threads::spin_mutex _solution_user_object_mutex
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ evalMeshFunctionGradient()

RealGradient SolutionUserObject::evalMeshFunctionGradient ( const Point &  p,
const unsigned int  local_var_index,
unsigned int  func_num 
) const
protected

A wrapper method interfacing with the libMesh mesh function for evaluating the gradient.

Parameters
pThe location at which data is desired
local_var_indexThe local index of the variable to extract data from
func_numThe MeshFunction index to use (1 = _mesh_function; 2 = _mesh_function2)

Definition at line 1055 of file SolutionUserObject.C.

1058 {
1059  // Storage for mesh function output
1060  std::vector<Gradient> output;
1061 
1062  // Extract a value from the _mesh_function
1063  {
1064  Threads::spin_mutex::scoped_lock lock(_solution_user_object_mutex);
1065  if (func_num == 1)
1066  _mesh_function->gradient(p, 0.0, output, libmesh_nullptr);
1067 
1068  // Extract a value from _mesh_function2
1069  else if (func_num == 2)
1070  _mesh_function2->gradient(p, 0.0, output, libmesh_nullptr);
1071 
1072  else
1073  mooseError("The func_num must be 1 or 2");
1074  }
1075 
1076  // Error if the data is out-of-range, which will be the case if the mesh functions are evaluated
1077  // outside the domain
1078  if (output.size() == 0)
1079  {
1080  std::ostringstream oss;
1081  p.print(oss);
1082  mooseError("Failed to access the data for variable '",
1083  _system_variables[local_var_index],
1084  "' at point ",
1085  oss.str(),
1086  " in the '",
1087  name(),
1088  "' SolutionUserObject");
1089  }
1090  return output[local_var_index];
1091 }
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::unique_ptr< MeshFunction > _mesh_function2
Pointer to second libMesh::MeshFuntion, used for interpolation.
static Threads::spin_mutex _solution_user_object_mutex
std::unique_ptr< MeshFunction > _mesh_function
Pointer the libMesh::MeshFunction object that the read data is stored.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ evalMultiValuedMeshFunction()

std::map< const Elem *, Real > SolutionUserObject::evalMultiValuedMeshFunction ( const Point &  p,
const unsigned int  local_var_index,
unsigned int  func_num 
) const
protected

A wrapper method for calling the various MeshFunctions that calls the mesh function functionality for evaluating discontinuous shape functions near a face (where it's multivalued)

Parameters
pThe location at which data is desired
local_var_indexThe local index of the variable to extract data from
func_numThe MeshFunction index to use (1 = _mesh_function; 2 = _mesh_function2)

Definition at line 1004 of file SolutionUserObject.C.

1007 {
1008  // Storage for mesh function output
1009  std::map<const Elem *, DenseVector<Number>> temporary_output;
1010 
1011  // Extract a value from the _mesh_function
1012  {
1013  Threads::spin_mutex::scoped_lock lock(_solution_user_object_mutex);
1014  if (func_num == 1)
1015  _mesh_function->discontinuous_value(p, 0.0, temporary_output);
1016 
1017  // Extract a value from _mesh_function2
1018  else if (func_num == 2)
1019  _mesh_function2->discontinuous_value(p, 0.0, temporary_output);
1020 
1021  else
1022  mooseError("The func_num must be 1 or 2");
1023  }
1024 
1025  // Error if the data is out-of-range, which will be the case if the mesh functions are evaluated
1026  // outside the domain
1027  if (temporary_output.size() == 0)
1028  {
1029  std::ostringstream oss;
1030  p.print(oss);
1031  mooseError("Failed to access the data for variable '",
1032  _system_variables[local_var_index],
1033  "' at point ",
1034  oss.str(),
1035  " in the '",
1036  name(),
1037  "' SolutionUserObject");
1038  }
1039 
1040  // Fill the actual map that is returned
1041  std::map<const Elem *, Real> output;
1042  for (auto & k : temporary_output)
1043  {
1044  mooseAssert(k.second.size() > local_var_index,
1045  "In SolutionUserObject::evalMultiValuedMeshFunction variable with local_var_index "
1046  << local_var_index
1047  << " does not exist");
1048  output[k.first] = k.second(local_var_index);
1049  }
1050 
1051  return output;
1052 }
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::unique_ptr< MeshFunction > _mesh_function2
Pointer to second libMesh::MeshFuntion, used for interpolation.
static Threads::spin_mutex _solution_user_object_mutex
std::unique_ptr< MeshFunction > _mesh_function
Pointer the libMesh::MeshFunction object that the read data is stored.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ evalMultiValuedMeshFunctionGradient()

std::map< const Elem *, RealGradient > SolutionUserObject::evalMultiValuedMeshFunctionGradient ( const Point &  p,
const unsigned int  local_var_index,
unsigned int  func_num 
) const
protected

A wrapper method interfacing with the libMesh mesh function that calls the gradient functionality for evaluating potentially discontinuous gradients at element's faces (where it's multivalued)

Parameters
pThe location at which data is desired
local_var_indexThe local index of the variable to extract data from
func_numThe MeshFunction index to use (1 = _mesh_function; 2 = _mesh_function2)

Definition at line 1094 of file SolutionUserObject.C.

1097 {
1098  // Storage for mesh function output
1099  std::map<const Elem *, std::vector<Gradient>> temporary_output;
1100 
1101  // Extract a value from the _mesh_function
1102  {
1103  Threads::spin_mutex::scoped_lock lock(_solution_user_object_mutex);
1104  if (func_num == 1)
1105  _mesh_function->discontinuous_gradient(p, 0.0, temporary_output);
1106 
1107  // Extract a value from _mesh_function2
1108  else if (func_num == 2)
1109  _mesh_function2->discontinuous_gradient(p, 0.0, temporary_output);
1110 
1111  else
1112  mooseError("The func_num must be 1 or 2");
1113  }
1114 
1115  // Error if the data is out-of-range, which will be the case if the mesh functions are evaluated
1116  // outside the domain
1117  if (temporary_output.size() == 0)
1118  {
1119  std::ostringstream oss;
1120  p.print(oss);
1121  mooseError("Failed to access the data for variable '",
1122  _system_variables[local_var_index],
1123  "' at point ",
1124  oss.str(),
1125  " in the '",
1126  name(),
1127  "' SolutionUserObject");
1128  }
1129 
1130  // Fill the actual map that is returned
1131  std::map<const Elem *, RealGradient> output;
1132  for (auto & k : temporary_output)
1133  {
1134  mooseAssert(k.second.size() > local_var_index,
1135  "In SolutionUserObject::evalMultiValuedMeshFunction variable with local_var_index "
1136  << local_var_index
1137  << " does not exist");
1138  output[k.first] = k.second[local_var_index];
1139  }
1140 
1141  return output;
1142 }
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::unique_ptr< MeshFunction > _mesh_function2
Pointer to second libMesh::MeshFuntion, used for interpolation.
static Threads::spin_mutex _solution_user_object_mutex
std::unique_ptr< MeshFunction > _mesh_function
Pointer the libMesh::MeshFunction object that the read data is stored.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ execBitFlags()

ExecFlagType SetupInterface::execBitFlags ( ) const
inherited

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

Definition at line 85 of file SetupInterface.C.

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

◆ execFlags()

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

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

Reimplemented in MultiAppTransfer.

Definition at line 73 of file SetupInterface.C.

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

◆ execute()

void SolutionUserObject::execute ( )
overridevirtual

Execute method.

Implements UserObject.

Definition at line 405 of file SolutionUserObject.C.

406 {
407 }

◆ finalize()

void SolutionUserObject::finalize ( )
overridevirtual

Finalize.

This is called after execute() and after threadJoin()! This is probably where you want to do MPI communication!

Implements UserObject.

Definition at line 392 of file SolutionUserObject.C.

393 {
394 }

◆ gatherMax()

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

Definition at line 122 of file UserObject.h.

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

123  {
124  _communicator.max(value);
125  }

◆ gatherMin()

template<typename T >
void UserObject::gatherMin ( T &  value)
inlineinherited

Definition at line 128 of file UserObject.h.

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

129  {
130  _communicator.min(value);
131  }

◆ gatherProxyValueMax()

template<typename T1 , typename T2 >
void UserObject::gatherProxyValueMax ( T1 &  value,
T2 &  proxy 
)
inlineinherited

Definition at line 134 of file UserObject.h.

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

135  {
136  unsigned int rank;
137  _communicator.maxloc(value, rank);
138  _communicator.broadcast(proxy, rank);
139  }

◆ gatherSum()

template<typename T >
void UserObject::gatherSum ( T &  value)
inlineinherited

◆ getADMaterialProperty()

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

Definition at line 312 of file MaterialPropertyInterface.h.

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

◆ getADMaterialPropertyByName()

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

Definition at line 408 of file MaterialPropertyInterface.h.

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

◆ getBlockMaterialProperty()

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

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

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

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

Definition at line 464 of file MaterialPropertyInterface.h.

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

◆ getCheckedPointerParam()

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

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

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

Definition at line 72 of file MooseObject.h.

73  {
74  return parameters().getCheckedPointerParam<T>(name, error_string);
75  }
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getCoupledMooseScalarVars()

const std::vector< MooseVariableScalar * > & ScalarCoupleable::getCoupledMooseScalarVars ( )
inherited

Get the list of coupled scalar variables.

Returns
The list of coupled variables

Definition at line 77 of file ScalarCoupleable.C.

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

78 {
80 }
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
Vector of coupled variables.

◆ getDefaultPostprocessorValue()

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

Return the default postprocessor value.

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

Definition at line 86 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

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

◆ getDefaultValue()

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 122 of file ScalarCoupleable.C.

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

123 {
124  std::map<std::string, VariableValue *>::iterator default_value_it = _default_value.find(var_name);
125  if (default_value_it == _default_value.end())
126  {
129  default_value_it = _default_value.insert(std::make_pair(var_name, value)).first;
130  }
131 
132  return default_value_it->second;
133 }
FEProblemBase & _sc_fe_problem
const InputParameters & _coupleable_params
Local InputParameters.
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.
std::map< std::string, VariableValue * > _default_value
Will hold the default value for optional coupled scalar variables.
MooseArray< Real > VariableValue
Definition: MooseTypes.h:132
Order getMaxScalarOrder() const

◆ getDistribution()

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 29 of file DistributionInterface.C.

30 {
31  DistributionName dist_name = _dni_params.get<DistributionName>(name);
32  return _dni_feproblem.getDistribution(dist_name);
33 }
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.

◆ getDistributionByName()

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 36 of file DistributionInterface.C.

Referenced by RandomIC::RandomIC(), and Sampler::Sampler().

37 {
38  return _dni_feproblem.getDistribution(name);
39 }
virtual Distribution & getDistribution(const std::string &name)
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.

◆ getExecuteOnEnum()

const ExecFlagEnum & SetupInterface::getExecuteOnEnum ( ) const
inherited

Return the execute on MultiMooseEnum for this object.

Definition at line 67 of file SetupInterface.C.

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

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

◆ getExecuteOptions()

ExecFlagEnum SetupInterface::getExecuteOptions ( )
staticinherited

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

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

Definition at line 101 of file SetupInterface.C.

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

◆ getFunction()

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

Get a function with a given name.

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

Definition at line 30 of file FunctionInterface.C.

Referenced by FunctionDT::FunctionDT().

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

◆ getFunctionByName()

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

Get a function with a given name.

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

Definition at line 36 of file FunctionInterface.C.

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

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

◆ getLocalVarIndex()

unsigned int SolutionUserObject::getLocalVarIndex ( const std::string &  var_name) const

Returns the local index for a given variable name.

Parameters
var_nameThe name of the variable for which the index is located
Returns
The local index of the variable

Definition at line 610 of file SolutionUserObject.C.

Referenced by discontinuousPointValue(), discontinuousPointValueGradient(), Axisymmetric2D3DSolutionFunction::initialSetup(), SolutionFunction::initialSetup(), pointValue(), and pointValueGradient().

611 {
612  // Extract the variable index for the MeshFunction(s)
613  std::map<std::string, unsigned int>::const_iterator it = _local_variable_index.find(var_name);
614  if (it == _local_variable_index.end())
615  mooseError("Value requested for nonexistent variable '",
616  var_name,
617  "' in the '",
618  name(),
619  "' SolutionUserObject");
620  return it->second;
621 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::map< std::string, unsigned int > _local_variable_index
Stores the local index need by MeshFunction.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getMaterial()

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

Return a Material reference - usable for computing directly.

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

Definition at line 170 of file MaterialPropertyInterface.C.

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

◆ getMaterialByName()

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

Definition at line 176 of file MaterialPropertyInterface.C.

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

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

◆ getMaterialProperty()

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

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

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

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

Definition at line 297 of file MaterialPropertyInterface.h.

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

◆ getMaterialPropertyBlockNames()

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

Retrieve the block names that the material property is defined.

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

Definition at line 126 of file MaterialPropertyInterface.C.

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

◆ getMaterialPropertyBlocks()

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

Retrieve the block ids that the material property is defined.

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

Definition at line 120 of file MaterialPropertyInterface.C.

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

◆ getMaterialPropertyBoundaryIDs()

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

Retrieve the boundary ids that the material property is defined.

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

Definition at line 132 of file MaterialPropertyInterface.C.

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

◆ getMaterialPropertyBoundaryNames()

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

Retrieve the boundary namess that the material property is defined.

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

Definition at line 138 of file MaterialPropertyInterface.C.

139 {
141 }
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:353

◆ getMaterialPropertyByName()

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 390 of file MaterialPropertyInterface.h.

391 {
393  checkMaterialProperty(name);
394 
395  // mark property as requested
396  markMatPropRequested(name);
397 
398  // Update the boolean flag.
400 
401  _material_property_dependencies.insert(_material_data->getPropertyId(name));
402 
403  return _material_data->getProperty<T>(name);
404 }
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.

◆ getMaterialPropertyCalled()

bool MaterialPropertyInterface::getMaterialPropertyCalled ( ) const
inlineinherited

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

Definition at line 174 of file MaterialPropertyInterface.h.

bool _get_material_property_called
Initialized to false.

◆ getMaterialPropertyOld()

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

Definition at line 327 of file MaterialPropertyInterface.h.

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

◆ getMaterialPropertyOldByName()

template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyOldByName ( const MaterialPropertyName &  name)
inherited

Definition at line 428 of file MaterialPropertyInterface.h.

429 {
430  if (!_stateful_allowed)
431  mooseError("Stateful material properties not allowed for this object."
432  " Old property for \"",
433  name,
434  "\" was requested.");
435 
436  // mark property as requested
437  markMatPropRequested(name);
438 
439  _material_property_dependencies.insert(_material_data->getPropertyId(name));
440 
441  return _material_data->getPropertyOld<T>(name);
442 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
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.

◆ getMaterialPropertyOlder()

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

Definition at line 348 of file MaterialPropertyInterface.h.

349 {
350  if (!_stateful_allowed)
351  mooseError("Stateful material properties not allowed for this object."
352  " Older property for \"",
353  name,
354  "\" was requested.");
355 
356  // Check if the supplied parameter is a valid input parameter key
357  std::string prop_name = deducePropertyName(name);
358 
359  // Check if it's just a constant
360  const MaterialProperty<T> * default_property = defaultMaterialProperty<T>(prop_name);
361  if (default_property)
362  return *default_property;
363 
364  return getMaterialPropertyOlderByName<T>(prop_name);
365 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
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.

◆ getMaterialPropertyOlderByName()

template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyOlderByName ( const MaterialPropertyName &  name)
inherited

Definition at line 446 of file MaterialPropertyInterface.h.

447 {
448  if (!_stateful_allowed)
449  mooseError("Stateful material properties not allowed for this object."
450  " Older property for \"",
451  name,
452  "\" was requested.");
453 
454  // mark property as requested
455  markMatPropRequested(name);
456 
457  _material_property_dependencies.insert(_material_data->getPropertyId(name));
458 
459  return _material_data->getPropertyOlder<T>(name);
460 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
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.

◆ getMatPropDependencies()

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 182 of file MaterialPropertyInterface.h.

Referenced by NodalPatchRecovery::reinitPatch().

183  {
185  }
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.

◆ getMeshFileDimension()

unsigned int SolutionUserObject::getMeshFileDimension ( ) const
inline

Return the spatial dimension of the mesh file.

Returns
The spatial dimension of the mesh file

Definition at line 223 of file SolutionUserObject.h.

223 { return _mesh->spatial_dimension(); }
std::unique_ptr< MeshBase > _mesh
Pointer the libmesh::mesh object.

◆ getMooseApp()

MooseApp& MooseObject::getMooseApp ( ) const
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 86 of file MooseObject.h.

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

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

◆ getParam()

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

Retrieve a parameter for the object.

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

Definition at line 185 of file MooseObject.h.

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

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

◆ getPostprocessorValue()

const PostprocessorValue & GeneralUserObject::getPostprocessorValue ( const std::string &  name)
virtualinherited

Store dependency among same object types for proper execution order.

Definition at line 49 of file GeneralUserObject.C.

50 {
51  _depend_vars.insert(_pars.get<PostprocessorName>(name));
53 }
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:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getPostprocessorValueByName()

const PostprocessorValue & GeneralUserObject::getPostprocessorValueByName ( const PostprocessorName &  name)
virtualinherited

Definition at line 56 of file GeneralUserObject.C.

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

57 {
58  _depend_vars.insert(name);
60 }
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name)
Retrieve the value of the Postprocessor.
std::set< std::string > _depend_vars
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getPostprocessorValueOld()

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

Definition at line 34 of file PostprocessorInterface.C.

35 {
36  // Return the default if the Postprocessor does not exist and a default does, otherwise
37  // continue as usual
40  else
41  return _pi_feproblem.getPostprocessorValueOld(_ppi_params.get<PostprocessorName>(name));
42 }
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
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 InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.

◆ getPostprocessorValueOldByName()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOldByName ( const PostprocessorName &  name)
inherited

Definition at line 62 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

63 {
65 }
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.

◆ getPostprocessorValueOlder()

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

Definition at line 45 of file PostprocessorInterface.C.

46 {
47  // Return the default if the Postprocessor does not exist and a default does, otherwise
48  // continue as usual
51  else
52  return _pi_feproblem.getPostprocessorValueOlder(_ppi_params.get<PostprocessorName>(name));
53 }
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
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 InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.

◆ getPostprocessorValueOlderByName()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlderByName ( const PostprocessorName &  name)
inherited

Definition at line 68 of file PostprocessorInterface.C.

69 {
71 }
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.

◆ getRequestedItems()

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 37 of file GeneralUserObject.C.

38 {
39  return _depend_vars;
40 }
std::set< std::string > _depend_vars

◆ getScalarVar()

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 276 of file ScalarCoupleable.C.

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

277 {
278  if (_coupled_scalar_vars.find(var_name) != _coupled_scalar_vars.end())
279  {
280  if (comp < _coupled_scalar_vars[var_name].size())
281  return _coupled_scalar_vars[var_name][comp];
282  else
283  mooseError(_sc_name, "Trying to get a non-existent component of variable '", var_name, "'");
284  }
285  else
286  mooseError(_sc_name, "Trying to get a non-existent variable '", var_name, "'");
287 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
const std::string & _sc_name
The name of the object this interface is part of.
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.

◆ getScalarVariableCoupleableMatrixTags()

std::set<TagID>& ScalarCoupleable::getScalarVariableCoupleableMatrixTags ( )
inlineinherited

Definition at line 55 of file ScalarCoupleable.h.

std::set< TagID > _sc_coupleable_matrix_tags

◆ getScalarVariableCoupleableVectorTags()

std::set<TagID>& ScalarCoupleable::getScalarVariableCoupleableVectorTags ( )
inlineinherited

Definition at line 53 of file ScalarCoupleable.h.

std::set< TagID > _sc_coupleable_vector_tags

◆ getScatterVectorPostprocessorValue()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValue ( const std::string &  name,
const std::string &  vector_name 
)
virtualinherited

Return the scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
nameThe name of the parameter holding the vpp name
vector_nameThe name of the vector
Returns
The reference to the current scatter value

Reimplemented in AuxKernel.

Definition at line 92 of file VectorPostprocessorInterface.C.

Referenced by AuxKernel::getScatterVectorPostprocessorValue().

94 {
96  _vpi_params.get<VectorPostprocessorName>(name), vector_name);
97 }
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValue(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.

◆ getScatterVectorPostprocessorValueByName()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueByName ( const std::string &  name,
const std::string &  vector_name 
)
virtualinherited

Return the scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
vpp_nameThe name of the VectorPostprocessor
vector_nameThe name of the vector
Returns
The reference to the current scatter value

Reimplemented in AuxKernel.

Definition at line 100 of file VectorPostprocessorInterface.C.

Referenced by AuxKernel::getScatterVectorPostprocessorValueByName().

102 {
103  return _vpi_feproblem.getScatterVectorPostprocessorValue(name, vector_name);
104 }
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValue(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.

◆ getScatterVectorPostprocessorValueOld()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueOld ( const std::string &  name,
const std::string &  vector_name 
)
virtualinherited

Return the old scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
nameThe name of the parameter holding the vpp name
vector_nameThe name of the vector
Returns
The reference to the old scatter value

Definition at line 107 of file VectorPostprocessorInterface.C.

109 {
111  _vpi_params.get<VectorPostprocessorName>(name), vector_name);
112 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOld(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.

◆ getScatterVectorPostprocessorValueOldByName()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueOldByName ( const std::string &  name,
const std::string &  vector_name 
)
virtualinherited

Return the old scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
vpp_nameThe name of the VectorPostprocessor
vector_nameThe name of the vector
Returns
The reference to the old scatter value

Definition at line 115 of file VectorPostprocessorInterface.C.

117 {
118  return _vpi_feproblem.getScatterVectorPostprocessorValueOld(name, vector_name);
119 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOld(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.

◆ getSolutionFileType()

MooseEnum SolutionUserObject::getSolutionFileType ( )
protected

Get the type of file that was read.

Returns
Returns a MooseEnum that specifies the type of file read

Definition at line 520 of file SolutionUserObject.C.

521 {
522  return _file_type;
523 }
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)

◆ getSubProblem()

SubProblem& UserObject::getSubProblem ( ) const
inlineinherited

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

Definition at line 83 of file UserObject.h.

83 { return _subproblem; }
SubProblem & _subproblem
Reference to the Subproblem for this user object.
Definition: UserObject.h:151

◆ getSuppliedItems()

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 43 of file GeneralUserObject.C.

44 {
45  return _supplied_vars;
46 }
std::set< std::string > _supplied_vars

◆ getUserObject()

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 81 of file UserObjectInterface.h.

82 {
83  unsigned int tid = needThreadedCopy(getUserObjectBase(name)) ? _uoi_tid : 0;
84  return _uoi_feproblem.getUserObject<T>(_uoi_params.get<UserObjectName>(name), tid);
85 }
T & getUserObject(const std::string &name, unsigned int tid=0) const
Get the user object by its name.
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 UserObject & getUserObjectBase(const std::string &name)
Get an user object with a given parameter name.
bool needThreadedCopy(const UserObject &uo) const
Check if the threaded copy of the user object is needed.

◆ getUserObjectBase()

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 24 of file UserObjectInterface.C.

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

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

◆ getUserObjectBaseByName()

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

Get an user object with a given name.

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

Definition at line 30 of file UserObjectInterface.C.

Referenced by UserObjectInterface::getUserObjectByName().

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

◆ getUserObjectByName()

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

Get an user object with a given name.

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

Definition at line 89 of file UserObjectInterface.h.

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

◆ getVectorPostprocessorValue() [1/2]

const VectorPostprocessorValue & GeneralUserObject::getVectorPostprocessorValue ( const std::string &  name,
const std::string &  vector_name 
)
overridevirtualinherited

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

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 63 of file GeneralUserObject.C.

65 {
66  _depend_vars.insert(_pars.get<VectorPostprocessorName>(name));
68 }
std::set< std::string > _depend_vars
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
virtual const VectorPostprocessorValue & getVectorPostprocessorValue(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getVectorPostprocessorValue() [2/2]

const VectorPostprocessorValue & GeneralUserObject::getVectorPostprocessorValue ( const std::string &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
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.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
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 79 of file GeneralUserObject.C.

82 {
83  _depend_vars.insert(_pars.get<VectorPostprocessorName>(name));
85  name, vector_name, use_broadcast);
86 }
std::set< std::string > _depend_vars
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
virtual const VectorPostprocessorValue & getVectorPostprocessorValue(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getVectorPostprocessorValueByName() [1/2]

const VectorPostprocessorValue & GeneralUserObject::getVectorPostprocessorValueByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name 
)
overridevirtualinherited

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

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 71 of file GeneralUserObject.C.

73 {
74  _depend_vars.insert(name);
76 }
virtual const VectorPostprocessorValue & getVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...
std::set< std::string > _depend_vars
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getVectorPostprocessorValueByName() [2/2]

const VectorPostprocessorValue & GeneralUserObject::getVectorPostprocessorValueByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
overridevirtualinherited

Retrieve the value of the VectorPostprocessor.

Parameters
nameVectorPostprocessor name (see below)
vector_nameThe name of the particular vector you want.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
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 89 of file GeneralUserObject.C.

92 {
93  _depend_vars.insert(name);
95  name, vector_name, use_broadcast);
96 }
virtual const VectorPostprocessorValue & getVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...
std::set< std::string > _depend_vars
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getVectorPostprocessorValueOld() [1/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOld ( const std::string &  name,
const std::string &  vector_name 
)
inherited

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

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 40 of file VectorPostprocessorInterface.C.

42 {
44  _vpi_params.get<VectorPostprocessorName>(name), vector_name, _broadcast_by_default);
45 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueOld() [2/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOld ( const std::string &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
virtualinherited

Retrieve the old value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor parameter
vector_nameThe name of the particular vector you want.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
Returns
The value of the VectorPostprocessor

see getVectorPostprocessorValue

Definition at line 73 of file VectorPostprocessorInterface.C.

76 {
78  _vpi_params.get<VectorPostprocessorName>(name),
79  vector_name,
80  needs_broadcast || _broadcast_by_default);
81 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueOldByName() [1/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOldByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name 
)
inherited

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

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 48 of file VectorPostprocessorInterface.C.

50 {
52 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueOldByName() [2/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOldByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
virtualinherited

Retrieve the old value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor
vector_nameThe name of the particular vector you want.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
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 84 of file VectorPostprocessorInterface.C.

86 {
88  name, vector_name, needs_broadcast || _broadcast_by_default);
89 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getZeroMaterialProperty()

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 497 of file MaterialPropertyInterface.h.

498 {
499  // static zero property storage
500  static MaterialProperty<T> zero;
501 
502  // resize to accomodate maximum number of qpoints
503  // (in multiapp scenarios getMaxQps can return different values in each app; we need the max)
504  unsigned int nqp = _mi_feproblem.getMaxQps();
505  if (nqp > zero.size())
506  zero.resize(nqp);
507 
508  // set values for all qpoints to zero
509  for (unsigned int qp = 0; qp < nqp; ++qp)
510  mooseSetToZero<T>(zero[qp]);
511 
512  return zero;
513 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual void resize(int n) override
Resizes the property to the size n.
Concrete definition of a parameter value for a specified type.
virtual unsigned int size() const override
unsigned int getMaxQps() const

◆ hasMaterialProperty()

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 481 of file MaterialPropertyInterface.h.

482 {
483  // Check if the supplied parameter is a valid input parameter key
484  std::string prop_name = deducePropertyName(name);
485  return _material_data->haveProperty<T>(prop_name);
486 }
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.

◆ hasMaterialPropertyByName()

template<typename T >
bool MaterialPropertyInterface::hasMaterialPropertyByName ( const std::string &  name)
inherited

Definition at line 490 of file MaterialPropertyInterface.h.

491 {
492  return _material_data->haveProperty<T>(name);
493 }
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.

◆ hasPostprocessor()

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 74 of file PostprocessorInterface.C.

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

75 {
76  return _pi_feproblem.hasPostprocessor(_ppi_params.get<PostprocessorName>(name));
77 }
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.

◆ hasPostprocessorByName()

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 80 of file PostprocessorInterface.C.

Referenced by VectorOfPostprocessors::VectorOfPostprocessors().

81 {
82  return _pi_feproblem.hasPostprocessor(name);
83 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasPostprocessor(const std::string &name)
Check existence of the postprocessor.

◆ hasVectorPostprocessor()

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 122 of file VectorPostprocessorInterface.C.

123 {
124  return _vpi_feproblem.hasVectorPostprocessor(_vpi_params.get<VectorPostprocessorName>(name));
125 }
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.

◆ hasVectorPostprocessorByName()

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 128 of file VectorPostprocessorInterface.C.

130 {
132 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool hasVectorPostprocessor(const std::string &name)
Check existence of the VectorPostprocessor.

◆ initialize()

void SolutionUserObject::initialize ( )
overridevirtual

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

Implements UserObject.

Definition at line 387 of file SolutionUserObject.C.

388 {
389 }

◆ initialSetup()

void SolutionUserObject::initialSetup ( )
overridevirtual

Initialize the System and Mesh objects for the solution being read.

Reimplemented from SetupInterface.

Definition at line 410 of file SolutionUserObject.C.

411 {
412 
413  // Make sure this only happens once
414  if (_initialized)
415  return;
416 
417  // Create a libmesh::Mesh object for storing the loaded data.
418  // Several aspects of SolutionUserObject won't work with a DistributedMesh:
419  // .) ExodusII_IO::copy_nodal_solution() doesn't work in parallel.
420  // .) We don't know if directValue will be used, which may request
421  // a value on a Node we don't have.
422  // We force the Mesh used here to be a ReplicatedMesh.
423  _mesh = libmesh_make_unique<ReplicatedMesh>(_communicator);
424 
425  // ExodusII mesh file supplied
426  if (MooseUtils::hasExtension(_mesh_file, "e", /*strip_exodus_ext =*/true))
427  {
428  _file_type = "exodusII";
429  readExodusII();
430  }
431 
432  // XDA mesh file supplied
433  else if (MooseUtils::hasExtension(_mesh_file, "xda"))
434  {
435  _file_type = "xda";
436  readXda();
437  }
438 
439  else if (MooseUtils::hasExtension(_mesh_file, "xdr"))
440  {
441  _file_type = "xdr";
442  readXda();
443  }
444 
445  // Produce an error for an unknown file type
446  else
447  mooseError("In SolutionUserObject, invalid file type (only .xda, .xdr, and .e supported)");
448 
449  // Intilize the serial solution vector
450  _serialized_solution = NumericVector<Number>::build(_communicator);
451  _serialized_solution->init(_system->n_dofs(), false, SERIAL);
452 
453  // Pull down a full copy of this vector on every processor so we can get values in parallel
454  _system->solution->localize(*_serialized_solution);
455 
456  // Vector of variable numbers to apply the MeshFunction to
457  std::vector<unsigned int> var_nums;
458 
459  // If no variables were given, use all of them
460  if (_system_variables.empty())
461  {
462  _system->get_all_variable_numbers(var_nums);
463  for (const auto & var_num : var_nums)
464  _system_variables.push_back(_system->variable_name(var_num));
465  }
466 
467  // Otherwise, gather the numbers for the variables given
468  else
469  {
470  for (const auto & var_name : _system_variables)
471  var_nums.push_back(_system->variable_number(var_name));
472  }
473 
474  // Create the MeshFunction for working with the solution data
475  _mesh_function = libmesh_make_unique<MeshFunction>(
476  *_es, *_serialized_solution, _system->get_dof_map(), var_nums);
477  _mesh_function->init();
478 
479  // Tell the MeshFunctions that we might be querying them outside the
480  // mesh, so we can handle any errors at the MOOSE rather than at the
481  // libMesh level.
482  DenseVector<Number> default_values;
483  _mesh_function->enable_out_of_mesh_mode(default_values);
484 
485  // Build second MeshFunction for interpolation
486  if (_interpolate_times)
487  {
488  // Need to pull down a full copy of this vector on every processor so we can get values in
489  // parallel
490  _serialized_solution2 = NumericVector<Number>::build(_communicator);
491  _serialized_solution2->init(_system2->n_dofs(), false, SERIAL);
492  _system2->solution->localize(*_serialized_solution2);
493 
494  // Create the MeshFunction for the second copy of the data
495  _mesh_function2 = libmesh_make_unique<MeshFunction>(
496  *_es2, *_serialized_solution2, _system2->get_dof_map(), var_nums);
497  _mesh_function2->init();
498  _mesh_function2->enable_out_of_mesh_mode(default_values);
499  }
500 
501  // Populate the data maps that indicate if the variable is nodal and the MeshFunction variable
502  // index
503  for (unsigned int i = 0; i < _system_variables.size(); ++i)
504  {
505  std::string name = _system_variables[i];
506  FEType type = _system->variable_type(name);
507  if (type.order == CONSTANT)
508  _local_variable_nodal[name] = false;
509  else
510  _local_variable_nodal[name] = true;
511 
513  }
514 
515  // Set initialization flag
516  _initialized = true;
517 }
void readXda()
Method for reading XDA mesh and equation systems file(s) This method is called by the constructor whe...
std::unique_ptr< NumericVector< Number > > _serialized_solution
Pointer to the serial solution vector.
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
std::unique_ptr< EquationSystems > _es
Pointer to the libmesh::EquationSystems object.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
void readExodusII()
Method for reading an ExodusII file, which is called when &#39;file_type = exodusII is set in the input f...
std::unique_ptr< NumericVector< Number > > _serialized_solution2
Pointer to second serial solution, used for interpolation.
bool hasExtension(const std::string &filename, std::string ext, bool strip_exodus_ext=false)
Function tests if the supplied filename as the desired extension.
Definition: MooseUtils.C:253
std::unique_ptr< MeshFunction > _mesh_function2
Pointer to second libMesh::MeshFuntion, used for interpolation.
System * _system2
Pointer to a second libMesh::System object, used for interpolation.
std::map< std::string, unsigned int > _local_variable_index
Stores the local index need by MeshFunction.
bool _initialized
True if initial_setup has executed.
std::unique_ptr< MeshFunction > _mesh_function
Pointer the libMesh::MeshFunction object that the read data is stored.
bool _interpolate_times
Flag for triggering interpolation of ExodusII data.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
std::unique_ptr< EquationSystems > _es2
Pointer to second libMesh::EquationSystems object, used for interpolation.
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)
std::map< std::string, bool > _local_variable_nodal
Stores flag indicating if the variable is nodal.
std::string _mesh_file
The XDA or ExodusII file that is being read.
System * _system
Pointer libMesh::System class storing the read solution.
std::unique_ptr< MeshBase > _mesh
Pointer the libmesh::mesh object.

◆ isCoupledScalar()

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 83 of file ScalarCoupleable.C.

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

84 {
85  std::map<std::string, std::vector<MooseVariableScalar *>>::iterator it =
86  _coupled_scalar_vars.find(var_name);
87  if (it != _coupled_scalar_vars.end())
88  return (i < it->second.size());
89  else
90  {
91  // Make sure the user originally requested this value in the InputParameter syntax
92  if (!_coupleable_params.hasCoupledValue(var_name))
94  "The coupled scalar variable \"",
95  var_name,
96  "\" was never added to this objects's "
97  "InputParameters, please double-check "
98  "your spelling");
99 
100  return false;
101  }
102 }
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:208
const std::string & _sc_name
The name of the object this interface is part of.
const InputParameters & _coupleable_params
Local InputParameters.
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
Coupled vars whose values we provide.

◆ isImplicit()

bool TransientInterface::isImplicit ( )
inlineinherited

Definition at line 36 of file TransientInterface.h.

36 { return _is_implicit; }
bool _is_implicit
If the object is using implicit or explicit form.

◆ isParamValid()

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 81 of file MooseObject.h.

Referenced by AdvancedOutput::AdvancedOutput(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), Exodus::Exodus(), FEProblemBase::FEProblemBase(), FileOutput::FileOutput(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), RenameBoundaryGenerator::generate(), ElementSubdomainIDGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ExtraNodesetGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MeshSideSetGenerator::generate(), RenameBlockGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), MeshExtruderGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), PatternedMeshGenerator::generate(), MultiAppNearestNodeTransfer::getLocalEntities(), MeshGenerator::getMesh(), 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(), LowerDBlockFromSideset::modify(), AssignElementSubdomainID::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), EigenExecutionerBase::normalizeSolution(), Output::Output(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), readExodusII(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), SolutionUserObject(), and TimePeriod::TimePeriod().

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

◆ isVariableNodal()

bool SolutionUserObject::isVariableNodal ( const std::string &  var_name) const

Definition at line 1151 of file SolutionUserObject.C.

Referenced by SolutionAux::initialSetup().

1152 {
1153  // Use iterator method, [] is not marked const
1154  std::map<std::string, bool>::const_iterator it = _local_variable_nodal.find(var_name);
1155  return it->second;
1156 }
std::map< std::string, bool > _local_variable_nodal
Stores flag indicating if the variable is nodal.

◆ jacobianSetup()

void SetupInterface::jacobianSetup ( )
virtualinherited

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

Reimplemented in EqualValueEmbeddedConstraint.

Definition at line 52 of file SetupInterface.C.

53 {
54 }

◆ load()

void UserObject::load ( std::ifstream &  stream)
virtualinherited

Load user data object from a stream.

Parameters
streamStream to load from

Definition at line 69 of file UserObject.C.

70 {
71 }

◆ markMatPropRequested()

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

A proxy method for _mi_feproblem.markMatPropRequested(name)

Definition at line 158 of file MaterialPropertyInterface.C.

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

159 {
161 }
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:535

◆ meshChanged()

virtual void MeshChangedInterface::meshChanged ( )
inlinevirtualinherited

Called on this object when the mesh changes.

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

Definition at line 38 of file MeshChangedInterface.h.

38 {}

◆ mooseDeprecated()

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

◆ mooseError()

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

Definition at line 140 of file MooseObject.h.

Referenced by PetscExternalPartitioner::_do_partition(), GridPartitioner::_do_partition(), FEProblemBase::addConstraint(), FEProblemBase::addInitialCondition(), FEProblem::addLineSearch(), FEProblemBase::addLineSearch(), FEProblemBase::addOutput(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AllSideSetsByNormalsGenerator::AllSideSetsByNormalsGenerator(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), FileMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), MooseMesh::buildSideList(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), SubProblem::checkBoundaryMatProps(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), BreakMeshByBlockBase::checkInputParameter(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), ActuallyExplicitEuler::checkLinearConvergence(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), MooseMesh::clone(), ComparisonPostprocessor::comparisonIsTrue(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), NodalPatchRecovery::compute(), InterfaceKernel::computeElemNeighJacobian(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), HistogramVectorPostprocessor::computeHistogram(), EqualValueEmbeddedConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualType(), StatisticsVectorPostprocessor::computeStatValue(), Material::computeSubdomainProperties(), BDF2::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), ActuallyExplicitEuler::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), AStableDirk4::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), TimeStepper::constrainStep(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), CoupledForce::CoupledForce(), DebugResidualAux::DebugResidualAux(), BicubicSplineFunction::derivative(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernel::DGKernel(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementQualityAux::ElementQualityAux(), MooseMesh::errorIfDistributedMesh(), evalMeshFunction(), evalMeshFunctionGradient(), evalMultiValuedMeshFunction(), evalMultiValuedMeshFunctionGradient(), PerflogDumper::execute(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementQualityChecker::execute(), NodalValueSampler::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), FindValueOnLine::execute(), TimeExtremeValue::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFit::execute(), LeastSquaresFitHistory::execute(), FEProblemBase::executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), FileOutput::FileOutput(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), BreakMeshByBlockBase::findFreeBoundaryId(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase::FunctionMaterialBase(), ParsedMaterialHelper::functionParse(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), ExtraNodesetGenerator::generate(), ElementSubdomainIDGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), StitchedMeshGenerator::generate(), GeneratedMeshGenerator::generate(), MeshExtruderGenerator::generate(), SpiralAnnularMeshGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), PatternedMeshGenerator::generate(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), RandomICBase::generateRandom(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), Control::getControllableParameterByName(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), ElementGenerator::getElemType(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), getLocalVarIndex(), AuxKernel::getMaterialProperty(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), DistributedGeneratedMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), AnnularMesh::getMinInDimension(), DistributedGeneratedMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), PerformanceData::getValue(), Residual::getValue(), PerfGraphData::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), FEProblemBase::getVectorVariable(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), Transient::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), PiecewiseBase::initialSetup(), FullSolveMultiApp::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), InterfaceKernel::InterfaceKernel(), InterfaceTimeKernel::InterfaceTimeKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshSideSetGenerator::MeshSideSetGenerator(), SideSetsFromNormals::modify(), SideSetsFromPoints::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), BreakMeshByBlockBase::modify(), SmoothMesh::modify(), AssignElementSubdomainID::modify(), ElementDeleterBase::modify(), AddAllSideSetsByNormals::modify(), RenameBlock::modify(), ParsedSubdomainMeshModifier::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), RenameBlockGenerator::newBlockID(), RenameBlock::newBlockID(), RenameBlockGenerator::newBlockName(), RenameBlock::newBlockName(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), NodalScalarKernel::NodalScalarKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), ElementSideNeighborLayers::operator()(), ElementPointNeighbors::operator()(), RelationshipManager::operator==(), XDA::output(), SolutionHistory::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), Exodus::outputSetup(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::paramError(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PatternedMesh::PatternedMesh(), PetscExternalPartitioner::PetscExternalPartitioner(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), pointValueGradientWrapper(), pointValueWrapper(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), AStableDirk4::postResidual(), LStableDirk4::postResidual(), ExplicitRK2::postResidual(), Predictor::Predictor(), readExodusII(), readXda(), EqualValueEmbeddedConstraint::reinitConstraint(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), PiecewiseBase::setData(), EigenProblem::setEigenproblemType(), Sampler::setNumberOfRequiedRandomSeeds(), Exodus::setOutputDimension(), Split::setup(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPoints::SideSetsFromPoints(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObject(), ActuallyExplicitEuler::solve(), FullSolveMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), Console::systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), TiledMeshGenerator::TiledMeshGenerator(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), Transient::Transient(), TransientMultiApp::TransientMultiApp(), FEProblemBase::uDotDotOldRequested(), FEProblemBase::uDotOldRequested(), EqualValueBoundaryConstraint::updateConstrainedNodes(), updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorNodalBC::VectorNodalBC(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), VolumeHistogram::VolumeHistogram(), VTKOutput::VTKOutput(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

141  {
142  std::ostringstream oss;
143  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
144  std::string msg = oss.str();
145  callMooseErrorRaw(msg, &_app);
146  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:87
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:57
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ mooseInfo()

template<typename... Args>
void MooseObject::mooseInfo ( Args &&...  args) const
inlineinherited

◆ mooseWarning()

template<typename... Args>
void MooseObject::mooseWarning ( Args &&...  args) const
inlineinherited

◆ name()

const std::string& MooseObject::name ( ) const
inlineinherited

Get the name of the object.

Returns
The name of the object

Definition at line 51 of file MooseObject.h.

Referenced by GridPartitioner::_do_partition(), FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), Executioner::addAttributeReporter(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AllSideSetsByNormalsGenerator::AllSideSetsByNormalsGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), AStableDirk4::AStableDirk4(), Function::average(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), VectorPostprocessorVisualizationAux::computeValue(), AuxKernel::coupledCallback(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), MultiApp::createApp(), FEProblemBase::declareVectorPostprocessorVector(), DOFMapOutput::demangle(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernel::DGKernel(), DumpObjectsProblem::dumpObjectHelper(), ElementValueSampler::ElementValueSampler(), MooseMesh::errorIfDistributedMesh(), AB2PredictorCorrector::estimateTimeError(), evalMeshFunction(), evalMeshFunctionGradient(), evalMultiValuedMeshFunction(), evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), StatisticsVectorPostprocessor::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), HistogramVectorPostprocessor::execute(), MultiAppCopyTransfer::execute(), Exodus::Exodus(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), DerivativeParsedMaterialHelper::findMatPropDerivative(), FunctionDT::FunctionDT(), GeneralUserObject::GeneralUserObject(), LowerDBlockFromSidesetGenerator::generate(), StitchedMeshGenerator::generate(), Material::getADMaterialProperty(), MultiApp::getBoundingBox(), MooseObject::getCheckedPointerParam(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getDistribution(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), getLocalVarIndex(), Marker::getMarkerValue(), FEProblemBase::getMaterial(), NodalPatchRecovery::getMaterialProperty(), AuxKernel::getMaterialProperty(), Material::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), AuxKernel::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MeshGenerator::getMesh(), MooseMesh::getMortarInterfaceByName(), OutputWarehouse::getOutput(), MooseObject::getParam(), GeneralUserObject::getPostprocessorValue(), AuxKernel::getPostprocessorValue(), FEProblemBase::getPostprocessorValue(), GeneralUserObject::getPostprocessorValueByName(), AuxKernel::getPostprocessorValueByName(), FEProblemBase::getPostprocessorValueOld(), FEProblemBase::getPostprocessorValueOlder(), FEProblemBase::getSampler(), AuxKernel::getScatterVectorPostprocessorValue(), FEProblemBase::getScatterVectorPostprocessorValue(), AuxKernel::getScatterVectorPostprocessorValueByName(), FEProblemBase::getScatterVectorPostprocessorValueOld(), Transient::getTimeStepperName(), AuxKernel::getUserObject(), InitialConditionBase::getUserObject(), FEProblemBase::getUserObject(), InitialConditionBase::getUserObjectBase(), AuxKernel::getUserObjectBase(), FEProblemBase::getUserObjectBase(), AuxKernel::getUserObjectByName(), InitialConditionBase::getUserObjectByName(), GeneralUserObject::getVectorPostprocessorValue(), AuxKernel::getVectorPostprocessorValue(), FEProblemBase::getVectorPostprocessorValue(), GeneralUserObject::getVectorPostprocessorValueByName(), AuxKernel::getVectorPostprocessorValueByName(), FEProblemBase::getVectorPostprocessorValueOld(), FEProblemBase::hasFunction(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasUserObject(), FEProblemBase::hasVectorPostprocessor(), FEProblemBase::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), CSVReader::initialize(), StatisticsVectorPostprocessor::initialize(), HistogramVectorPostprocessor::initialize(), MultiAppProjectionTransfer::initialSetup(), DerivativeFunctionMaterialBase::initialSetup(), initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPostprocessorData(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), FEProblemBase::initVectorPostprocessorData(), Function::integral(), InterfaceKernel::InterfaceKernel(), MooseObject::isParamValid(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MatDiffusionBase< Real >::MatDiffusionBase(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshSideSetGenerator::MeshSideSetGenerator(), ElementDeleterBase::modify(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), Material::resetQpProperties(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), Exodus::setOutputDimension(), MooseMesh::setSubdomainName(), Split::setup(), TransientMultiApp::setupApp(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), SubProblem::storeSubdomainZeroMatProp(), TaggingInterface::TaggingInterface(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), TiledMeshGenerator::TiledMeshGenerator(), Function::timeDerivative(), VectorPostprocessorVisualizationAux::timestepSetup(), TransientMultiApp::TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), and AdvancedOutput::wantOutput().

51 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:177

◆ paramError()

template<typename... Args>
void MooseObject::paramError ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 100 of file MooseObject.h.

Referenced by ADKernel< compute_stage >::ADKernel(), DGKernel::DGKernel(), ElementValueSampler::ElementValueSampler(), IntegratedBC::IntegratedBC(), Kernel::Kernel(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), RandomIC::RandomIC(), and MultiAppCopyTransfer::transfer().

101  {
102  auto prefix = param + ": ";
103  if (!_pars.inputLocation(param).empty())
104  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
105  mooseError(prefix, args...);
106  }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ parameters()

const InputParameters& MooseObject::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 57 of file MooseObject.h.

Referenced by FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), AdvancedOutput::AdvancedOutput(), assemble_l2(), Moose::assemble_matrix(), AuxKernel::AuxKernel(), AuxScalarKernel::AuxScalarKernel(), BoundsAux::BoundsAux(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), Console::Console(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Executioner::Executioner(), Exodus::Exodus(), FEProblem::FEProblem(), GapValueAux::GapValueAux(), MooseObject::getCheckedPointerParam(), MooseMesh::init(), BlockRestrictable::initializeBlockRestrictable(), FEProblemBase::initNullSpaceVectors(), InterfaceKernel::InterfaceKernel(), isValid(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodeFaceConstraint::NodeFaceConstraint(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), MultiAppProjectionTransfer::projectSolution(), RandomIC::RandomIC(), InputParameterWarehouse::removeInputParameters(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), DumpObjectsProblem::stringifyParameters(), and Transient::Transient().

57 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168

◆ paramInfo()

template<typename... Args>
void MooseObject::paramInfo ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 131 of file MooseObject.h.

132  {
133  auto prefix = param + ": ";
134  if (!_pars.inputLocation(param).empty())
135  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
136  mooseInfo(prefix, args...);
137  }
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
void mooseInfo(Args &&... args) const
Definition: MooseObject.h:161
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ paramWarning()

template<typename... Args>
void MooseObject::paramWarning ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 115 of file MooseObject.h.

116  {
117  auto prefix = param + ": ";
118  if (!_pars.inputLocation(param).empty())
119  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
120  mooseWarning(prefix, args...);
121  }
void mooseWarning(Args &&... args) const
Definition: MooseObject.h:149
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ pointValue() [1/2]

Real SolutionUserObject::pointValue ( Real  t,
const Point &  p,
const unsigned int  local_var_index 
) const

Returns a value at a specific location and variable (see SolutionFunction)

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
local_var_indexThe local index of the variable to be evaluated
Returns
The desired value for the given variable at a location

Referenced by SolutionAux::computeValue(), pointValue(), pointValueWrapper(), Axisymmetric2D3DSolutionFunction::value(), and SolutionFunction::value().

◆ pointValue() [2/2]

Real SolutionUserObject::pointValue ( Real  t,
const Point &  p,
const std::string &  var_name 
) const

Returns a value at a specific location and variable (see SolutionFunction)

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
var_nameThe variable to be evaluated
Returns
The desired value for the given variable at a location

Definition at line 686 of file SolutionUserObject.C.

687 {
688  const unsigned int local_var_index = getLocalVarIndex(var_name);
689  return pointValue(t, p, local_var_index);
690 }
Real pointValue(Real t, const Point &p, const unsigned int local_var_index) const
Returns a value at a specific location and variable (see SolutionFunction)
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.

◆ pointValueGradient() [1/2]

RealGradient SolutionUserObject::pointValueGradient ( Real  t,
const Point &  p,
const std::string &  var_name 
) const

Returns the gradient at a specific location and variable (see SolutionFunction)

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
var_nameThe variable to be evaluated
Returns
The desired value for the given variable at a location

Definition at line 846 of file SolutionUserObject.C.

Referenced by SolutionFunction::gradient(), and pointValueGradientWrapper().

847 {
848  const unsigned int local_var_index = getLocalVarIndex(var_name);
849  return pointValueGradient(t, p, local_var_index);
850 }
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.
RealGradient pointValueGradient(Real t, const Point &p, const std::string &var_name) const
Returns the gradient at a specific location and variable (see SolutionFunction)

◆ pointValueGradient() [2/2]

RealGradient SolutionUserObject::pointValueGradient ( Real  t,
Point  pt,
const unsigned int  local_var_index 
) const

Returns the gradient at a specific location and variable (see SolutionFunction)

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
local_var_indexThe local index of the variable to be evaluated
Returns
The desired value for the given variable at a location

◆ pointValueGradientWrapper()

RealGradient SolutionUserObject::pointValueGradientWrapper ( Real  t,
const Point &  p,
const std::string &  var_name,
const MooseEnum weighting_type = weightingType() 
) const

Returns the gradient at a specific location and variable checking for multiple values and weighting these values to obtain a single unique value (see SolutionFunction)

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
var_nameThe variable to be evaluated
Returns
The desired value for the given variable at a location

Definition at line 794 of file SolutionUserObject.C.

798 {
799  // the default weighting_type found_first shortcuts out
800  if (weighting_type == 1)
801  return pointValueGradient(t, p, var_name);
802 
803  // the shape function is discontinuous so we need to compute a suitable unique value
804  std::map<const Elem *, RealGradient> values = discontinuousPointValueGradient(t, p, var_name);
805  switch (weighting_type)
806  {
807  case 2:
808  {
809  RealGradient average = RealGradient(0.0, 0.0, 0.0);
810  for (auto & v : values)
811  average += v.second;
812  return average / Real(values.size());
813  }
814  case 4:
815  {
816  RealGradient smallest_elem_id_value;
817  dof_id_type smallest_elem_id = _fe_problem.mesh().maxElemId();
818  for (auto & v : values)
819  if (v.first->id() < smallest_elem_id)
820  {
821  smallest_elem_id = v.first->id();
822  smallest_elem_id_value = v.second;
823  }
824  return smallest_elem_id_value;
825  }
826  case 8:
827  {
828  RealGradient largest_elem_id_value;
829  dof_id_type largest_elem_id = 0;
830  for (auto & v : values)
831  if (v.first->id() > largest_elem_id)
832  {
833  largest_elem_id = v.first->id();
834  largest_elem_id_value = v.second;
835  }
836  return largest_elem_id_value;
837  }
838  }
839 
840  mooseError("SolutionUserObject::pointValueGradientWrapper reaches line that it should not be "
841  "able to reach.");
842  return RealGradient(0.0, 0.0, 0.0);
843 }
virtual dof_id_type maxElemId() const
Definition: MooseMesh.C:2199
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::map< const Elem *, RealGradient > discontinuousPointValueGradient(Real t, const Point &p, const std::string &var_name) const
Returns the gradient at a specific location and variable for cases where the gradient is multivalued ...
RealGradient pointValueGradient(Real t, const Point &p, const std::string &var_name) const
Returns the gradient at a specific location and variable (see SolutionFunction)
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
Definition: UserObject.h:154
virtual MooseMesh & mesh() override

◆ pointValueWrapper()

Real SolutionUserObject::pointValueWrapper ( Real  t,
const Point &  p,
const std::string &  var_name,
const MooseEnum weighting_type = weightingType() 
) const

Returns a value at a specific location and variable checking for multiple values and weighting these values to obtain a single unique value (see SolutionFunction)

Parameters
tThe time at which to extract (not used, it is handled automatically when reading the data)
pThe location at which to return a value
var_nameThe variable to be evaluated
Returns
The desired value for the given variable at a location

Definition at line 624 of file SolutionUserObject.C.

628 {
629  // first check if the FE type is continuous because in that case the value is
630  // unique and we can take a short cut, the default weighting_type found_first also
631  // shortcuts out
632  auto family =
634  .getVariable(
636  .feType()
637  .family;
638 
639  if (weighting_type == 1 ||
640  (family != L2_LAGRANGE && family != MONOMIAL && family != L2_HIERARCHIC))
641  return pointValue(t, p, var_name);
642 
643  // the shape function is discontinuous so we need to compute a suitable unique value
644  std::map<const Elem *, Real> values = discontinuousPointValue(t, p, var_name);
645  switch (weighting_type)
646  {
647  case 2:
648  {
649  Real average = 0.0;
650  for (auto & v : values)
651  average += v.second;
652  return average / Real(values.size());
653  }
654  case 4:
655  {
656  Real smallest_elem_id_value = std::numeric_limits<Real>::max();
657  dof_id_type smallest_elem_id = _fe_problem.mesh().maxElemId();
658  for (auto & v : values)
659  if (v.first->id() < smallest_elem_id)
660  {
661  smallest_elem_id = v.first->id();
662  smallest_elem_id_value = v.second;
663  }
664  return smallest_elem_id_value;
665  }
666  case 8:
667  {
668  Real largest_elem_id_value = std::numeric_limits<Real>::lowest();
669  dof_id_type largest_elem_id = 0;
670  for (auto & v : values)
671  if (v.first->id() > largest_elem_id)
672  {
673  largest_elem_id = v.first->id();
674  largest_elem_id_value = v.second;
675  }
676  return largest_elem_id_value;
677  }
678  }
679 
680  mooseError(
681  "SolutionUserObject::pointValueWrapper reaches line that it should not be able to reach.");
682  return 0.0;
683 }
Real pointValue(Real t, const Point &p, const unsigned int local_var_index) const
Returns a value at a specific location and variable (see SolutionFunction)
virtual MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual dof_id_type maxElemId() const
Definition: MooseMesh.C:2199
THREAD_ID _tid
Thread ID of this postprocessor.
Definition: UserObject.h:157
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const FEType & feType() const
Get the type of finite element object.
std::map< const Elem *, Real > discontinuousPointValue(Real t, Point pt, const unsigned int local_var_index) const
Returns a value at a specific location and variable for cases where the solution is multivalued at el...
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
Definition: UserObject.h:154
virtual MooseMesh & mesh() override

◆ primaryThreadCopy()

UserObject* UserObject::primaryThreadCopy ( )
inlineinherited

Definition at line 147 of file UserObject.h.

147 { return _primary_thread_copy; }
UserObject * _primary_thread_copy
Definition: UserObject.h:166

◆ readExodusII()

void SolutionUserObject::readExodusII ( )
protected

Method for reading an ExodusII file, which is called when 'file_type = exodusII is set in the input file.

Definition at line 203 of file SolutionUserObject.C.

Referenced by initialSetup().

204 {
205  // Define a default system name
206  if (_system_name == "")
207  _system_name = "SolutionUserObjectSystem";
208 
209  // Read the Exodus file
210  _exodusII_io = libmesh_make_unique<ExodusII_IO>(*_mesh);
211  _exodusII_io->read(_mesh_file);
212  _exodus_times = &_exodusII_io->get_time_steps();
213 
214  if (isParamValid("timestep"))
215  {
216  std::string s_timestep = getParam<std::string>("timestep");
217  int n_steps = _exodusII_io->get_num_time_steps();
218  if (s_timestep == "LATEST")
219  _exodus_time_index = n_steps;
220  else
221  {
222  std::istringstream ss(s_timestep);
223  if (!((ss >> _exodus_time_index) && ss.eof()) || _exodus_time_index > n_steps)
224  mooseError("Invalid value passed as \"timestep\". Expected \"LATEST\" or a valid integer "
225  "less than ",
226  n_steps,
227  ", received ",
228  s_timestep);
229  }
230  }
231  else
232  // Interpolate between times rather than using values from a set timestep
233  _interpolate_times = true;
234 
235  // Check that the number of time steps is valid
236  int num_exo_times = _exodus_times->size();
237  if (num_exo_times == 0)
238  mooseError("In SolutionUserObject, exodus file contains no timesteps.");
239 
240  // Account for parallel mesh
241  if (dynamic_cast<DistributedMesh *>(_mesh.get()))
242  {
243  _mesh->allow_renumbering(true);
244  _mesh->prepare_for_use(/*false*/);
245  }
246  else
247  {
248  _mesh->allow_renumbering(false);
249  _mesh->prepare_for_use(/*true*/);
250  }
251 
252  // Create EquationSystems object for solution
253  _es = libmesh_make_unique<EquationSystems>(*_mesh);
254  _es->add_system<ExplicitSystem>(_system_name);
255  _system = &_es->get_system(_system_name);
256 
257  // Get the variable name lists as set; these need to be sets to perform set_intersection
258  const std::vector<std::string> & all_nodal(_exodusII_io->get_nodal_var_names());
259  const std::vector<std::string> & all_elemental(_exodusII_io->get_elem_var_names());
260 
261  // Storage for the nodal and elemental variables to consider
262  std::vector<std::string> nodal, elemental;
263 
264  // Build nodal/elemental variable lists, limit to variables listed in 'system_variables', if
265  // provided
266  if (!_system_variables.empty())
267  {
268  for (const auto & var_name : _system_variables)
269  {
270  if (std::find(all_nodal.begin(), all_nodal.end(), var_name) != all_nodal.end())
271  nodal.push_back(var_name);
272  if (std::find(all_elemental.begin(), all_elemental.end(), var_name) != all_elemental.end())
273  elemental.push_back(var_name);
274  }
275  }
276  else
277  {
278  nodal = all_nodal;
279  elemental = all_elemental;
280  }
281 
282  // Add the variables to the system
283  for (const auto & var_name : nodal)
284  _system->add_variable(var_name, FIRST);
285 
286  for (const auto & var_name : elemental)
287  _system->add_variable(var_name, CONSTANT, MONOMIAL);
288 
289  // Initialize the equations systems
290  _es->init();
291 
292  // Interpolate times
293  if (_interpolate_times)
294  {
295  // Create a second equation system
296  _es2 = libmesh_make_unique<EquationSystems>(*_mesh);
297  _es2->add_system<ExplicitSystem>(_system_name);
298  _system2 = &_es2->get_system(_system_name);
299 
300  // Add the variables to the system
301  for (const auto & var_name : nodal)
302  _system2->add_variable(var_name, FIRST);
303 
304  for (const auto & var_name : elemental)
305  _system2->add_variable(var_name, CONSTANT, MONOMIAL);
306 
307  // Initialize
308  _es2->init();
309 
310  // Update the times for interpolation (initially start at 0)
312 
313  // Copy the solutions from the first system
314  for (const auto & var_name : nodal)
315  {
316  _exodusII_io->copy_nodal_solution(*_system, var_name, var_name, _exodus_index1 + 1);
317  _exodusII_io->copy_nodal_solution(*_system2, var_name, var_name, _exodus_index2 + 1);
318  }
319 
320  for (const auto & var_name : elemental)
321  {
322  _exodusII_io->copy_elemental_solution(*_system, var_name, var_name, _exodus_index1 + 1);
323  _exodusII_io->copy_elemental_solution(*_system2, var_name, var_name, _exodus_index2 + 1);
324  }
325 
326  // Update the systems
327  _system->update();
328  _es->update();
329  _system2->update();
330  _es2->update();
331  }
332 
333  // Non-interpolated times
334  else
335  {
336  if (_exodus_time_index > num_exo_times)
337  mooseError("In SolutionUserObject, timestep = ",
339  ", but there are only ",
340  num_exo_times,
341  " time steps.");
342 
343  // Copy the values from the ExodusII file
344  for (const auto & var_name : nodal)
345  _exodusII_io->copy_nodal_solution(*_system, var_name, var_name, _exodus_time_index);
346 
347  for (const auto & var_name : elemental)
348  _exodusII_io->copy_elemental_solution(*_system, var_name, var_name, _exodus_time_index);
349 
350  // Update the equations systems
351  _system->update();
352  _es->update();
353  }
354 }
std::unique_ptr< ExodusII_IO > _exodusII_io
Pointer to the libMesh::ExodusII used to read the files.
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
std::unique_ptr< EquationSystems > _es
Pointer to the libmesh::EquationSystems object.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::vector< Real > * _exodus_times
The times available in the ExodusII file.
int _exodus_index1
Time index 1, used for interpolation.
int _exodus_time_index
Current ExodusII time index.
std::string _system_name
The system name to extract from the XDA file (xda only)
System * _system2
Pointer to a second libMesh::System object, used for interpolation.
bool _interpolate_times
Flag for triggering interpolation of ExodusII data.
std::unique_ptr< EquationSystems > _es2
Pointer to second libMesh::EquationSystems object, used for interpolation.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:81
bool updateExodusBracketingTimeIndices(Real time)
Updates the time indices to interpolate between for ExodusII data.
int _exodus_index2
Time index 2, used for interpolation.
std::string _mesh_file
The XDA or ExodusII file that is being read.
System * _system
Pointer libMesh::System class storing the read solution.
std::unique_ptr< MeshBase > _mesh
Pointer the libmesh::mesh object.

◆ readXda()

void SolutionUserObject::readXda ( )
protected

Method for reading XDA mesh and equation systems file(s) This method is called by the constructor when 'file_type = xda' is set in the input file.

Definition at line 166 of file SolutionUserObject.C.

Referenced by initialSetup().

167 {
168  // Check that the required files exist
171 
172  // Read the libmesh::mesh from the xda file
173  _mesh->read(_mesh_file);
174 
175  // Create the libmesh::EquationSystems
176  _es = libmesh_make_unique<EquationSystems>(*_mesh);
177 
178  // Use new read syntax (binary)
179  if (_file_type == "xdr")
180  _es->read(_es_file,
181  DECODE,
182  EquationSystems::READ_HEADER | EquationSystems::READ_DATA |
183  EquationSystems::READ_ADDITIONAL_DATA);
184 
185  // Use new read syntax
186  else if (_file_type == "xda")
187  _es->read(_es_file,
188  READ,
189  EquationSystems::READ_HEADER | EquationSystems::READ_DATA |
190  EquationSystems::READ_ADDITIONAL_DATA);
191 
192  // This should never occur, just in case produce an error
193  else
194  mooseError("Failed to determine proper read method for XDA/XDR equation system file: ",
195  _es_file);
196 
197  // Update and store the EquationSystems name locally
198  _es->update();
199  _system = &_es->get_system(_system_name);
200 }
std::string _es_file
The XDA file that contians the EquationSystems data (xda only)
std::unique_ptr< EquationSystems > _es
Pointer to the libmesh::EquationSystems object.
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:145
std::string _system_name
The system name to extract from the XDA file (xda only)
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)
std::string _mesh_file
The XDA or ExodusII file that is being read.
System * _system
Pointer libMesh::System class storing the read solution.
std::unique_ptr< MeshBase > _mesh
Pointer the libmesh::mesh object.

◆ registerTimedSection()

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
)
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 50 of file PerfGraphInterface.C.

51 {
52  if (_prefix != "")
53  return _perf_graph.registerSection(_prefix + "::" + section_name, level);
54  else
55  return _perf_graph.registerSection(section_name, level);
56 }
PerfGraph & _perf_graph
The performance graph to add to.
std::string _prefix
A prefix to use for all sections.
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:41

◆ residualSetup()

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 57 of file SetupInterface.C.

58 {
59 }

◆ setPrimaryThreadCopy()

void UserObject::setPrimaryThreadCopy ( UserObject primary)
inlineinherited

Definition at line 141 of file UserObject.h.

Referenced by FEProblemBase::addUserObject().

142  {
143  if (!_primary_thread_copy && primary != this)
144  _primary_thread_copy = primary;
145  }
UserObject * _primary_thread_copy
Definition: UserObject.h:166

◆ shouldDuplicateInitialExecution()

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 89 of file UserObject.h.

const bool _duplicate_initial_execution
Definition: UserObject.h:163

◆ sort()

template<typename T >
void DependencyResolverInterface::sort ( typename std::vector< T > &  vector)
staticinherited

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

Definition at line 58 of file DependencyResolverInterface.h.

Referenced by TheWarehouse::prepare().

59 {
60  DependencyResolver<T> resolver;
61 
62  typename std::vector<T>::iterator start = vector.begin();
63  typename std::vector<T>::iterator end = vector.end();
64 
65  for (typename std::vector<T>::iterator iter = start; iter != end; ++iter)
66  {
67  const std::set<std::string> & requested_items = (*iter)->getRequestedItems();
68 
69  for (typename std::vector<T>::iterator iter2 = start; iter2 != end; ++iter2)
70  {
71  if (iter == iter2)
72  continue;
73 
74  const std::set<std::string> & supplied_items = (*iter2)->getSuppliedItems();
75 
76  std::set<std::string> intersect;
77  std::set_intersection(requested_items.begin(),
78  requested_items.end(),
79  supplied_items.begin(),