69 const unsigned int local_var_index,
70 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
83 const std::string & var_name,
84 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
99 const std::string & var_name,
100 WeightingType weighting_type,
101 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
115 std::map<const Elem *, Real>
118 const unsigned int local_var_index,
119 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
133 std::map<const Elem *, Real>
136 const std::string & var_name,
137 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
153 const std::string & var_name,
154 WeightingType weighting_type,
155 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
169 const std::string & var_name,
170 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
184 const unsigned int local_var_index,
185 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
202 const std::string & var_name,
203 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
220 const unsigned int local_var_index,
221 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
229 Real
directValue(
const Node * node,
const std::string & var_name)
const;
237 Real
directValue(
const Elem * elem,
const std::string & var_name)
const;
246 Real
scalarValue(Real t,
const std::string & var_name)
const;
255 virtual void execute()
override;
339 virtual Real
directValue(dof_id_type dof_index)
const;
359 const unsigned int local_var_index,
360 unsigned int func_num,
361 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
371 std::map<const Elem *, Real>
373 const unsigned int local_var_index,
374 unsigned int func_num,
375 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
386 const unsigned int local_var_index,
387 unsigned int func_num,
388 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
401 const unsigned int local_var_index,
402 unsigned int func_num,
403 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
444 std::unique_ptr<libMesh::MeshBase>
_mesh;
447 std::unique_ptr<libMesh::EquationSystems>
_es;
465 std::unique_ptr<libMesh::EquationSystems>
_es2;
538 mutable Point
_cached_p = Point(std::numeric_limits<Real>::max(), 0., 0.);
539 mutable Point
_cached_p2 = Point(std::numeric_limits<Real>::max(), 0., 0.);
const InputParameters & parameters() const
Get the parameters of the object.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
User object that reads an existing solution from an input file and uses it in the current simulation.
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII, 2 = xdr, 3 = Nemesis)
virtual Real solutionSampleTime()=0
Get the time at which to sample the solution.
CreateMooseEnumClass(WeightingType, AVERAGE)
Policies for reducing multiple imported solution values at the same point.
std::set< subdomain_id_type > _cached_subdomain_ids2
const bool _force_replicated_source
Whether to force the source mesh to be replicated.
MooseEnum getSolutionFileType() const
Get the type of file that was read.
Real pointValue(Real t, const Point &p, const unsigned int local_var_index, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns a value at a specific location and variable (see SolutionFunction)
bool isVariableADiscontinuousScalarField(const std::string &var_name) const
Returns whether the imported variable is a discontinuous scalar finite element field.
static MooseEnum weightingType()
const MooseEnum _nodal_variable_order
Nodal variable order, used when reading in solution data.
std::string _system_name
The system name to extract from the XDA/XDR file (xda/xdr only)
RealTensorValue _r0
Rotation matrix that performs the "_rotation0_angle about rotation0_vector".
libMesh::RealGradient evalMeshFunctionGradient(const Point &p, const unsigned int local_var_index, unsigned int func_num, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
A wrapper method interfacing with the libMesh mesh function for evaluating the gradient.
std::unique_ptr< libMesh::MeshFunction > _mesh_function2
Pointer to second libMesh::MeshFuntion, used for interpolation.
std::map< SubdomainID, SubdomainName > _block_id_to_name
Map from block names to block IDs. Read from the ExodusII file.
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
const std::string getMeshFileName() const
Return the name of the mesh file this object read the solution from.
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer the libMesh::mesh object.
std::vector< std::string > _nodal_variables
Stores names of nodal variables.
DenseVector< Number > _cached_values2
bool _interpolate_times
Flag for triggering interpolation of ExodusII data.
int _exodus_index2
Time index 2, used for interpolation.
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.
bool initialized() const
Returns whether the imported solution has been initialized.
std::vector< Real > _scale
Scale parameter.
std::unique_ptr< libMesh::EquationSystems > _es2
Pointer to second libMesh::EquationSystems object, used for interpolation.
Real _interpolation_factor
Interpolation weight factor.
const std::map< SubdomainID, SubdomainName > & getBlockIdsToNames() const
Get the map from block id to block name.
std::unique_ptr< libMesh::EquationSystems > _es
Pointer to the libMesh::EquationSystems object.
libMesh::RealGradient pointValueGradient(Real t, Point pt, const unsigned int local_var_index, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns the gradient at a specific location and variable (see SolutionFunction)
virtual void timestepSetup() override
When reading ExodusII files, this will update the interpolation times.
std::vector< Real > _scale_multiplier
scale_multiplier parameter
void readBlockIdMapFromExodusII()
Read block ID map from the ExodusII file.
unsigned int getMeshFileDimension() const
Return the spatial dimension of the mesh file.
bool isVariableScalarValued(const std::string &var_name) const
Returns whether the imported variable has a scalar finite element field type.
std::unique_ptr< NumericVector< Number > > _serialized_solution
Pointer to the serial solution vector.
std::unique_ptr< libMesh::MeshFunction > _mesh_function
Pointer the libMesh::MeshFunction object that the read data is stored.
void readXda()
Method for reading XDA mesh and equation systems file(s) This method is called by the constructor whe...
static Threads::spin_mutex _solution_user_object_mutex
std::map< const Elem *, libMesh::RealGradient > evalMultiValuedMeshFunctionGradient(const Point &p, const unsigned int local_var_index, unsigned int func_num, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
A wrapper method interfacing with the libMesh mesh function that calls the gradient functionality for...
Real _interpolation_time
Time in the current simulation at which the solution interpolation was last updated.
Real scalarValue(Real t, const std::string &var_name) const
Returns a value of a global variable.
static InputParameters validParams()
bool _initialized
True if initial_setup has executed.
std::vector< std::string > _scalar_variables
Stores names of scalar variables.
Point _cached_p
Cached points.
std::string _es_file
The XDA/XDR file that contians the EquationSystems data (xda/xdr only)
int _exodus_time_index
Current ExodusII time index.
RealVectorValue _rotation0_vector
vector about which to rotate
std::string _mesh_file
The XDA/ExodusII/XDR/Nemesis file that is being read.
void readExodusIIOrNemesis()
Method for reading an ExodusII or Nemesis file, which is called when a mesh file with a ....
MultiMooseEnum _transformation_order
transformations (rotations, translation, scales) are performed in this order
std::unique_ptr< libMesh::Nemesis_IO > _nemesis_io
Pointer to the libMesh::Nemesis_IO used to read the files.
const std::vector< std::string > & variableNames() const
RealTensorValue _r1
Rotation matrix that performs the "_rotation1_angle about rotation1_vector".
libMesh::System * _system2
Pointer to a second libMesh::System object, used for interpolation.
std::unique_ptr< libMesh::ExodusII_IO > _exodusII_io
Pointer to the libMesh::ExodusII used to read the files.
virtual void execute() override
Execute method.
DenseVector< Number > _cached_values
Cached values.
Real directValue(const Node *node, const std::string &var_name) const
Return a value directly from a Node.
virtual void initialSetup() override
Initialize the System and Mesh objects for the solution being read.
std::map< std::string, unsigned int > _local_variable_index
Stores the local index need by MeshFunction.
std::map< const Elem *, libMesh::RealGradient > discontinuousPointValueGradient(Real t, const Point &p, const std::string &var_name, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns the gradient at a specific location and variable for cases where the gradient is multivalued ...
libMesh::System * _system
Pointer libMesh::System class storing the read solution.
std::unique_ptr< NumericVector< Number > > _serialized_solution2
Pointer to second serial solution, used for interpolation.
std::vector< std::string > _elemental_variables
Stores names of elemental variables.
virtual void finalize() override
Finalize.
void updateTimeInterpolationFromFile()
Updates the times for interpolating ExodusII or Nemesis data.
Real evalMeshFunction(const Point &p, const unsigned int local_var_index, unsigned int func_num, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
A wrapper method for calling the various MeshFunctions used for reading the data.
const std::map< SubdomainName, SubdomainID > & getBlockNamesToIds() const
Get the map from block name to block ID.
bool isVariableNodal(const std::string &var_name) const
const std::vector< Real > * _exodus_times
The times available in the ExodusII file.
bool updateInterpolationBracketingTimeIndices()
Updates the time indices to interpolate between for ExodusII or Nemesis data.
std::set< subdomain_id_type > _cached_subdomain_ids
Cached subdomain ids.
Real _rotation1_angle
angle (in degrees) which to rotate through about vector _rotation1_vector
std::map< SubdomainName, SubdomainID > _block_name_to_id
Map from block ID to block names. Read from the ExodusII file.
libMesh::RealGradient pointValueGradient(Real t, const Point &p, const std::string &var_name, WeightingType weighting_type, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns the gradient at a specific location and variable, reducing multiple gradients according to th...
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::map< const Elem *, libMesh::RealGradient > discontinuousPointValueGradient(Real t, Point pt, const unsigned int local_var_index, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns the gradient at a specific location and variable for cases where the gradient is multivalued ...
int _exodus_index1
Time index 1, used for interpolation.
RealVectorValue _rotation1_vector
vector about which to rotate
std::vector< Real > _translation
Translation.
Real _rotation0_angle
angle (in degrees) which to rotate through about vector _rotation0_vector
std::map< const Elem *, Real > discontinuousPointValue(Real t, Point pt, const unsigned int local_var_index, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns a value at a specific location and variable for cases where the solution is multivalued at el...
std::map< const Elem *, Real > evalMultiValuedMeshFunction(const Point &p, const unsigned int local_var_index, unsigned int func_num, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
A wrapper method for calling the various MeshFunctions that calls the mesh function functionality for...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...