An open source method of characteristics neutron transport code.
Mesh Class Reference

A Mesh is a lattice overlaid on the Geometry across which reaction rates can be tallied from converged scalar fluxes in a Solver. More...

#include "src/Mesh.h"

Public Member Functions

 Mesh (Solver *solver, Lattice *lattice=NULL)
 The Mesh constructor. More...
 
virtual ~Mesh ()
 The Mesh destructor deletes its lattice if the lattice was allocated internally.
 
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. More...
 
void setLattice (Lattice *lattice)
 Set the _lattice of a mesh to be an existing one, for which the user inputs the dimensions. More...
 
std::vector< FP_PRECISION > getReactionRates (RxType rx, bool volume_average=false)
 Tallies reaction rates of the given type over the Mesh lattice. More...
 
Vector3D getFormattedReactionRates (RxType rx, bool volume_average=false)
 Tallies reaction rates of the given type over the Mesh lattice. More...
 
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. More...
 

Detailed Description

A Mesh is a lattice overlaid on the Geometry across which reaction rates can be tallied from converged scalar fluxes in a Solver.

Constructor & Destructor Documentation

◆ Mesh()

Mesh::Mesh ( Solver solver,
Lattice lattice = NULL 
)

The Mesh constructor.

If no lattice is given, a default lattice can be constructed with the Mesh::createLattice function.

Parameters
solverThe solver from which scalar fluxes and cross-sections are extracted
latticeAn optional parameter for the lattice across which reaction rates are tallied

Member Function Documentation

◆ createLattice()

void Mesh::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.

Parameters
num_xthe number of mesh cells in the x-direction
num_ythe number of mesh cells in the y-direction
num_zthe number of mesh cells in the z-direction

◆ getFormattedReactionRates()

Vector3D Mesh::getFormattedReactionRates ( RxType  rx,
bool  volume_average = false 
)

Tallies reaction rates of the given type over the Mesh lattice.

Parameters
rxThe type of reaction to tally
volume_averagewhether the reaction rates should be volume averaged
Returns
The reaction rates in a 3D vector indexed by the lattice cell x, y, and z indexes

◆ getNonUniformFormattedReactionRates()

Vector3D Mesh::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.

Parameters
widths_offsetsThe XYZ-direction widths and offset of a non-uniform Lattice. If the widths_offsets size is 3, the center-point of the geometry is used as the offset.
rxThe type of reaction to tally
volume_averagewhether to volume average results
Returns
The reaction rates in a 3D vector indexed by the lattice cell x, y, and z indexes

◆ getReactionRates()

std::vector< FP_PRECISION > Mesh::getReactionRates ( RxType  rx,
bool  volume_average = false 
)

Tallies reaction rates of the given type over the Mesh lattice.

Parameters
rxThe type of reaction to tally
volume_averagewhether the reaction rates should be volume averaged
Returns
The reaction rates in a 1D vector indexed by the lattice cell IDs

◆ setLattice()

void Mesh::setLattice ( Lattice lattice)

Set the _lattice of a mesh to be an existing one, for which the user inputs the dimensions.

Parameters
latticethe existing lattice to be set to the Mesh

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