An open source method of characteristics neutron transport code.
Mesh.h
Go to the documentation of this file.
1 
8 #ifndef MESH_H
9 #define MESH_H
10 
11 #include "Universe.h"
12 #include "Solver.h"
13 #include "Geometry.h"
14 
15 
16 /* A Vector3D is simply a 3-dimensional std::vector of floats */
17 typedef std::vector<std::vector<std::vector<FP_PRECISION> > > Vector3D;
18 
23 enum RxType {
24 
25  FISSION_RX,
26 
27  NUFISSION_RX,
28 
29  TOTAL_RX,
30 
31  ABSORPTION_RX,
32 
33  FLUX_RX
34 };
35 
36 
42 class Mesh {
43 
44  /* The solver from which scalar fluxes and cross-sections are extracted */
45  Solver* _solver;
46 
47  /* The lattice defining the zones across which reaction rates are tallied */
48  Lattice* _lattice;
49 
50  /* A flag indicating whether a lattice has been allocated internally */
51  bool _lattice_allocated;
52 
53 public:
54 
55  Mesh(Solver* solver, Lattice* lattice=NULL);
56  virtual ~Mesh();
57 
58  void createLattice(int num_x, int num_y, int num_z=1);
59  void setLattice(Lattice* lattice);
60  std::vector<FP_PRECISION> getReactionRates(RxType rx,
61  bool volume_average=false);
62  Vector3D getFormattedReactionRates(RxType rx, bool volume_average=false);
63  Vector3D getNonUniformFormattedReactionRates(std::vector<std::vector<double> >
64  widths_offsets, RxType rx,
65  bool volume_average=false);
66 
67 
68 };
69 
70 #endif
Mesh(Solver *solver, Lattice *lattice=NULL)
The Mesh constructor.
Definition: Mesh.cpp:12
Vector3D getFormattedReactionRates(RxType rx, bool volume_average=false)
Tallies reaction rates of the given type over the Mesh lattice.
Definition: Mesh.cpp:204
A Mesh is a lattice overlaid on the Geometry across which reaction rates can be tallied from converge...
Definition: Mesh.h:42
Vector3D getNonUniformFormattedReactionRates(std::vector< std::vector< double > > widths_offsets, RxType rx, bool volume_average=false)
Tallies reaction rates of the given type over the user defined non-uniform lattice.
Definition: Mesh.cpp:243
void setLattice(Lattice *lattice)
Set the _lattice of a mesh to be an existing one, for which the user inputs the dimensions.
Definition: Mesh.cpp:75
RxType
The type of reaction to be tallied.
Definition: Mesh.h:23
std::vector< FP_PRECISION > getReactionRates(RxType rx, bool volume_average=false)
Tallies reaction rates of the given type over the Mesh lattice.
Definition: Mesh.cpp:91
The Universe class.
The Solver class.
This is an abstract base class which different Solver subclasses implement for different architecture...
Definition: Solver.h:121
Represents a repeating 3D Lattice of Universes.
Definition: Universe.h:156
void createLattice(int num_x, int num_y, int num_z=1)
Creates an internal lattice over which to tally reaction rates with the user-input dimensions...
Definition: Mesh.cpp:36
The Geometry class.
virtual ~Mesh()
The Mesh destructor deletes its lattice if the lattice was allocated internally.
Definition: Mesh.cpp:23