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)
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp ()
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled ()
 Return the enabled status of the object. More...
 
template<typename... Args>
void mooseError (Args &&...args) const
 
template<typename... Args>
void mooseWarning (Args &&...args) const
 
template<typename... Args>
void mooseDeprecated (Args &&...args) const
 
template<typename... Args>
void mooseInfo (Args &&...args) const
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 Get the execution flag for the object. More...
 
ExecFlagType execBitFlags () const
 Build and return the execution flags as a bitfield. More...
 
FunctiongetFunction (const std::string &name)
 Get a function with a given name. More...
 
FunctiongetFunctionByName (const FunctionName &name)
 Get a function with a given name. More...
 
DistributiongetDistribution (const std::string &name)
 Get a distribution with a given name. More...
 
DistributiongetDistributionByName (const DistributionName &name)
 Get a distribution with a given name. More...
 
virtual void meshChanged ()
 Called on this object when the mesh changes. More...
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 Get the list of coupled scalar variables. More...
 
template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 Retrieve pointer to a material property with the mesh blocks where it is defined The name required by this method is the name defined in the input file. More...
 
template<typename T >
const MaterialProperty< T > & getZeroMaterialProperty (const std::string &prop_name)
 Return a material property that is initialized to zero by default and does not need to (but can) be declared by another material. More...
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 Retrieve the block ids that the material property is defined. More...
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 Retrieve the block names that the material property is defined. More...
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 Retrieve the boundary ids that the material property is defined. More...
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 Retrieve the boundary namess that the material property is defined. More...
 
void statefulPropertiesAllowed (bool)
 Derived classes can declare whether or not they work with stateful material properties. More...
 
bool getMaterialPropertyCalled () const
 Returns true if getMaterialProperty() has been called, false otherwise. More...
 
const std::set< unsigned int > & getMatPropDependencies () const
 Retrieve the set of material properties that this object depends on. More...
 
template<>
const MaterialProperty< Real > * defaultMaterialProperty (const std::string &name)
 
bool isImplicit ()
 
template<class T >
const T & getUserObject (const std::string &name)
 Get an user object with a given parameter name. More...
 
template<class T >
const T & getUserObjectByName (const std::string &name)
 Get an user object with a given name. More...
 
const UserObjectgetUserObjectBase (const std::string &name)
 Get an user object with a given parameter name. More...
 
const UserObjectgetUserObjectBaseByName (const std::string &name)
 Get an user object with a given name. More...
 
virtual void threadJoin (const UserObject &) final
 This method is not used and should not be used in a custom GeneralUserObject. More...
 
virtual void subdomainSetup () final
 Gets called when the subdomain changes (i.e. More...
 
virtual const PostprocessorValuegetPostprocessorValue (const std::string &name)
 Store dependency among same object types for proper execution order. More...
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name)
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &name, const std::string &vector_name) override
 Retrieve the value of a VectorPostprocessor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) override
 Retrieve the value of the VectorPostprocessor. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialProperty (const std::string &name)
 Retrieve reference to material property or one of it's old or older values. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name)
 Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
MaterialgetMaterial (const std::string &name)
 Return a Material reference - usable for computing directly. More...
 
MaterialgetMaterialByName (const std::string &name, bool no_warn=false)
 
template<typename T >
bool hasMaterialProperty (const std::string &name)
 Check if the material property exists. More...
 
template<typename T >
bool hasMaterialPropertyByName (const std::string &name)
 

Static Public Member Functions

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

Public Attributes

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

Protected Member Functions

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...
 
virtual bool isCoupledScalar (const std::string &var_name, unsigned int i=0)
 Returns true if a variables has been coupled_as name. More...
 
virtual unsigned int coupledScalarComponents (const std::string &var_name)
 Return the number of components to the coupled scalar variable. More...
 
virtual unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0)
 Returns the index for a scalar coupled variable by name. More...
 
virtual Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0)
 Returns the order for a scalar coupled variable by name. More...
 
virtual VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0)
 Returns value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0)
 Returns the old (previous time step) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0)
 Returns the older (two time steps previous) value of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0)
 Returns the time derivative of a scalar coupled variable. More...
 
virtual VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0)
 Time derivative of a scalar coupled variable with respect to the coefficients. More...
 
VariableValuegetDefaultValue (const std::string &var_name)
 Helper method to return (and insert if necessary) the default value for an uncoupled variable. More...
 
MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp)
 Extract pointer to a scalar coupled variable. More...
 
void checkMaterialProperty (const std::string &name)
 A helper method for checking material properties This method was required to avoid a compiler problem with the template getMaterialProperty method. More...
 
void markMatPropRequested (const std::string &)
 A proxy method for _mi_feproblem.markMatPropRequested(name) More...
 
std::string deducePropertyName (const std::string &name)
 Small helper to look up a material property name through the input parameter keys. More...
 
template<typename T >
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 Helper function to parse default material property values. More...
 
bool hasPostprocessor (const std::string &name) const
 Determine if the Postprocessor exists. More...
 
bool hasPostprocessorByName (const PostprocessorName &name)
 Determine if the Postprocessor exists. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 Retrieve the old value of a VectorPostprocessor. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name)
 Retrieve the old value of a VectorPostprocessor. More...
 
bool hasVectorPostprocessor (const std::string &name) const
 Determine if the VectorPostprocessor exists. More...
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 Determine if the VectorPostprocessor exists. More...
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name)
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name)
 
const PostprocessorValuegetDefaultPostprocessorValue (const std::string &name)
 Return the default postprocessor value. More...
 

Protected Attributes

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
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
std::vector< ExecFlagType_exec_flags
 execution flag (when is the object executed/evaluated) More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. More...
 
const InputParameters_sc_parameters
 
FEProblemBase_sc_fe_problem
 
std::map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 Coupled vars whose values we provide. More...
 
std::map< std::string, VariableValue * > _default_value
 Will hold the default value for optional coupled scalar variables. More...
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 Vector of coupled variables. More...
 
bool _sc_is_implicit
 True if implicit value is required. More...
 
const InputParameters_coupleable_params
 Local InputParameters. More...
 
const InputParameters_mi_params
 Parameters of the object with this interface. More...
 
const std::string _mi_name
 The name of the object that this interface belongs to. More...
 
Moose::MaterialDataType _material_data_type
 The type of data. More...
 
std::shared_ptr< MaterialData_material_data
 Pointer to the material data class that stores properties. More...
 
FEProblemBase_mi_feproblem
 Reference to the FEProblemBase class. More...
 
const THREAD_ID _mi_tid
 Current threaded it. More...
 
