22 #include "libmesh/equation_systems.h" 23 #include "libmesh/mesh_function.h" 24 #include "libmesh/numeric_vector.h" 25 #include "libmesh/nonlinear_implicit_system.h" 26 #include "libmesh/transient_system.h" 27 #include "libmesh/parallel_mesh.h" 28 #include "libmesh/serial_mesh.h" 29 #include "libmesh/exodusII_io.h" 30 #include "libmesh/exodusII_io_helper.h" 31 #include "libmesh/nemesis_io.h" 32 #include "libmesh/nemesis_io_helper.h" 33 #include "libmesh/enum_xdr_mode.h" 34 #include "libmesh/string_to_enum.h" 44 "mesh",
"The name of the mesh file (must be xda/xdr, exodusII or nemesis file).");
45 params.
addParam<std::vector<std::string>>(
47 std::vector<std::string>(),
48 "The name of the nodal and elemental variables from the file you want to use for values");
50 "force_replicated_source_mesh",
52 "Whether to force the serialization of the source mesh. This can be useful for discontinuous " 53 "variables or if the partitioning of the source mesh and the current mesh are different");
59 "The name of the file holding the equation system info in xda/xdr format (xda/xdr only).");
63 "The name of the system to pull values out of (xda/xdr only). The default name for the " 64 "nonlinear system is 'nl0', auxiliary system is 'aux0'");
67 params.
addParam<std::string>(
"timestep",
68 "Index of the single timestep used or \"LATEST\" for " 69 "the last timestep (exodusII only). If not supplied, " 70 "time interpolation will occur.");
75 "Specifies the order of the nodal solution data.");
79 "scale", std::vector<Real>(LIBMESH_DIM, 1),
"Scale factor for points in the simulation");
80 params.
addParam<std::vector<Real>>(
"scale_multiplier",
81 std::vector<Real>(LIBMESH_DIM, 1),
82 "Scale multiplying factor for points in the simulation");
83 params.
addParam<std::vector<Real>>(
"translation",
84 std::vector<Real>(LIBMESH_DIM, 0),
85 "Translation factors for x,y,z coordinates of the simulation");
88 "Vector about which to rotate points of the simulation.");
92 "Anticlockwise rotation angle (in degrees) to use for rotation about rotation0_vector.");
95 "Vector about which to rotate points of the simulation.");
99 "Anticlockwise rotation angle (in degrees) to use for rotation about rotation1_vector.");
103 "rotation0 translation scale rotation1 scale_multiplier",
"translation scale");
105 "transformation_order",
106 default_transformation_order,
107 "The order to perform the operations in. Define R0 to be the rotation matrix encoded by " 108 "rotation0_vector and rotation0_angle. Similarly for R1. Denote the scale by s, the " 109 "scale_multiplier by m, and the translation by t. Then, given a point x in the simulation, " 110 "if transformation_order = 'rotation0 scale_multiplier translation scale rotation1' then " 111 "form p = R1*(R0*x*m - t)/s. Then the values provided by the SolutionUserObjectBase at " 113 "in the simulation are the variable values at point p in the mesh.");
114 params.
addParamNamesToGroup(
"scale scale_multiplier translation rotation0_vector rotation0_angle " 115 "rotation1_angle transformation_order",
116 "Coordinate system transformation");
126 _file_type(
MooseEnum(
"xda=0 exodusII=1 xdr=2 nemesis=3")),
127 _mesh_file(getParam<MeshFileName>(
"mesh")),
128 _es_file(getParam<FileName>(
"es")),
129 _system_name(getParam<
std::string>(
"system")),
130 _system_variables(getParam<
std::vector<
std::string>>(
"system_variables")),
131 _exodus_time_index(-1),
132 _interpolate_times(false),
135 _interpolation_time(0.0),
136 _interpolation_factor(0.0),
137 _exodus_times(nullptr),
140 _nodal_variable_order(getParam<
MooseEnum>(
"nodal_variable_order")),
141 _scale(getParam<
std::vector<
Real>>(
"scale")),
142 _scale_multiplier(getParam<
std::vector<
Real>>(
"scale_multiplier")),
143 _translation(getParam<
std::vector<
Real>>(
"translation")),
145 _rotation0_angle(getParam<
Real>(
"rotation0_angle")),
148 _rotation1_angle(getParam<
Real>(
"rotation1_angle")),
150 _transformation_order(getParam<
MultiMooseEnum>(
"transformation_order")),
151 _force_replicated_source(getParam<bool>(
"force_replicated_source_mesh")),
179 if (
isParamValid(
"timestep") && getParam<std::string>(
"timestep") ==
"-1")
180 mooseError(
"A \"timestep\" of -1 is no longer supported for interpolation. Instead simply " 181 "remove this parameter altogether for interpolation");
186 "The mesh has second-order elements, be sure to set 'nodal_variable_order' if needed.");
193 paramError(
"es",
"Equation system file (.xda or .xdr) should have been specified");
203 _es = std::make_unique<EquationSystems>(*_mesh);
209 EquationSystems::READ_HEADER | EquationSystems::READ_DATA |
210 EquationSystems::READ_ADDITIONAL_DATA);
216 EquationSystems::READ_HEADER | EquationSystems::READ_DATA |
217 EquationSystems::READ_ADDITIONAL_DATA);
221 mooseError(
"Failed to determine proper read method for XDA/XDR equation system file: ",
239 _exodusII_io = std::make_unique<libMesh::ExodusII_IO>(*_mesh);
245 _nemesis_io = std::make_unique<libMesh::Nemesis_IO>(*_mesh);
254 std::string s_timestep = getParam<std::string>(
"timestep");
257 if (s_timestep ==
"LATEST")
261 std::istringstream ss(s_timestep);
263 mooseError(
"Invalid value passed as \"timestep\". Expected \"LATEST\" or a valid integer " 276 if (num_exo_times == 0)
277 mooseError(
"In SolutionUserObjectBase, exodus file contains no timesteps.");
283 _mesh->allow_renumbering(
true);
284 _mesh->prepare_for_use();
288 _mesh->allow_renumbering(
false);
289 _mesh->prepare_for_use();
293 _es = std::make_unique<EquationSystems>(*_mesh);
298 const std::vector<std::string> & all_nodal((
_file_type ==
"exodusII")
301 const std::vector<std::string> & all_elemental((
_file_type ==
"exodusII")
304 const std::vector<std::string> & all_scalar((
_file_type ==
"exodusII")
319 if (
std::find(all_nodal.begin(), all_nodal.end(), var_name) != all_nodal.end())
321 else if (
std::find(all_elemental.begin(), all_elemental.end(), var_name) !=
324 else if (
std::find(all_scalar.begin(), all_scalar.end(), var_name) != all_scalar.end())
329 paramError(
"system_variables",
"Variable '" + var_name +
"' was not found in Exodus file");
337 for (
auto var_name : all_scalar)
358 const auto copy_solutions = [
this](
auto & io,
libMesh::System & system,
unsigned int index)
361 io.copy_nodal_solution(system, var_name, var_name, index);
364 io.copy_elemental_solution(system, var_name, var_name, index);
377 _es2 = std::make_unique<EquationSystems>(*_mesh);
420 mooseError(
"In SolutionUserObjectBase, timestep = ",
422 ", but there are only ",
448 mooseAssert(sys_node.n_dofs(sys_num, var_num) > 0,
449 "Variable " << var_name <<
" has no DoFs on node " << sys_node.id());
466 mooseAssert(sys_elem.n_dofs(sys_num, var_num) > 0,
467 "Variable " << var_name <<
" has no DoFs on element " << sys_elem.id());
510 const bool has_exodus_extension =
513 const bool has_nemesis_extension =
516 if (has_exodus_extension)
518 else if (has_nemesis_extension)
529 if (has_exodus_extension || has_nemesis_extension)
549 "In SolutionUserObjectBase, invalid file type: only .xda, .xdr, .exo and .e supported");
559 std::vector<unsigned int> var_nums;
565 for (
const auto & var_num : var_nums)
632 const auto update_solutions = [
this](
auto & io,
libMesh::System & system,
unsigned int index)
635 io.copy_nodal_solution(system, var_name, var_name, index);
637 io.copy_elemental_solution(system, var_name, var_name, index);
668 mooseError(
"getTimeInterpolationData only applicable for exodusII or Nemesis file type");
685 for (
int i = 0; i < num_exo_times - 1; ++i)
692 (solution_time - (*_exodus_times)[i]) / ((*
_exodus_times)[i + 1] - (*_exodus_times)[i]);
695 else if (i == num_exo_times - 2)
705 bool indices_modified(
false);
708 indices_modified =
true;
710 return indices_modified;
719 mooseError(
"Value requested for nonexistent variable '",
723 "' SolutionUserObjectBase.\nSystem selected: ",
725 "\nAvailable variables:\n",
733 const std::string & var_name,
735 const std::set<subdomain_id_type> * subdomain_ids)
const 747 if (weighting_type == 1 ||
749 return pointValue(t, p, var_name, subdomain_ids);
753 switch (weighting_type)
758 for (
auto & v : values)
760 return average /
Real(values.size());
766 for (
auto & v : values)
767 if (v.first->id() < smallest_elem_id)
769 smallest_elem_id = v.first->id();
770 smallest_elem_id_value = v.second;
772 return smallest_elem_id_value;
776 Real largest_elem_id_value = std::numeric_limits<Real>::lowest();
778 for (
auto & v : values)
779 if (v.first->id() > largest_elem_id)
781 largest_elem_id = v.first->id();
782 largest_elem_id_value = v.second;
784 return largest_elem_id_value;
788 mooseError(
"SolutionUserObjectBase::pointValueWrapper reaches line that it should not be able to " 796 const std::string & var_name,
797 const std::set<subdomain_id_type> * subdomain_ids)
const 800 return pointValue(t, p, local_var_index, subdomain_ids);
806 const unsigned int local_var_index,
807 const std::set<subdomain_id_type> * subdomain_ids)
const 837 "Time passed into value() must match time at last call to timestepSetup()");
845 std::map<const Elem *, Real>
849 const std::string & var_name,
850 const std::set<subdomain_id_type> * subdomain_ids)
const 856 std::map<const Elem *, Real>
858 Real libmesh_dbg_var(t),
860 const unsigned int local_var_index,
861 const std::set<subdomain_id_type> * subdomain_ids)
const 882 std::map<const Elem *, Real> map =
889 "Time passed into value() must match time at last call to timestepSetup()");
892 if (map.size() != map2.size())
894 "In SolutionUserObjectBase::discontinuousPointValue map and map2 have different size");
899 if (map2.find(k.first) == map2.end())
901 "In SolutionUserObjectBase::discontinuousPointValue map and map2 have differing keys");
903 Real val2 = map2[k.first];
915 const std::string & var_name,
917 const std::set<subdomain_id_type> * subdomain_ids)
const 920 if (weighting_type == 1)
924 std::map<const Elem *, RealGradient> values =
926 switch (weighting_type)
931 for (
auto & v : values)
933 return average /
Real(values.size());
939 for (
auto & v : values)
940 if (v.first->id() < smallest_elem_id)
942 smallest_elem_id = v.first->id();
943 smallest_elem_id_value = v.second;
945 return smallest_elem_id_value;
951 for (
auto & v : values)
952 if (v.first->id() > largest_elem_id)
954 largest_elem_id = v.first->id();
955 largest_elem_id_value = v.second;
957 return largest_elem_id_value;
961 mooseError(
"SolutionUserObjectBase::pointValueGradientWrapper reaches line that it should not be " 969 const std::string & var_name,
970 const std::set<subdomain_id_type> * subdomain_ids)
const 979 const unsigned int local_var_index,
980 const std::set<subdomain_id_type> * subdomain_ids)
const 1007 "Time passed into value() must match time at last call to timestepSetup()");
1015 std::map<const Elem *, RealGradient>
1019 const std::string & var_name,
1020 const std::set<subdomain_id_type> * subdomain_ids)
const 1026 std::map<const Elem *, RealGradient>
1028 Real libmesh_dbg_var(t),
1030 const unsigned int local_var_index,
1031 const std::set<subdomain_id_type> * subdomain_ids)
const 1052 std::map<const Elem *, RealGradient> map =
1059 "Time passed into value() must match time at last call to timestepSetup()");
1060 std::map<const Elem *, RealGradient> map2 =
1063 if (map.size() != map2.size())
1065 "In SolutionUserObjectBase::discontinuousPointValue map and map2 have different size");
1068 for (
auto & k : map)
1070 if (map2.find(k.first) == map2.end())
1072 "In SolutionUserObjectBase::discontinuousPointValue map and map2 have differing keys");
1085 Real val = (*_serialized_solution)(dof_index);
1088 Real val2 = (*_serialized_solution2)(dof_index);
1096 const unsigned int local_var_index,
1097 unsigned int func_num,
1098 const std::set<subdomain_id_type> * subdomain_ids)
const 1114 (*_mesh_function)(p, 0.0, output, subdomain_ids);
1123 else if (func_num == 2)
1130 (*_mesh_function2)(p, 0.0, output, subdomain_ids);
1143 if (output.
size() == 0)
1145 std::ostringstream oss;
1147 mooseError(
"Failed to access the data for variable '",
1153 "' SolutionUserObjectBase");
1155 return output(local_var_index);
1158 std::map<const Elem *, Real>
1161 const unsigned int local_var_index,
1162 unsigned int func_num,
1163 const std::set<subdomain_id_type> * subdomain_ids)
const 1166 std::map<const Elem *, DenseVector<Number>> temporary_output;
1172 _mesh_function->discontinuous_value(p, 0.0, temporary_output, subdomain_ids);
1175 else if (func_num == 2)
1176 _mesh_function2->discontinuous_value(p, 0.0, temporary_output, subdomain_ids);
1184 if (temporary_output.size() == 0)
1186 std::ostringstream oss;
1188 mooseError(
"Failed to access the data for variable '",
1194 "' SolutionUserObjectBase");
1198 std::map<const Elem *, Real> output;
1199 for (
auto & k : temporary_output)
1202 k.second.size() > local_var_index,
1203 "In SolutionUserObjectBase::evalMultiValuedMeshFunction variable with local_var_index " 1204 << local_var_index <<
" does not exist");
1205 output[k.first] = k.second(local_var_index);
1214 const unsigned int local_var_index,
1215 unsigned int func_num,
1216 const std::set<subdomain_id_type> * subdomain_ids)
const 1219 std::vector<Gradient> output;
1228 else if (func_num == 2)
1237 if (output.size() == 0)
1239 std::ostringstream oss;
1241 mooseError(
"Failed to access the data for variable '",
1247 "' SolutionUserObjectBase");
1249 return output[local_var_index];
1252 std::map<const Elem *, RealGradient>
1255 const unsigned int local_var_index,
1256 unsigned int func_num,
1257 const std::set<subdomain_id_type> * subdomain_ids)
const 1260 std::map<const Elem *, std::vector<Gradient>> temporary_output;
1266 _mesh_function->discontinuous_gradient(p, 0.0, temporary_output, subdomain_ids);
1269 else if (func_num == 2)
1270 _mesh_function2->discontinuous_gradient(p, 0.0, temporary_output, subdomain_ids);
1278 if (temporary_output.size() == 0)
1280 std::ostringstream oss;
1282 mooseError(
"Failed to access the data for variable '",
1288 "' SolutionUserObjectBase");
1292 std::map<const Elem *, RealGradient> output;
1293 for (
auto & k : temporary_output)
1296 k.second.size() > local_var_index,
1297 "In SolutionUserObjectBase::evalMultiValuedMeshFunction variable with local_var_index " 1298 << local_var_index <<
" does not exist");
1299 output[k.first] = k.second[local_var_index];
1305 const std::vector<std::string> &
1323 std::vector<dof_id_type> dofs;
1332 #ifdef LIBMESH_HAVE_EXODUS_API 1335 const auto & id_to_block = exio_helper->id_to_block_names;
1338 for (
const auto & it : id_to_block)
const THREAD_ID _tid
Thread ID of this postprocessor.
MultiMooseEnum _transformation_order
transformations (rotations, translation, scales) are performed in this order
void mooseInfo(Args &&... args) const
std::vector< std::string > _system_variables
A list of variables to extract from the read system.
static InputParameters validParams()
SolutionUserObjectBase(const InputParameters ¶meters)
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
std::unique_ptr< libMesh::MeshFunction > _mesh_function2
Pointer to second libMesh::MeshFuntion, used for interpolation.
const libMesh::FEType & feType() const
Get the type of finite element object.
std::unique_ptr< libMesh::EquationSystems > _es
Pointer to the libMesh::EquationSystems object.
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sin(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tan
const bool _force_replicated_source
Whether to force the source mesh to be replicated.
RealVectorValue _rotation0_vector
vector about which to rotate
const std::vector< Real > * _exodus_times
The times available in the ExodusII file.
virtual void initialSetup() override
Initialize the System and Mesh objects for the solution being read.
void updateTimeInterpolationFromFile()
Updates the times for interpolating ExodusII or Nemesis data.
virtual Real solutionSampleTime()=0
Get the time at which to sample the solution.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
static InputParameters validParams()
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 > 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 ...
bool updateInterpolationBracketingTimeIndices()
Updates the time indices to interpolate between for ExodusII or Nemesis data.
TypeTensor< T > transpose() const
std::unique_ptr< NumericVector< Number > > _serialized_solution2
Pointer to second serial solution, used for interpolation.
std::vector< Real > _scale
Scale parameter.
std::vector< Real > _translation
Translation.
Real _rotation1_angle
angle (in degrees) which to rotate through about vector _rotation1_vector
unsigned int size() const
Return the number of active items in the MultiMooseEnum.
virtual dof_id_type maxElemId() const
Real _rotation0_angle
angle (in degrees) which to rotate through about vector _rotation0_vector
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
MooseEnum getSolutionFileType() const
Get the type of file that was read.
void get_all_variable_numbers(std::vector< unsigned int > &all_variable_numbers) const
int _exodus_time_index
Current ExodusII time index.
std::unique_ptr< libMesh::ExodusII_IO > _exodusII_io
Pointer to the libMesh::ExodusII used to read the files.
Real _interpolation_time
Time in the current simulation at which the solution interpolation was last updated.
std::unique_ptr< libMesh::EquationSystems > _es2
Pointer to second libMesh::EquationSystems object, used for interpolation.
const Parallel::Communicator & _communicator
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...
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< NumericVector< Number > > _serialized_solution
Pointer to the serial solution vector.
Point _cached_p
Cached points.
bool _initialized
True if initial_setup has executed.
std::unique_ptr< libMesh::Nemesis_IO > _nemesis_io
Pointer to the libMesh::Nemesis_IO used to read the files.
const MeshBase & get_mesh() const
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
dof_id_type n_dofs() const
std::map< SubdomainName, SubdomainID > _block_name_to_id
Map from block ID to block names. Read from the ExodusII file.
void SCALAR_dof_indices(std::vector< dof_id_type > &di, const unsigned int vn, const bool old_dofs=false) const
auto max(const L &left, const R &right)
unsigned int variable_number(std::string_view var) const
virtual void timestepSetup() override
When reading ExodusII files, this will update the interpolation times.
DenseVector< Number > _cached_values2
virtual void execute() override
Execute method.
DenseVector< Number > _cached_values
Cached values.
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer the libMesh::mesh object.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
libMesh::System * _system
Pointer libMesh::System class storing the read solution.
unsigned int number() const
RealVectorValue _rotation1_vector
vector about which to rotate
const std::string & name() const
Get the name of the class.
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cos(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cos
std::string formatString(std::string message, const std::string &prefix)
Add new lines and prefixes to a string for pretty display in output NOTE: This makes a copy of the st...
std::string _mesh_file
The XDA/ExodusII/XDR/Nemesis file that is being read.
std::unique_ptr< NumericVector< Number > > solution
std::vector< std::string > _scalar_variables
Stores names of scalar variables.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
RealTensorValue _r1
Rotation matrix that performs the "_rotation1_angle about rotation1_vector".
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
const std::string & variable_name(const unsigned int i) const
std::string stringify(const T &t)
conversion to string
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
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. ...
Real scalarValue(Real t, const std::string &var_name) const
Returns a value of a global variable.
const MooseEnum _nodal_variable_order
Nodal variable order, used when reading in solution data.
libMesh::System * _system2
Pointer to a second libMesh::System object, used for interpolation.
GenericRealTensorValue< is_ad > rotVecToZ(GenericRealVectorValue< is_ad > vec)
provides a rotation matrix that will rotate the vector vec to the z axis (the "2" direction) ...
bool hasExtension(const std::string &filename, std::string ext, bool strip_exodus_ext)
Real directValue(const Node *node, const std::string &var_name) const
Return a value directly from a Node.
void readBlockIdMapFromExodusII()
Read block ID map from the ExodusII file.
const std::vector< std::string > & variableNames() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool isVariableNodal(const std::string &var_name) const
std::map< std::string, unsigned int > _local_variable_index
Stores the local index need by MeshFunction.
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 pointValueWrapper(Real t, const Point &p, const std::string &var_name, const MooseEnum &weighting_type=weightingType(), const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns a value at a specific location and variable checking for multiple values and weighting these ...
int _exodus_index1
Time index 1, used for interpolation.
virtual const Elem & elem_ref(const dof_id_type i) const
std::vector< std::string > _nodal_variables
Stores names of nodal variables.
std::string _es_file
The XDA/XDR file that contians the EquationSystems data (xda/xdr only)
IntRange< T > make_range(T beg, T end)
virtual MooseMesh & mesh() override
static std::unique_ptr< NumericVector< Number > > build(const Parallel::Communicator &comm, SolverPackage solver_package=libMesh::default_solver_package(), ParallelType parallel_type=AUTOMATIC)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
RealTensorValue _r0
Rotation matrix that performs the "_rotation0_angle about rotation0_vector".
virtual unsigned int size() const override final
std::vector< std::string > _elemental_variables
Stores names of elemental variables.
virtual const Node & node_ref(const dof_id_type i) const
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
void readExodusIIOrNemesis()
Method for reading an ExodusII or Nemesis file, which is called when a mesh file with a ...
MooseEnum _file_type
File type to read (0 = xda; 1 = ExodusII, 2 = xdr, 3 = Nemesis)
libMesh::RealGradient pointValueGradientWrapper(Real t, const Point &p, const std::string &var_name, const MooseEnum &weighting_type=weightingType(), const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Returns the gradient at a specific location and variable checking for multiple values and weighting t...
std::vector< Real > _scale_multiplier
scale_multiplier parameter
std::unique_ptr< libMesh::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 bool isDistributedMesh() const
Returns the final Mesh distribution type.
bool checkFileReadable(const std::string &filename, bool check_line_endings, bool throw_on_unreadable, bool check_for_git_lfs_pointer)
std::string _system_name
The system name to extract from the XDA/XDR file (xda/xdr only)
const DofMap & get_dof_map() const
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
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...
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)
unsigned int getLocalVarIndex(const std::string &var_name) const
Returns the local index for a given variable name.
int _exodus_index2
Time index 2, used for interpolation.
Real _interpolation_factor
Interpolation weight factor.
std::map< SubdomainID, SubdomainName > _block_id_to_name
Map from block names to block IDs. Read from the ExodusII file.
virtual void finalize() override
Finalize.
std::set< subdomain_id_type > _cached_subdomain_ids2
libMesh::RealGradient pointValueGradient(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 (see SolutionFunction)
std::set< subdomain_id_type > _cached_subdomain_ids
Cached subdomain ids.