www.mooseframework.org
Classes | Namespaces | Functions
SolutionUserObject.h File Reference

Go to the source code of this file.

Classes

class  libMesh::NumericVector< T >
 
class  SolutionUserObject
 User object that reads an existing solution from an input file and uses it in the current simulation. More...
 

Namespaces

 libMesh
 The following methods are specializations for using the libMesh::Parallel::packed_range_* routines for std::strings.
 

Functions

template<>
InputParameters validParams< SolutionUserObject > ()
 

Function Documentation

Definition at line 35 of file SolutionUserObject.C.

36 {
37  // Get the input parameters from the parent class
39 
40  // Add required parameters
41  params.addRequiredParam<MeshFileName>(
42  "mesh", "The name of the mesh file (must be xda or exodusII file).");
43  params.addParam<std::vector<std::string>>(
44  "system_variables",
45  std::vector<std::string>(),
46  "The name of the nodal and elemental variables from the file you want to use for values");
47 
48  // When using XDA files the following must be defined
49  params.addParam<FileName>(
50  "es",
51  "<not supplied>",
52  "The name of the file holding the equation system info in xda format (xda only).");
53  params.addParam<std::string>(
54  "system", "nl0", "The name of the system to pull values out of (xda only).");
55 
56  // When using ExodusII a specific time is extracted
57  params.addParam<std::string>("timestep",
58  "Index of the single timestep used or \"LATEST\" for "
59  "the last timestep (exodusII only). If not supplied, "
60  "time interpolation will occur.");
61 
62  // Add ability to perform coordinate transformation: scale, factor
63  params.addParam<std::vector<Real>>(
64  "scale", std::vector<Real>(LIBMESH_DIM, 1), "Scale factor for points in the simulation");
65  params.addParam<std::vector<Real>>("scale_multiplier",
66  std::vector<Real>(LIBMESH_DIM, 1),
67  "Scale multiplying factor for points in the simulation");
68  params.addParam<std::vector<Real>>("translation",
69  std::vector<Real>(LIBMESH_DIM, 0),
70  "Translation factors for x,y,z coordinates of the simulation");
71  params.addParam<RealVectorValue>("rotation0_vector",
72  RealVectorValue(0, 0, 1),
73  "Vector about which to rotate points of the simulation.");
74  params.addParam<Real>(
75  "rotation0_angle",
76  0.0,
77  "Anticlockwise rotation angle (in degrees) to use for rotation about rotation0_vector.");
78  params.addParam<RealVectorValue>("rotation1_vector",
79  RealVectorValue(0, 0, 1),
80  "Vector about which to rotate points of the simulation.");
81  params.addParam<Real>(
82  "rotation1_angle",
83  0.0,
84  "Anticlockwise rotation angle (in degrees) to use for rotation about rotation1_vector.");
85 
86  // following lines build the default_transformation_order
87  MultiMooseEnum default_transformation_order(
88  "rotation0 translation scale rotation1 scale_multiplier", "translation scale");
89  params.addParam<MultiMooseEnum>(
90  "transformation_order",
91  default_transformation_order,
92  "The order to perform the operations in. Define R0 to be the rotation matrix encoded by "
93  "rotation0_vector and rotation0_angle. Similarly for R1. Denote the scale by s, the "
94  "scale_multiplier by m, and the translation by t. Then, given a point x in the simulation, "
95  "if transformation_order = 'rotation0 scale_multiplier translation scale rotation1' then "
96  "form p = R1*(R0*x*m - t)/s. Then the values provided by the SolutionUserObject at point x "
97  "in the simulation are the variable values at point p in the mesh.");
98  params.addClassDescription("Reads a variable from a mesh in one simulation to another");
99  // Return the parameters
100  return params;
101 }
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< GeneralUserObject >()
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...