bool _stateful_allowed
 True by default. More...
 
bool _get_material_property_called
 Initialized to false. More...
 
std::vector< std::unique_ptr< MaterialProperty< Real > > > _default_real_properties
 Storage vector for MaterialProperty<Real> default objects. More...
 
std::set< unsigned int > _material_property_dependencies
 The set of material properties (as given by their IDs) that this object depends on. More...
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 If the object is using implicit or explicit form. More...
 
Real & _t
 Time. More...
 
int & _t_step
 The number of the time step. More...
 
Real & _dt
 Time step size. More...
 
Real & _dt_old
 Size of the old time step. More...
 
bool _is_transient
 

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 42 of file SolutionUserObject.h.

Constructor & Destructor Documentation

SolutionUserObject::SolutionUserObject ( const InputParameters parameters)

Definition at line 106 of file SolutionUserObject.C.

107  : GeneralUserObject(parameters),
108  _file_type(MooseEnum("xda=0 exodusII=1 xdr=2")),
109  _mesh_file(getParam<MeshFileName>("mesh")),
110  _es_file(getParam<FileName>("es")),
111  _system_name(getParam<std::string>("system")),
112  _system_variables(getParam<std::vector<std::string>>("system_variables")),
113  _exodus_time_index(-1),
114  _interpolate_times(false),
115  _system(nullptr),
116  _system2(nullptr),
117  _interpolation_time(0.0),
119  _exodus_times(nullptr),
120  _exodus_index1(-1),
121  _exodus_index2(-1),
122  _scale(getParam<std::vector<Real>>("scale")),
123  _scale_multiplier(getParam<std::vector<Real>>("scale_multiplier")),
124  _translation(getParam<std::vector<Real>>("translation")),
125  _rotation0_vector(getParam<RealVectorValue>("rotation0_vector")),
126  _rotation0_angle(getParam<Real>("rotation0_angle")),
127  _r0(RealTensorValue()),
128  _rotation1_vector(getParam<RealVectorValue>("rotation1_vector")),
129  _rotation1_angle(getParam<Real>("rotation1_angle")),
130  _r1(RealTensorValue()),
131  _transformation_order(getParam<MultiMooseEnum>("transformation_order")),
132  _initialized(false)
133 {
134  // form rotation matrices with the specified angles
135  Real halfPi = std::acos(0.0);
136  Real a;
137  Real b;
138 
139  a = std::cos(halfPi * -_rotation0_angle / 90);
140  b = std::sin(halfPi * -_rotation0_angle / 90);
141  // the following is an anticlockwise rotation about z
142  RealTensorValue rot0_z(a, -b, 0, b, a, 0, 0, 0, 1);
143  // form the rotation matrix that will take rotation0_vector to the z axis
145  // _r0 is then: rotate points so vec0 lies along z; then rotate about angle0; then rotate points
146  // back
147  _r0 = vec0_to_z.transpose() * (rot0_z * vec0_to_z);
148 
149  a = std::cos(halfPi * -_rotation1_angle / 90);
150  b = std::sin(halfPi * -_rotation1_angle / 90);
151  // the following is an anticlockwise rotation about z
152  RealTensorValue rot1_z(a, -b, 0, b, a, 0, 0, 0, 1);
153  // form the rotation matrix that will take rotation1_vector to the z axis
155  // _r1 is then: rotate points so vec1 lies along z; then rotate about angle1; then rotate points
156  // back
157  _r1 = vec1_to_z.transpose() * (rot1_z * vec1_to_z);
158 
159  if (isParamValid("timestep") && getParam<std::string>("timestep") == "-1")
160  mooseError("A \"timestep\" of -1 is no longer supported for interpolation. Instead simply "
161  "remove this parameter altogether for interpolation");
162 }
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
const std::vector< Real > * _exodus_times
The times available in the ExodusII file.
RealVectorValue _rotation0_vector
vector about which to rotate
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)
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:37
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:67
Real _interpolation_time
Interpolation time.
System * _system2
Pointer to a second libMesh::System object, used for interpolation.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:122
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)
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
Real _interpolation_factor
Interpolation weight factor.
TensorValue< Real > RealTensorValue
Definition: Assembly.h:45
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 ( )
virtual

Definition at line 164 of file SolutionUserObject.C.

164 {}

Member Function Documentation

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

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

Definition at line 138 of file MaterialPropertyInterface.C.

Referenced by MaterialPropertyInterface::getMaterialPropertyByName().

139 {
140  // If the material property is boundary restrictable, add to the list of materials to check
142  for (const auto & bnd_id : _mi_boundary_ids)
144 
145  // The default is to assume block restrictions
146  else
147  for (const auto & blk_ids : _mi_block_ids)
149 }
virtual void storeDelayedCheckMatProp(const std::string &requestor, SubdomainID block_id, const std::string &name)
Adds to a map based on block ids of material properties to validate.
Definition: SubProblem.C:253
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
const bool _mi_boundary_restricted
BoundaryRestricted flag.
const std::set< BoundaryID > & _mi_boundary_ids
Storage for the boundary ids created by BoundaryRestrictable.
const std::string _mi_name
The name of the object that this interface belongs to.
unsigned int ScalarCoupleable::coupledScalar ( const std::string &  var_name,
unsigned int  comp = 0 
)
protectedvirtualinherited

Returns the index for a scalar coupled variable by name.

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

Definition at line 99 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

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

Return the number of components to the coupled scalar variable.

Parameters
var_nameThe of the coupled variable

Definition at line 189 of file ScalarCoupleable.C.

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

Returns the time derivative of a scalar coupled variable.

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

Definition at line 161 of file ScalarCoupleable.C.

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

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

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

Definition at line 168 of file ScalarCoupleable.C.

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

Returns the order for a scalar coupled variable by name.

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

Definition at line 105 of file ScalarCoupleable.C.

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

Returns value of a scalar coupled variable.

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

Definition at line 128 of file ScalarCoupleable.C.

Referenced by ParsedODEKernel::ParsedODEKernel().

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

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

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

Definition at line 138 of file ScalarCoupleable.C.

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

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

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

Definition at line 148 of file ScalarCoupleable.C.

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

A helper method for cyclic errors.

Definition at line 100 of file DependencyResolverInterface.h.

Referenced by DependencyResolverInterface::DependencyResolverInterface().

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

Declare a piece of data as "restartable".

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

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

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

Definition at line 224 of file Restartable.h.

225 {
226  return declareRestartableDataWithContext<T>(data_name, NULL);
227 }
template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name,
const T &  init_value 
)
protectedinherited

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

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

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

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

Definition at line 231 of file Restartable.h.

232 {
233  return declareRestartableDataWithContext<T>(data_name, init_value, NULL);
234 }
template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

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

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

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

Definition at line 238 of file Restartable.h.

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

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

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

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

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

Definition at line 253 of file Restartable.h.

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

Helper function to parse default material property values.

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

Definition at line 345 of file MaterialPropertyInterface.h.

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

Definition at line 87 of file MaterialPropertyInterface.C.

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

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

359 {
360  // Get the libmesh variable and system numbers
361  unsigned int var_num = _system->variable_number(var_name);
362  unsigned int sys_num = _system->number();
363 
364  // Get the node id and associated dof
365  dof_id_type node_id = node->id();
366  dof_id_type dof_id = _system->get_mesh().node_ref(node_id).dof_number(sys_num, var_num, 0);
367 
368  // Return the desired value for the dof
369  return directValue(dof_id);
370 }
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.
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 373 of file SolutionUserObject.C.

374 {
375  // Get the libmesh variable and system numbers
376  unsigned int var_num = _system->variable_number(var_name);
377  unsigned int sys_num = _system->number();
378 
379  // Get the element id and associated dof
380  dof_id_type elem_id = elem->id();
381  dof_id_type dof_id = _system->get_mesh().elem(elem_id)->dof_number(sys_num, var_num, 0);
382 
383  // Return the desired value
384  return directValue(dof_id);
385 }
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.
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)
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().

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 }
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...
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.
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 }
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 ...
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.
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
virtual bool MooseObject::enabled ( )
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 77 of file MooseObject.h.

Referenced by EigenKernel::enabled().

77 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:117
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.

Referenced by pointValue().

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 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
static Threads::spin_mutex _solution_user_object_mutex
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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.

Referenced by pointValueGradient().

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 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
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.
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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.

Referenced by discontinuousPointValue().

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 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
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.
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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.

Referenced by discontinuousPointValueGradient().

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 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
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.
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
ExecFlagType SetupInterface::execBitFlags ( ) const
inherited

Build and return the execution flags as a bitfield.

Definition at line 100 of file SetupInterface.C.

Referenced by EigenExecutionerBase::init().

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

Get the execution flag for the object.

Reimplemented in MultiAppTransfer.

Definition at line 94 of file SetupInterface.C.

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

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

Execute method.

Implements UserObject.

Definition at line 406 of file SolutionUserObject.C.

407 {
408 }
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 393 of file SolutionUserObject.C.

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

Definition at line 125 of file UserObject.h.

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

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

Definition at line 131 of file UserObject.h.

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

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

Definition at line 137 of file UserObject.h.

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

138  {
139  unsigned int rank;
140  _communicator.maxloc(value, rank);
141  _communicator.broadcast(proxy, rank);
142  }
template<typename T >
void UserObject::gatherSum ( T &  value)
inlineinherited
template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > MaterialPropertyInterface::getBlockMaterialProperty ( const MaterialPropertyName &  name)
inherited

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

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

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

Definition at line 411 of file MaterialPropertyInterface.h.

412 {
413  if (_mi_block_ids.empty())
414  mooseError("getBlockMaterialProperty must be called by a block restrictable object");
415 
416  if (!hasMaterialPropertyByName<T>(name))
417  return std::pair<const MaterialProperty<T> *, std::set<SubdomainID>>(NULL,
418  std::set<SubdomainID>());
419 
420  _material_property_dependencies.insert(_material_data->getPropertyId(name));
421 
422  return std::pair<const MaterialProperty<T> *, std::set<SubdomainID>>(
423  &_material_data->getProperty<T>(name), _mi_feproblem.getMaterialPropertyBlocks(name));
424 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
virtual std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:114
Concrete definition of a parameter value for a specified type.
const std::vector< MooseVariableScalar * > & ScalarCoupleable::getCoupledMooseScalarVars ( )
inherited

Get the list of coupled scalar variables.

Returns
The list of coupled variables

Definition at line 72 of file ScalarCoupleable.C.

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

73 {
75 }
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
Vector of coupled variables.
const PostprocessorValue & PostprocessorInterface::getDefaultPostprocessorValue ( const std::string &  name)
inherited

Return the default postprocessor value.

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

Definition at line 92 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

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

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

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

Definition at line 114 of file ScalarCoupleable.C.

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

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

Get a distribution with a given name.

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

Definition at line 34 of file DistributionInterface.C.

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

Get a distribution with a given name.

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

Definition at line 41 of file DistributionInterface.C.

Referenced by Sampler::Sampler().

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

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

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

Definition at line 110 of file SetupInterface.C.

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

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

Get a function with a given name.

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

Definition at line 35 of file FunctionInterface.C.

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

Get a function with a given name.

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

Definition at line 41 of file FunctionInterface.C.

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

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

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

616 {
617  // Extract the variable index for the MeshFunction(s)
618  std::map<std::string, unsigned int>::const_iterator it = _local_variable_index.find(var_name);
619  if (it == _local_variable_index.end())
620  mooseError("Value requested for nonexistent variable '",
621  var_name,
622  "' in the '",
623  name(),
624  "' SolutionUserObject");
625  return it->second;
626 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::map< std::string, unsigned int > _local_variable_index
Stores the local index need by MeshFunction.
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
Material & MaterialPropertyInterface::getMaterial ( const std::string &  name)
inherited

Return a Material reference - usable for computing directly.

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

Definition at line 164 of file MaterialPropertyInterface.C.

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

Definition at line 170 of file MaterialPropertyInterface.C.

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

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

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

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

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

Definition at line 287 of file MaterialPropertyInterface.h.

288 {
289  // Check if the supplied parameter is a valid input parameter key
290  std::string prop_name = deducePropertyName(name);
291 
292  // Check if it's just a constant
293  const MaterialProperty<T> * default_property = defaultMaterialProperty<T>(prop_name);
294  if (default_property)
295  return *default_property;
296 
297  return getMaterialPropertyByName<T>(prop_name);
298 }
std::string deducePropertyName(const std::string &name)
Small helper to look up a material property name through the input parameter keys.
Concrete definition of a parameter value for a specified type.
std::vector< SubdomainName > MaterialPropertyInterface::getMaterialPropertyBlockNames ( const std::string &  name)
inherited

Retrieve the block names that the material property is defined.

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

Definition at line 120 of file MaterialPropertyInterface.C.

121 {
123 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames(const std::string &prop_name)
Get a vector of block id equivalences that the material property is defined on.
Definition: SubProblem.C:130
std::set< SubdomainID > MaterialPropertyInterface::getMaterialPropertyBlocks ( const std::string &  name)
inherited

Retrieve the block ids that the material property is defined.

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

Definition at line 114 of file MaterialPropertyInterface.C.

115 {
117 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:114
std::set< BoundaryID > MaterialPropertyInterface::getMaterialPropertyBoundaryIDs ( const std::string &  name)
inherited

Retrieve the boundary ids that the material property is defined.

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

Definition at line 126 of file MaterialPropertyInterface.C.

127 {
129 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::set< BoundaryID > getMaterialPropertyBoundaryIDs(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:171
std::vector< BoundaryName > MaterialPropertyInterface::getMaterialPropertyBoundaryNames ( const std::string &  name)
inherited

Retrieve the boundary namess that the material property is defined.

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

Definition at line 132 of file MaterialPropertyInterface.C.

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

Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file.

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

Definition at line 357 of file MaterialPropertyInterface.h.

358 {
360  checkMaterialProperty(name);
361 
362  // mark property as requested
363  markMatPropRequested(name);
364 
365  // Update the boolean flag.
367 
368  _material_property_dependencies.insert(_material_data->getPropertyId(name));
369 
370  return _material_data->getProperty<T>(name);
371 }
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
void markMatPropRequested(const std::string &)
A proxy method for _mi_feproblem.markMatPropRequested(name)
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
void checkMaterialProperty(const std::string &name)
A helper method for checking material properties This method was required to avoid a compiler problem...
bool _get_material_property_called
Initialized to false.
void checkExecutionStage()
Check and throw an error if the execution has progressed past the construction stage.
bool MaterialPropertyInterface::getMaterialPropertyCalled ( ) const
inlineinherited

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

Definition at line 173 of file MaterialPropertyInterface.h.

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

Definition at line 302 of file MaterialPropertyInterface.h.

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

Definition at line 375 of file MaterialPropertyInterface.h.

376 {
377  if (!_stateful_allowed)
378  mooseError("Stateful material properties not allowed for this object."
379  " Old property for \"",
380  name,
381  "\" was requested.");
382 
383  // mark property as requested
384  markMatPropRequested(name);
385 
386  _material_property_dependencies.insert(_material_data->getPropertyId(name));
387 
388  return _material_data->getPropertyOld<T>(name);
389 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
void markMatPropRequested(const std::string &)
A proxy method for _mi_feproblem.markMatPropRequested(name)
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
bool _stateful_allowed
True by default.
template<typename T >
const MaterialProperty< T > & MaterialPropertyInterface::getMaterialPropertyOlder ( const std::string &  name)
inherited

Definition at line 323 of file MaterialPropertyInterface.h.

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

Definition at line 393 of file MaterialPropertyInterface.h.

394 {
395  if (!_stateful_allowed)
396  mooseError("Stateful material properties not allowed for this object."
397  " Older property for \"",
398  name,
399  "\" was requested.");
400 
401  // mark property as requested
402  markMatPropRequested(name);
403 
404  _material_property_dependencies.insert(_material_data->getPropertyId(name));
405 
406  return _material_data->getPropertyOlder<T>(name);
407 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
void markMatPropRequested(const std::string &)
A proxy method for _mi_feproblem.markMatPropRequested(name)
std::shared_ptr< MaterialData > _material_data
Pointer to the material data class that stores properties.
bool _stateful_allowed
True by default.
const std::set<unsigned int>& MaterialPropertyInterface::getMatPropDependencies ( ) const
inlineinherited

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

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

Definition at line 181 of file MaterialPropertyInterface.h.

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

182  {
184  }
std::set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.
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 228 of file SolutionUserObject.h.

228 { return _mesh->spatial_dimension(); }
std::unique_ptr< MeshBase > _mesh
Pointer the libmesh::mesh object.
MooseApp& MooseObject::getMooseApp ( )
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 72 of file MooseObject.h.

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

72 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
template<typename T >
const T & MooseObject::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

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

Definition at line 122 of file MooseObject.h.

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

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

Store dependency among same object types for proper execution order.

Definition at line 51 of file GeneralUserObject.C.

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

Definition at line 58 of file GeneralUserObject.C.

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

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

Definition at line 40 of file PostprocessorInterface.C.

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

Definition at line 68 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

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

Definition at line 51 of file PostprocessorInterface.C.

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

Definition at line 74 of file PostprocessorInterface.C.

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

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

Implements DependencyResolverInterface.

Definition at line 39 of file GeneralUserObject.C.

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

Extract pointer to a scalar coupled variable.

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

Definition at line 175 of file ScalarCoupleable.C.

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

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

526 {
527  return _file_type;
528 }
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)
SubProblem& UserObject::getSubProblem ( ) const
inlineinherited

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

Definition at line 86 of file UserObject.h.

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

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

Implements DependencyResolverInterface.

Definition at line 45 of file GeneralUserObject.C.

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

Get an user object with a given parameter name.

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

Definition at line 85 of file UserObjectInterface.h.

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

Get an user object with a given parameter name.

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

Definition at line 28 of file UserObjectInterface.C.

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

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

Get an user object with a given name.

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

Definition at line 34 of file UserObjectInterface.C.

Referenced by UserObjectInterface::getUserObjectByName().

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

Get an user object with a given name.

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

Definition at line 93 of file UserObjectInterface.h.

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

Retrieve the value of a VectorPostprocessor.

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

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

see getVectorPostprocessorValueOld getVectorPostprocessorValueByName getVectorPostprocessorValueOldByName

Reimplemented from VectorPostprocessorInterface.

Definition at line 65 of file GeneralUserObject.C.

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

Retrieve the value of the VectorPostprocessor.

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

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

see getVectorPostprocessorValue getVectorPostprocessorValueOldByName getVectorPostprocessorValueByName

Reimplemented from VectorPostprocessorInterface.

Definition at line 73 of file GeneralUserObject.C.

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

Retrieve the old value of a VectorPostprocessor.

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

see getVectorPostprocessorValue

Definition at line 44 of file VectorPostprocessorInterface.C.

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

Retrieve the old value of a VectorPostprocessor.

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

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

see getVectorPostprocessorValueByName

Definition at line 52 of file VectorPostprocessorInterface.C.

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

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

Definition at line 444 of file MaterialPropertyInterface.h.

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

Check if the material property exists.

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

Definition at line 428 of file MaterialPropertyInterface.h.

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

Definition at line 437 of file MaterialPropertyInterface.h.

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

Determine if the Postprocessor exists.

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

Definition at line 80 of file PostprocessorInterface.C.

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

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

Determine if the Postprocessor exists.

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

Definition at line 86 of file PostprocessorInterface.C.

Referenced by VectorOfPostprocessors::VectorOfPostprocessors().

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

Determine if the VectorPostprocessor exists.

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

Definition at line 59 of file VectorPostprocessorInterface.C.

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

Determine if the VectorPostprocessor exists.

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

Definition at line 65 of file VectorPostprocessorInterface.C.

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

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

Implements UserObject.

Definition at line 388 of file SolutionUserObject.C.

389 {
390 }
void SolutionUserObject::initialSetup ( )
overridevirtual

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

Reimplemented from SetupInterface.

Definition at line 411 of file SolutionUserObject.C.

412 {
413 
414  // Make sure this only happens once
415  if (_initialized)
416  return;
417 
418  // Several aspects of SolutionUserObject won't work if the FEProblemBase's MooseMesh is
419  // a DistributedMesh:
420  // .) ExodusII_IO::copy_nodal_solution() doesn't work in parallel.
421  // .) We don't know if directValue will be used, which may request
422  // a value on a Node we don't have.
423  _fe_problem.mesh().errorIfDistributedMesh("SolutionUserObject");
424 
425  // Create a libmesh::Mesh object for storing the loaded data. Since
426  // SolutionUserObject is restricted to only work with ReplicatedMesh
427  // (see above) we can force the Mesh used here to be a ReplicatedMesh.
428  _mesh = libmesh_make_unique<ReplicatedMesh>(_communicator);
429 
430  // ExodusII mesh file supplied
431  if (MooseUtils::hasExtension(_mesh_file, "e", /*strip_exodus_ext =*/true))
432  {
433  _file_type = "exodusII";
434  readExodusII();
435  }
436 
437  // XDA mesh file supplied
438  else if (MooseUtils::hasExtension(_mesh_file, "xda"))
439  {
440  _file_type = "xda";
441  readXda();
442  }
443 
444  else if (MooseUtils::hasExtension(_mesh_file, "xdr"))
445  {
446  _file_type = "xdr";
447  readXda();
448  }
449 
450  // Produce an error for an unknown file type
451  else
452  mooseError("In SolutionUserObject, invalid file type (only .xda, .xdr, and .e supported)");
453 
454  // Intilize the serial solution vector
455  _serialized_solution = NumericVector<Number>::build(_communicator);
456  _serialized_solution->init(_system->n_dofs(), false, SERIAL);
457 
458  // Pull down a full copy of this vector on every processor so we can get values in parallel
459  _system->solution->localize(*_serialized_solution);
460 
461  // Vector of variable numbers to apply the MeshFunction to
462  std::vector<unsigned int> var_nums;
463 
464  // If no variables were given, use all of them
465  if (_system_variables.empty())
466  {
467  _system->get_all_variable_numbers(var_nums);
468  for (const auto & var_num : var_nums)
469  _system_variables.push_back(_system->variable_name(var_num));
470  }
471 
472  // Otherwise, gather the numbers for the variables given
473  else
474  {
475  for (const auto & var_name : _system_variables)
476  var_nums.push_back(_system->variable_number(var_name));
477  }
478 
479  // Create the MeshFunction for working with the solution data
480  _mesh_function = libmesh_make_unique<MeshFunction>(
481  *_es, *_serialized_solution, _system->get_dof_map(), var_nums);
482  _mesh_function->init();
483 
484  // Tell the MeshFunctions that we might be querying them outside the
485  // mesh, so we can handle any errors at the MOOSE rather than at the
486  // libMesh level.
487  DenseVector<Number> default_values;
488  _mesh_function->enable_out_of_mesh_mode(default_values);
489 
490  // Build second MeshFunction for interpolation
491  if (_interpolate_times)
492  {
493  // Need to pull down a full copy of this vector on every processor so we can get values in
494  // parallel
495  _serialized_solution2 = NumericVector<Number>::build(_communicator);
496  _serialized_solution2->init(_system2->n_dofs(), false, SERIAL);
497  _system2->solution->localize(*_serialized_solution2);
498 
499  // Create the MeshFunction for the second copy of the data
500  _mesh_function2 = libmesh_make_unique<MeshFunction>(
501  *_es2, *_serialized_solution2, _system2->get_dof_map(), var_nums);
502  _mesh_function2->init();
503  _mesh_function2->enable_out_of_mesh_mode(default_values);
504  }
505 
506  // Populate the data maps that indicate if the variable is nodal and the MeshFunction variable
507  // index
508  for (unsigned int i = 0; i < _system_variables.size(); ++i)
509  {
510  std::string name = _system_variables[i];
511  FEType type = _system->variable_type(name);
512  if (type.order == CONSTANT)
513  _local_variable_nodal[name] = false;
514  else
515  _local_variable_nodal[name] = true;
516 
518  }
519 
520  // Set initialization flag
521  _initialized = true;
522 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
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 errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:2473
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:227
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.
MatType type
bool _initialized
True if initial_setup has executed.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
Definition: UserObject.h:149
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.
virtual MooseMesh & mesh() override
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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.
bool ScalarCoupleable::isCoupledScalar ( const std::string &  var_name,
unsigned int  i = 0 
)
protectedvirtualinherited

Returns true if a variables has been coupled_as name.

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

Definition at line 78 of file ScalarCoupleable.C.

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

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

Definition at line 41 of file TransientInterface.h.

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

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 67 of file MooseObject.h.

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

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

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

Definition at line 79 of file SetupInterface.C.

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

Load user data object from a stream.

Parameters
streamStream to load from

Definition at line 73 of file UserObject.C.

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

A proxy method for _mi_feproblem.markMatPropRequested(name)

Definition at line 152 of file MaterialPropertyInterface.C.

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

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

Called on this object when the mesh changes.

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

Definition at line 43 of file MeshChangedInterface.h.

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

Definition at line 80 of file MooseObject.h.

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

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

Definition at line 101 of file MooseObject.h.

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

Get the name of the object.

Returns
The name of the object

Definition at line 47 of file MooseObject.h.

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

47 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:114
const InputParameters& MooseObject::parameters ( ) const
inlineinherited
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().

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.
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 }
RealGradient pointValueGradient(Real t, const Point &p, const std::string &var_name) const
Returns the gradient 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.
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
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 }
RealVectorValue RealGradient
Definition: Assembly.h:43
RealGradient pointValueGradient(Real t, const Point &p, const std::string &var_name) const
Returns the gradient at a specific location and variable (see SolutionFunction)
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 ...
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
Definition: UserObject.h:149
virtual MooseMesh & mesh() override
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
virtual dof_id_type maxElemId() const
Definition: MooseMesh.C:2042
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 629 of file SolutionUserObject.C.

633 {
634  // first check if the FE type is continuous because in that case the value is
635  // unique and we can take a short cut, the default weighting_type found_first also
636  // shortcuts out
637  if (weighting_type == 1 ||
638  (_fe_problem.getVariable(_tid, var_name).feType().family != L2_LAGRANGE &&
639  _fe_problem.getVariable(_tid, var_name).feType().family != MONOMIAL &&
640  _fe_problem.getVariable(_tid, var_name).feType().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 }
const FEType & feType() const
Get the type of finite element object.
THREAD_ID _tid
Thread ID of this postprocessor.
Definition: UserObject.h:152
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...
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)
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
Definition: UserObject.h:149
virtual MooseMesh & mesh() override
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
virtual dof_id_type maxElemId() const
Definition: MooseMesh.C:2042
virtual MooseVariable & getVariable(THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested variable which may be in any system. ...
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 204 of file SolutionUserObject.C.

Referenced by initialSetup().

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

Referenced by initialSetup().

168 {
169  // Check that the required files exist
172 
173  // Read the libmesh::mesh from the xda file
174  _mesh->read(_mesh_file);
175 
176  // Create the libmesh::EquationSystems
177  _es = libmesh_make_unique<EquationSystems>(*_mesh);
178 
179  // Use new read syntax (binary)
180  if (_file_type == "xdr")
181  _es->read(_es_file,
182  DECODE,
183  EquationSystems::READ_HEADER | EquationSystems::READ_DATA |
184  EquationSystems::READ_ADDITIONAL_DATA);
185 
186  // Use new read syntax
187  else if (_file_type == "xda")
188  _es->read(_es_file,
189  READ,
190  EquationSystems::READ_HEADER | EquationSystems::READ_DATA |
191  EquationSystems::READ_ADDITIONAL_DATA);
192 
193  // This should never occur, just in case produce an error
194  else
195  mooseError("Failed to determine proper read method for XDA/XDR equation system file: ",
196  _es_file);
197 
198  // Update and store the EquationSystems name locally
199  _es->update();
200  _system = &_es->get_system(_system_name);
201 }
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.
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:121
std::string _system_name
The system name to extract from the XDA file (xda only)
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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.
void SetupInterface::residualSetup ( )
virtualinherited

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

Definition at line 84 of file SetupInterface.C.

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

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

Definition at line 92 of file UserObject.h.

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

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

Definition at line 63 of file DependencyResolverInterface.h.

Referenced by DependencyResolverInterface::DependencyResolverInterface().

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

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

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

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

Definition at line 99 of file UserObject.h.

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

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

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

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

Definition at line 158 of file MaterialPropertyInterface.C.

Referenced by DiracKernel::DiracKernel().

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

Store user data object to a stream.

Parameters
streamStream to store to

Definition at line 78 of file UserObject.C.

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

Gets called when the subdomain changes (i.e.

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

Reimplemented from SetupInterface.

Definition at line 88 of file GeneralUserObject.C.

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

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

Implements UserObject.

Definition at line 81 of file GeneralUserObject.C.

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

When reading ExodusII files, this will update the interpolation times.

Reimplemented from SetupInterface.

Definition at line 398 of file SolutionUserObject.C.

399 {
400  // Update time interpolation for ExodusII solution
401  if (_file_type == 1 && _interpolate_times)
403 }
void updateExodusTimeInterpolation(Real time)
Updates the times for interpolating ExodusII data.
bool _interpolate_times
Flag for triggering interpolation of ExodusII data.
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)
bool SolutionUserObject::updateExodusBracketingTimeIndices ( Real  time)
protected

Updates the time indices to interpolate between for ExodusII data.

Parameters
timeThe new time

Definition at line 567 of file SolutionUserObject.C.

Referenced by readExodusII(), and updateExodusTimeInterpolation().

568 {
569  if (_file_type != 1)
570  mooseError(
571  "In SolutionUserObject, getTimeInterpolationData only applicable for exodusII file type");
572 
573  int old_index1 = _exodus_index1;
574  int old_index2 = _exodus_index2;
575 
576  int num_exo_times = _exodus_times->size();
577 
578  if (time < (*_exodus_times)[0])
579  {
580  _exodus_index1 = 0;
581  _exodus_index2 = 0;
582  _interpolation_factor = 0.0;
583  }
584  else
585  {
586  for (int i = 0; i < num_exo_times - 1; ++i)
587  {
588  if (time <= (*_exodus_times)[i + 1])
589  {
590  _exodus_index1 = i;
591  _exodus_index2 = i + 1;
593  (time - (*_exodus_times)[i]) / ((*_exodus_times)[i + 1] - (*_exodus_times)[i]);
594  break;
595  }
596  else if (i == num_exo_times - 2)
597  {
598  _exodus_index1 = num_exo_times - 1;
599  _exodus_index2 = num_exo_times - 1;
600  _interpolation_factor = 1.0;
601  break;
602  }
603  }
604  }
605 
606  bool indices_modified(false);
607 
608  if (_exodus_index1 != old_index1 || _exodus_index2 != old_index2)
609  indices_modified = true;
610 
611  return indices_modified;
612 }
const std::vector< Real > * _exodus_times
The times available in the ExodusII file.
int _exodus_index1
Time index 1, used for interpolation.
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
Real _interpolation_factor
Interpolation weight factor.
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII)
int _exodus_index2
Time index 2, used for interpolation.
void SolutionUserObject::updateExodusTimeInterpolation ( Real  time)
protected

Updates the times for interpolating ExodusII data.

Parameters
timeThe new time

Definition at line 531 of file SolutionUserObject.C.

Referenced by timestepSetup().

532 {
533  if (time != _interpolation_time)
534  {
536  {
537 
538  for (const auto & var_name : _system_variables)
539  {
540  if (_local_variable_nodal[var_name])
541  _exodusII_io->copy_nodal_solution(*_system, var_name, _exodus_index1 + 1);
542  else
543  _exodusII_io->copy_elemental_solution(*_system, var_name, var_name, _exodus_index1 + 1);
544  }
545 
546  _system->update();
547  _es->update();
548  _system->solution->localize(*_serialized_solution);
549 
550  for (const auto & var_name : _system_variables)
551  {
552  if (_local_variable_nodal[var_name])
553  _exodusII_io->copy_nodal_solution(*_system2, var_name, _exodus_index2 + 1);
554  else
555  _exodusII_io->copy_elemental_solution(*_system2, var_name, var_name, _exodus_index2 + 1);
556  }
557 
558  _system2->update();
559  _es2->update();
560  _system2->solution->localize(*_serialized_solution2);
561  }
562  _interpolation_time = time;
563  }
564 }
std::unique_ptr< ExodusII_IO > _exodusII_io
Pointer to the libMesh::ExodusII used to read the files.
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.
int _exodus_index1
Time index 1, used for interpolation.
std::unique_ptr< NumericVector< Number > > _serialized_solution2
Pointer to second serial solution, used for interpolation.
Real _interpolation_time
Interpolation time.
System * _system2
Pointer to a second libMesh::System object, used for interpolation.
std::unique_ptr< EquationSystems > _es2
Pointer to second libMesh::EquationSystems object, used for interpolation.
bool updateExodusBracketingTimeIndices(Real time)
Updates the time indices to interpolate between for ExodusII data.
int _exodus_index2
Time index 2, used for interpolation.
std::map< std::string, bool > _local_variable_nodal
Stores flag indicating if the variable is nodal.
System * _system
Pointer libMesh::System class storing the read solution.
const std::vector< std::string > & SolutionUserObject::variableNames ( ) const

Definition at line 1145 of file SolutionUserObject.C.

Referenced by SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), and SolutionFunction::initialSetup().

1146 {
1147  return _system_variables;
1148 }
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
static MooseEnum SolutionUserObject::weightingType ( )
inlinestatic

Definition at line 218 of file SolutionUserObject.h.

219  {
220  return MooseEnum("found_first=1 average=2 smallest_element_id=4 largest_element_id=8",
221  "found_first");
222  }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37

Member Data Documentation

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 108 of file MooseObject.h.

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

Assembly& UserObject::_assembly
protectedinherited

Definition at line 153 of file UserObject.h.

Referenced by InternalSideUserObject::getNeighborElemVolume().

const ConsoleStream ConsoleStreamInterface::_console
inherited

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

Definition at line 37 of file ConsoleStreamInterface.h.

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

const Moose::CoordinateSystemType& UserObject::_coord_sys
protectedinherited

Coordinate system.

Definition at line 156 of file UserObject.h.

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

Vector of coupled variables.

Definition at line 144 of file ScalarCoupleable.h.

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

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

Reference to FEProblemBase.

Definition at line 85 of file SetupInterface.h.

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

Storage vector for MaterialProperty<Real> default objects.

Definition at line 243 of file MaterialPropertyInterface.h.

Referenced by MaterialPropertyInterface::defaultMaterialProperty().

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

Will hold the default value for optional coupled scalar variables.

Definition at line 141 of file ScalarCoupleable.h.

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

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

Time step size.

Definition at line 63 of file TransientInterface.h.

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

Real& TransientInterface::_dt_old
protectedinherited

Size of the old time step.

Definition at line 66 of file TransientInterface.h.

Referenced by VariableTimeIntegrationAux::getIntegralValue().

const bool UserObject::_duplicate_initial_execution
protectedinherited

Definition at line 158 of file UserObject.h.

Referenced by UserObject::shouldDuplicateInitialExecution().

const bool& MooseObject::_enabled
protectedinherited

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

Definition at line 117 of file MooseObject.h.

Referenced by MooseObject::enabled().

std::unique_ptr<EquationSystems> SolutionUserObject::_es
protected

Pointer to the libmesh::EquationSystems object.

Definition at line 344 of file SolutionUserObject.h.

Referenced by initialSetup(), readExodusII(), readXda(), and updateExodusTimeInterpolation().

std::unique_ptr<EquationSystems> SolutionUserObject::_es2
protected

Pointer to second libMesh::EquationSystems object, used for interpolation.

Definition at line 359 of file SolutionUserObject.h.

Referenced by initialSetup(), readExodusII(), and updateExodusTimeInterpolation().

std::string SolutionUserObject::_es_file
protected

The XDA file that contians the EquationSystems data (xda only)

Definition at line 320 of file SolutionUserObject.h.

Referenced by readXda().

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

execution flag (when is the object executed/evaluated)

Definition at line 82 of file SetupInterface.h.

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

int SolutionUserObject::_exodus_index1
protected

Time index 1, used for interpolation.

Definition at line 380 of file SolutionUserObject.h.

Referenced by readExodusII(), updateExodusBracketingTimeIndices(), and updateExodusTimeInterpolation().

int SolutionUserObject::_exodus_index2
protected

Time index 2, used for interpolation.

Definition at line 383 of file SolutionUserObject.h.

Referenced by readExodusII(), updateExodusBracketingTimeIndices(), and updateExodusTimeInterpolation().

int SolutionUserObject::_exodus_time_index
protected

Current ExodusII time index.

Definition at line 335 of file SolutionUserObject.h.

Referenced by readExodusII().

const std::vector<Real>* SolutionUserObject::_exodus_times
protected

The times available in the ExodusII file.

Definition at line 377 of file SolutionUserObject.h.

Referenced by readExodusII(), and updateExodusBracketingTimeIndices().

std::unique_ptr<ExodusII_IO> SolutionUserObject::_exodusII_io
protected

Pointer to the libMesh::ExodusII used to read the files.

Definition at line 353 of file SolutionUserObject.h.

Referenced by readExodusII(), and updateExodusTimeInterpolation().

FEProblemBase& UserObject::_fe_problem
protectedinherited
MooseEnum SolutionUserObject::_file_type
protected
bool MaterialPropertyInterface::_get_material_property_called
protectedinherited

Initialized to false.

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

Definition at line 240 of file MaterialPropertyInterface.h.

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

bool SolutionUserObject::_initialized
protected

True if initial_setup has executed.

Definition at line 416 of file SolutionUserObject.h.

Referenced by initialSetup().

bool SolutionUserObject::_interpolate_times
protected

Flag for triggering interpolation of ExodusII data.

Definition at line 338 of file SolutionUserObject.h.

Referenced by directValue(), discontinuousPointValue(), discontinuousPointValueGradient(), initialSetup(), pointValue(), pointValueGradient(), readExodusII(), and timestepSetup().

Real SolutionUserObject::_interpolation_factor
protected
Real SolutionUserObject::_interpolation_time
protected
bool TransientInterface::_is_implicit
protectedinherited

If the object is using implicit or explicit form.

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

Definition at line 54 of file TransientInterface.h.

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

bool TransientInterface::_is_transient
protectedinherited

Definition at line 69 of file TransientInterface.h.

std::map<std::string, unsigned int> SolutionUserObject::_local_variable_index
protected

Stores the local index need by MeshFunction.

Definition at line 329 of file SolutionUserObject.h.

Referenced by getLocalVarIndex(), and initialSetup().

std::map<std::string, bool> SolutionUserObject::_local_variable_nodal
protected

Stores flag indicating if the variable is nodal.

Definition at line 332 of file SolutionUserObject.h.

Referenced by initialSetup(), isVariableNodal(), and updateExodusTimeInterpolation().

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

Reference to FEProblemBase instance.

Definition at line 47 of file MeshChangedInterface.h.

Referenced by MeshChangedInterface::MeshChangedInterface().

std::unique_ptr<MeshBase> SolutionUserObject::_mesh
protected

Pointer the libmesh::mesh object.

Definition at line 341 of file SolutionUserObject.h.

Referenced by initialSetup(), and readXda().

std::string SolutionUserObject::_mesh_file
protected

The XDA or ExodusII file that is being read.

Definition at line 317 of file SolutionUserObject.h.

Referenced by initialSetup(), readExodusII(), and readXda().

std::unique_ptr<MeshFunction> SolutionUserObject::_mesh_function
protected

Pointer the libMesh::MeshFunction object that the read data is stored.

Definition at line 350 of file SolutionUserObject.h.

Referenced by evalMeshFunctionGradient(), evalMultiValuedMeshFunction(), evalMultiValuedMeshFunctionGradient(), and initialSetup().

std::unique_ptr<MeshFunction> SolutionUserObject::_mesh_function2
protected

Pointer to second libMesh::MeshFuntion, used for interpolation.

Definition at line 365 of file SolutionUserObject.h.

Referenced by evalMeshFunctionGradient(), evalMultiValuedMeshFunction(), evalMultiValuedMeshFunctionGradient(), and initialSetup().

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

The name of the object that this interface belongs to.

Definition at line 191 of file MaterialPropertyInterface.h.

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

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

Current threaded it.

Definition at line 203 of file MaterialPropertyInterface.h.

Referenced by MaterialPropertyInterface::getMaterialByName().

const std::string& MooseObject::_name
protectedinherited
const InputParameters& MooseObject::_pars
protectedinherited
RealTensorValue SolutionUserObject::_r0
protected

Rotation matrix that performs the "_rotation0_angle about rotation0_vector".

Definition at line 401 of file SolutionUserObject.h.

Referenced by discontinuousPointValue(), discontinuousPointValueGradient(), pointValue(), pointValueGradient(), and SolutionUserObject().

RealTensorValue SolutionUserObject::_r1
protected

Rotation matrix that performs the "_rotation1_angle about rotation1_vector".

Definition at line 410 of file SolutionUserObject.h.

Referenced by discontinuousPointValue(), discontinuousPointValueGradient(), pointValue(), pointValueGradient(), and SolutionUserObject().

Real SolutionUserObject::_rotation0_angle
protected

angle (in degrees) which to rotate through about vector _rotation0_vector

Definition at line 398 of file SolutionUserObject.h.

Referenced by SolutionUserObject().

RealVectorValue SolutionUserObject::_rotation0_vector
protected

vector about which to rotate

Definition at line 395 of file SolutionUserObject.h.

Referenced by SolutionUserObject().

Real SolutionUserObject::_rotation1_angle
protected

angle (in degrees) which to rotate through about vector _rotation1_vector

Definition at line 407 of file SolutionUserObject.h.

Referenced by SolutionUserObject().

RealVectorValue SolutionUserObject::_rotation1_vector
protected

vector about which to rotate

Definition at line 404 of file SolutionUserObject.h.

Referenced by SolutionUserObject().

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

Definition at line 60 of file ScalarCoupleable.h.

Referenced by ScalarCoupleable::ScalarCoupleable().

std::vector<Real> SolutionUserObject::_scale
protected
std::vector<Real> SolutionUserObject::_scale_multiplier
protected

scale_multiplier parameter

Definition at line 389 of file SolutionUserObject.h.

Referenced by discontinuousPointValue(), discontinuousPointValueGradient(), pointValue(), and pointValueGradient().

std::unique_ptr<NumericVector<Number> > SolutionUserObject::_serialized_solution
protected

Pointer to the serial solution vector.

Definition at line 356 of file SolutionUserObject.h.

Referenced by initialSetup(), and updateExodusTimeInterpolation().

std::unique_ptr<NumericVector<Number> > SolutionUserObject::_serialized_solution2
protected

Pointer to second serial solution, used for interpolation.

Definition at line 368 of file SolutionUserObject.h.

Referenced by initialSetup(), and updateExodusTimeInterpolation().

Threads::spin_mutex SolutionUserObject::_solution_user_object_mutex
staticprivate
bool MaterialPropertyInterface::_stateful_allowed
protectedinherited
SubProblem& UserObject::_subproblem
protectedinherited
std::set<std::string> GeneralUserObject::_supplied_vars
protectedinherited
System* SolutionUserObject::_system
protected

Pointer libMesh::System class storing the read solution.

Definition at line 347 of file SolutionUserObject.h.

Referenced by directValue(), initialSetup(), readExodusII(), readXda(), and updateExodusTimeInterpolation().

System* SolutionUserObject::_system2
protected

Pointer to a second libMesh::System object, used for interpolation.

Definition at line 362 of file SolutionUserObject.h.

Referenced by initialSetup(), readExodusII(), and updateExodusTimeInterpolation().

std::string SolutionUserObject::_system_name
protected

The system name to extract from the XDA file (xda only)

Definition at line 323 of file SolutionUserObject.h.

Referenced by readExodusII(), and readXda().

std::vector<std::string> SolutionUserObject::_system_variables
protected
Real& TransientInterface::_t
protectedinherited
int& TransientInterface::_t_step
protectedinherited

The number of the time step.

Definition at line 60 of file TransientInterface.h.

FEProblemBase& TransientInterface::_ti_feproblem
protectedinherited

Definition at line 46 of file TransientInterface.h.

Referenced by SolutionFunction::SolutionFunction().

const InputParameters& TransientInterface::_ti_params
protectedinherited

Definition at line 44 of file TransientInterface.h.

THREAD_ID UserObject::_tid
protectedinherited
MultiMooseEnum SolutionUserObject::_transformation_order
protected

transformations (rotations, translation, scales) are performed in this order

Definition at line 413 of file SolutionUserObject.h.

Referenced by discontinuousPointValue(), discontinuousPointValueGradient(), pointValue(), and pointValueGradient().

std::vector<Real> SolutionUserObject::_translation
protected

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