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

Represents a repeating 3D Lattice of Universes. More...

#include "src/Universe.h"

Public Member Functions

 Lattice (const int id=-1, const char *name="")
 Constructor sets the user-specified and unique IDs for this Lattice. More...
 
virtual ~Lattice ()
 Destructor clears memory for all of Universes pointers.
 
void setOffset (double x, double y, double z=0.0)
 Set the offset in global coordinates for this Lattice. More...
 
PointgetOffset ()
 Return a pointer to the offset for this Cell (in global coordinates). More...
 
int getNumX () const
 Return the number of Lattice cells along the x-axis. More...
 
int getNumY () const
 Return the number of Lattice cells along the y-axis. More...
 
int getNumZ () const
 Return the number of Lattice cells along the z-axis. More...
 
double getWidthX () const
 Return the width of the Lattice along the x-axis. More...
 
double getWidthY () const
 Return the width of the Lattice along the y-axis. More...
 
double getWidthZ () const
 Return the width of the Lattice along the z-axis. More...
 
bool getNonUniform () const
 Return the non-uniform boolean of Lattice. More...
 
const std::vector< double > & getWidthsX () const
 Return the widths of non-uniform Lattice in x direction. More...
 
const std::vector< double > & getWidthsY () const
 Return the widths of non-uniform Lattice in y direction. More...
 
const std::vector< double > & getWidthsZ () const
 Return the widths of non-uniform Lattice in z direction. More...
 
const std::vector< double > & getAccumulateX () const
 Return the accumulate widths of non-uniform Lattice in x direction. More...
 
const std::vector< double > & getAccumulateY () const
 Return the accumulate widths of non-uniform Lattice in y direction. More...
 
const std::vector< double > & getAccumulateZ () const
 Return the accumulate widths of non-uniform Lattice in z direction. More...
 
double getMinX ()
 Returns the minimum reachable x-coordinate in the Lattice. More...
 
double getMaxX ()
 Returns the maximum reachable x-coordinate in the Lattice. More...
 
double getMinY ()
 Returns the minimum reachable y-coordinate in the Lattice. More...
 
double getMaxY ()
 Returns the maximum reachable y-coordinate in the Lattice. More...
 
double getMinZ ()
 Returns the minimum reachable z-coordinate in the Lattice. More...
 
double getMaxZ ()
 Returns the maximum reachable z-coordinate in the Lattice. More...
 
UniversegetUniverse (int lat_x, int lat_y, int lat_z=0) const
 Returns a pointer to the Universe within a specific Lattice cell. More...
 
std::vector< std::vector< std::vector< std::pair< int, Universe * > > > > * getUniverses ()
 Return a 3D vector of the Universes in the Lattice. More...
 
std::map< int, Universe * > getUniqueUniverses ()
 Aggregates a list (vector) of the IDs of all Universes within the FILL type Cells filling this Universe. More...
 
std::map< int, double > getUniqueRadius (std::map< int, Universe *> unique_universes)
 Get the maximum equivalent radius of each unique universes. Equivalent radius are computed as the diagonal length to the cell boundary. More...
 
std::map< int, Cell * > getAllCells ()
 Returns the std::map of Cell IDs and Cell pointers in this Lattice at all nested Universe levels. More...
 
std::map< int, Universe * > getAllUniverses ()
 Returns the std::map of all nested Universe IDs and Universe pointers filling this Lattice. More...
 
void setNumX (int num_x)
 Set the number of Lattice cells along the x-axis. More...
 
void setNumY (int num_y)
 Set the number of Lattice cells along the y-axis. More...
 
void setNumZ (int num_z)
 Set the number of Lattice cells along the z-axis. More...
 
void setWidth (double width_x, double width_y, double width_z=std::numeric_limits< double >::infinity())
 Set the width of each Lattice cell. More...
 
void setNonUniform (bool non_uniform)
 Set the non-uniform boolean of Lattice. More...
 
void setWidthsX (std::vector< double > widthsx)
 Set the widths of non-uniform Lattice in x direction. More...
 
void setWidthsY (std::vector< double > widthsy)
 Set the widths of non-uniform Lattice in y direction. More...
 
void setWidthsZ (std::vector< double > widthsz)
 Set the widths of non-uniform Lattice in z direction. More...
 
void setAccumulateX (std::vector< double > accumulatex)
 Set the accumulate widths of non-uniform Lattice in x direction. More...
 
void setAccumulateY (std::vector< double > accumulatey)
 Set the accumulate widths of non-uniform Lattice in y direction. More...
 
void setAccumulateZ (std::vector< double > accumulatez)
 Set the accumulate widths of non-uniform Lattice in z direction. More...
 
void setUniverses (int num_z, int num_y, int num_x, Universe **universes)
 Sets the array of Universe pointers filling each Lattice cell. More...
 
void updateUniverse (int lat_x, int lat_y, int lat_z, Universe *universe)
 Update the Universe in a particular Lattice cell. More...
 
void removeUniverse (Universe *universe)
 Removes all references to a Universe from the Lattice. More...
 
void subdivideCells (double max_radius=INFINITY)
 Subdivides all of the Material-filled Cells within this Lattice into rings and angular sectors aligned with the z-axis. More...
 
void buildNeighbors ()
 Builds collections of neighboring Cells for all Cells in each Universe in the Lattice for optimized ray tracing.
 
bool containsPoint (Point *point)
 Checks if a Point is within the bounds of a Lattice. More...
 
CellfindCell (LocalCoords *coords)
 Finds the Cell within this Lattice that a LocalCoords is in. More...
 
double minSurfaceDist (Point *point, double azim, double polar=M_PI/2.0)
 Finds the distance to the nearest surface. More...
 
int getLatX (Point *point)
 Finds the Lattice cell x index that a point lies in. More...
 
int getLatY (Point *point)
 Finds the Lattice cell y index that a point lies in. More...
 
int getLatZ (Point *point)
 Finds the Lattice cell z index that a point lies in. More...
 
int getLatticeCell (Point *point)
 Finds the Lattice cell index that a point lies in. More...
 
int getLatticeSurface (int cell, Point *point)
 Finds the Lattice cell surface that a point lies on. If the point is not on a surface, -1 is returned. More...
 
int getLatticeSurfaceOTF (int cell, double z, int surface_2D)
 Finds the Lattice cell surface that a point lies on. If the point is not on a surface, -1 is returned. More...
 
std::string toString ()
 Converts a Lattice's attributes to a character array representation. More...
 
void printString ()
 Prints a string representation of all of the Lattice's attributes to the console.
 
void setWidths (std::vector< double > widths_x, std::vector< double > widths_y, std::vector< double > widths_z)
 Set widths of non-uniform meshes in x y z directions. More...
 
void computeSizes ()
 Set _widths_x, _widths_y, _widths_z for uniform case, compute accumulate variables.
 
void printLatticeSizes ()
 For debug use.
 
- Public Member Functions inherited from Universe
 Universe (const int id=-1, const char *name="")
 Constructor assigns a unique and user-specified ID for the Universe. More...
 
virtual ~Universe ()
 Destructor clears the Cell pointers container.
 
int getUid () const
 Returns the Universe's unique ID. More...
 
int getId () const
 Return the user-specified ID for this Universe. More...
 
char * getName () const
 Return the user-defined name of the Universe. More...
 
universeType getType ()
 Return the Universe type (SIMPLE or LATTICE). More...
 
int getNumCells () const
 Return the number of Cells in this Universe. More...
 
double getMinX ()
 Returns the minimum reachable x-coordinate in the Universe. More...
 
double getMaxX ()
 Returns the maximum reachable x-coordinate in the Universe. More...
 
double getMinY ()
 Returns the minimum reachable y-coordinate in the Universe. More...
 
double getMaxY ()
 Returns the maximum reachable y-coordinate in the Universe. More...
 
double getMinZ ()
 Returns the minimum reachable z-coordinate in the Universe. More...
 
double getMaxZ ()
 Returns the maximum reachable z-coordinate in the Universe. More...
 
boundaryType getMinXBoundaryType ()
 Returns the boundary conditions (VACUUM or REFLECTIVE) at the minimum reachable x-coordinate in the Universe. More...
 
boundaryType getMaxXBoundaryType ()
 Returns the boundary conditions (VACUUM or REFLECTIVE) at the maximum reachable x-coordinate in the Universe. More...
 
boundaryType getMinYBoundaryType ()
 Returns the boundary conditions (VACUUM or REFLECTIVE) at the minimum reachable y-coordinate in the Universe. More...
 
boundaryType getMaxYBoundaryType ()
 Returns the boundary conditions (VACUUM or REFLECTIVE) at the maximum reachable y-coordinate in the Universe. More...
 
boundaryType getMinZBoundaryType ()
 Returns the boundary conditions (VACUUM or REFLECTIVE) at the minimum reachable z-coordinate in the Universe. More...
 
boundaryType getMaxZBoundaryType ()
 Returns the boundary conditions (VACUUM or REFLECTIVE) at the maximum reachable z-coordinate in the Universe. More...
 
CellgetCell (int cell_id)
 Returns a Cell in this universe. More...
 
std::map< int, Cell * > getCells () const
 Return the container of Cell IDs and Cell pointers in this Universe. More...
 
std::map< int, Cell * > getAllCells ()
 Returns the std::map of Cell IDs and Cell pointers in this Universe at all nested Universe levels. More...
 
std::map< int, Material * > getAllMaterials ()
 Returns the std::map of all IDs and Material pointers filling this Universe. More...
 
std::map< int, Universe * > getAllUniverses ()
 Returns the std::map of all nested Universe IDs and Universe pointers filling this Universe. More...
 
bool isFissionable ()
 Returns true if the Universe contains a Cell filled by a fissionable Material and false otherwise. More...
 
void resetBoundaries ()
 Sets _boundaries_not_updated to true so boundaries will be recalculated if needed.
 
void calculateBoundaries ()
 Calculates the boundary locations and conditions (VACUUM or REFLECTIVE) at the maximum and minimum reachable coordinates in the Universe.
 
void setName (const char *name)
 Sets the name of the Universe. More...
 
void setType (universeType type)
 Sets the Universe type to SIMPLE or LATTICE. More...
 
void addCell (Cell *cell)
 Adds a Cell to this Universe. More...
 
void removeCell (Cell *cell)
 Removes a Cell from this Universe's container of Cells. More...
 
bool containsPoint (Point *point)
 Determines whether a Point is contained inside a Universe. More...
 
CellfindCell (LocalCoords *coords)
 Finds the Cell for which a LocalCoords object resides. More...
 
void setFissionability (bool fissionable)
 Sets whether or not this Universe contains a fissionable Material with a non-zero fission cross-section. More...
 
void subdivideCells (double max_radius=INFINITY)
 Subdivides all of the Material-filled Cells within this Universe into rings and angular sectors aligned with the z-axis. More...
 
void buildNeighbors ()
 Builds collections of neighboring Cells for all Cells in this Universe for optimized ray tracing.
 
void printString ()
 Prints a string representation of the Universe's attributes to the console.
 
Universeclone ()
 Clones this Universe and copy cells map. More...
 

Additional Inherited Members

- Protected Attributes inherited from Universe
int _uid
 
int _id
 
char * _name
 
universeType _type
 
std::map< int, Cell * > _cells
 
bool _fissionable
 
double _min_x
 
double _max_x
 
double _min_y
 
double _max_y
 
double _min_z
 
double _max_z
 
bool _boundaries_inspected
 
boundaryType _min_x_bound
 
boundaryType _max_x_bound
 
boundaryType _min_y_bound
 
boundaryType _max_y_bound
 
boundaryType _min_z_bound
 
boundaryType _max_z_bound
 
- Static Protected Attributes inherited from Universe
static int _n = 0
 

Detailed Description

Represents a repeating 3D Lattice of Universes.

Constructor & Destructor Documentation

◆ Lattice()

Lattice::Lattice ( const int  id = -1,
const char *  name = "" 
)

Constructor sets the user-specified and unique IDs for this Lattice.

Parameters
idthe user-specified optional Lattice (Universe) ID
namethe user-specified optional Lattice (Universe) name

Member Function Documentation

◆ containsPoint()

bool Lattice::containsPoint ( Point point)

Checks if a Point is within the bounds of a Lattice.

Parameters
pointa pointer to the Point of interest
Returns
true if the Point is in the bounds, false if not

◆ findCell()

Cell * Lattice::findCell ( LocalCoords coords)

Finds the Cell within this Lattice that a LocalCoords is in.

This method first find the Lattice cell, then searches the Universe inside that Lattice cell. If LocalCoords is outside the bounds of the Lattice, this method will return NULL.

Parameters
coordsthe LocalCoords of interest. Coordinates of coords and lattice._offset share the same origin.
Returns
a pointer to the Cell this LocalCoord is in or NULL

◆ getAccumulateX()

const std::vector< double > & Lattice::getAccumulateX ( ) const

Return the accumulate widths of non-uniform Lattice in x direction.

Returns
the accumulated widths of non-uniform Lattice in x direction

◆ getAccumulateY()

const std::vector< double > & Lattice::getAccumulateY ( ) const

Return the accumulate widths of non-uniform Lattice in y direction.

Returns
the accumulated widths of non-uniform Lattice in y direction

◆ getAccumulateZ()

const std::vector< double > & Lattice::getAccumulateZ ( ) const

Return the accumulate widths of non-uniform Lattice in z direction.

Returns
the accumulated widths of non-uniform Lattice in z direction

◆ getAllCells()

std::map< int, Cell * > Lattice::getAllCells ( )

Returns the std::map of Cell IDs and Cell pointers in this Lattice at all nested Universe levels.

Returns
std::map of Cell IDs and pointers

◆ getAllUniverses()

std::map< int, Universe * > Lattice::getAllUniverses ( )

Returns the std::map of all nested Universe IDs and Universe pointers filling this Lattice.

Returns
std::map of Universe IDs and pointers

◆ getLatticeCell()

int Lattice::getLatticeCell ( Point point)

Finds the Lattice cell index that a point lies in.

Lattice cells are numbered starting with 0 in the lower left corner. Lattice cell IDs in all rows then increase monotonically from left to right. For example, the indices for a 4 x 4 lattice: 12 13 14 15 8 9 10 11 4 5 6 7 0 1 2 3

Parameters
pointa pointer to a point being evaluated.
Returns
the Lattice cell index.

◆ getLatticeSurface()

int Lattice::getLatticeSurface ( int  cell,
Point point 
)

Finds the Lattice cell surface that a point lies on. If the point is not on a surface, -1 is returned.

The surface indices for a lattice cell are 0 (left), 1, (bottom), 2 (right), 3 (top), 4 (bottom-left corner), 5 (bottom-right corner), 6 (top-right corner), and 7 (top-left corner). The index returned takes into account the cell index and returns 8*cell_index + surface_index.

Parameters
cellthe cell index that the point is in.
pointa pointer to a point being evaluated.
Returns
the Lattice surface index.

◆ getLatticeSurfaceOTF()

int Lattice::getLatticeSurfaceOTF ( int  cell,
double  z,
int  surface_2D 
)

Finds the Lattice cell surface that a point lies on. If the point is not on a surface, -1 is returned.

The surface indices are defined in constants.h as they need to be consistent with the surface constant definitions used in Cmfd. The index returned takes into account the cell index and returns NUM_SURFACES*cell_index + surface_index.

Parameters
cellthe cell index that the point is in
zz coordinate of the point
surface_2D2D surface considered
Returns
the Lattice surface index.

◆ getLatX()

int Lattice::getLatX ( Point point)

Finds the Lattice cell x index that a point lies in.

Parameters
pointa pointer to a point being evaluated.
Returns
the Lattice cell x index.

◆ getLatY()

int Lattice::getLatY ( Point point)

Finds the Lattice cell y index that a point lies in.

Parameters
pointa pointer to a point being evaluated.
Returns
the Lattice cell y index.

◆ getLatZ()

int Lattice::getLatZ ( Point point)

Finds the Lattice cell z index that a point lies in.

Parameters
pointa pointer to a point being evaluated.
Returns
the Lattice cell z index.

◆ getMaxX()

double Lattice::getMaxX ( )

Returns the maximum reachable x-coordinate in the Lattice.

Returns
the maximum reachable x-coordinate

◆ getMaxY()

double Lattice::getMaxY ( )

Returns the maximum reachable y-coordinate in the Lattice.

Returns
the maximum reachable y-coordinate

◆ getMaxZ()

double Lattice::getMaxZ ( )

Returns the maximum reachable z-coordinate in the Lattice.

Returns
the maximum reachable z-coordinate

◆ getMinX()

double Lattice::getMinX ( )

Returns the minimum reachable x-coordinate in the Lattice.

Returns
the minimum reachable x-coordinate

◆ getMinY()

double Lattice::getMinY ( )

Returns the minimum reachable y-coordinate in the Lattice.

Returns
the minimum reachable y-coordinate

◆ getMinZ()

double Lattice::getMinZ ( )

Returns the minimum reachable z-coordinate in the Lattice.

Returns
the minimum reachable z-coordinate

◆ getNonUniform()

bool Lattice::getNonUniform ( ) const

Return the non-uniform boolean of Lattice.

Returns
the non-uniform boolean of Lattice

◆ getNumX()

int Lattice::getNumX ( ) const

Return the number of Lattice cells along the x-axis.

Returns
the number of Lattice cells along x

◆ getNumY()

int Lattice::getNumY ( ) const

Return the number of Lattice cells along the y-axis.

Returns
the number of Lattice cells along y

◆ getNumZ()

int Lattice::getNumZ ( ) const

Return the number of Lattice cells along the z-axis.

Returns
the number of Lattice cells along z

◆ getOffset()

Point * Lattice::getOffset ( )

Return a pointer to the offset for this Cell (in global coordinates).

Returns
the offset of the Cell

◆ getUniqueRadius()

std::map< int, double > Lattice::getUniqueRadius ( std::map< int, Universe *>  unique_universes)

Get the maximum equivalent radius of each unique universes. Equivalent radius are computed as the diagonal length to the cell boundary.

Parameters
unique_universesThe unique universes of this Lattice
Returns
a map of unique radius keyed by the universe ID.

◆ getUniqueUniverses()

std::map< int, Universe * > Lattice::getUniqueUniverses ( )

Aggregates a list (vector) of the IDs of all Universes within the FILL type Cells filling this Universe.

Note that this method only searches the first level of Cells below this Universe within the nested Universe coordinate system.

Returns
a map of Universe keyed by the universe ID.

◆ getUniverse()

Universe * Lattice::getUniverse ( int  lat_x,
int  lat_y,
int  lat_z = 0 
) const

Returns a pointer to the Universe within a specific Lattice cell.

Parameters
lat_xthe x index to the Lattice cell
lat_ythe y index to the Lattice cell
lat_zthe z index to the Lattice cell
Returns
pointer to a Universe filling the Lattice cell

◆ getUniverses()

std::vector< std::vector< std::vector< std::pair< int, Universe * > > > > * Lattice::getUniverses ( )

Return a 3D vector of the Universes in the Lattice.

Returns
3D vector of Universes

◆ getWidthsX()

const std::vector< double > & Lattice::getWidthsX ( ) const

Return the widths of non-uniform Lattice in x direction.

Returns
the widths of non-uniform Lattice in x direction

◆ getWidthsY()

const std::vector< double > & Lattice::getWidthsY ( ) const

Return the widths of non-uniform Lattice in y direction.

Returns
the widths of non-uniform Lattice in y direction

◆ getWidthsZ()

const std::vector< double > & Lattice::getWidthsZ ( ) const

Return the widths of non-uniform Lattice in z direction.

Returns
the widths of non-uniform Lattice in z direction

◆ getWidthX()

double Lattice::getWidthX ( ) const

Return the width of the Lattice along the x-axis.

Returns
the width of the Lattice cells along x

◆ getWidthY()

double Lattice::getWidthY ( ) const

Return the width of the Lattice along the y-axis.

Returns
the width of the Lattice cells along y

◆ getWidthZ()

double Lattice::getWidthZ ( ) const

Return the width of the Lattice along the z-axis.

Returns
the width of the Lattice cells along z

◆ minSurfaceDist()

double Lattice::minSurfaceDist ( Point point,
double  azim,
double  polar = M_PI/2.0 
)

Finds the distance to the nearest surface.

Knowing that a Lattice must be cartesian, this function computes the distance to the nearest boundary between lattice cells in the direction of the track. Returns distance to nearest Lattice cell boundary.

Parameters
pointa pointer to a starting point
azimthe azimuthal angle of the track
polarthe polar angle of the track
Returns
the distance to the nearest Lattice cell boundary

◆ removeUniverse()

void Lattice::removeUniverse ( Universe universe)

Removes all references to a Universe from the Lattice.

Parameters
universethe Universe to remove

◆ setAccumulateX()

void Lattice::setAccumulateX ( std::vector< double >  accumulatex)

Set the accumulate widths of non-uniform Lattice in x direction.

Parameters
accumulatexthe accumulated widths of non-uniform Lattice in x direction

◆ setAccumulateY()

void Lattice::setAccumulateY ( std::vector< double >  accumulatey)

Set the accumulate widths of non-uniform Lattice in y direction.

Parameters
accumulateythe accumulated widths of non-uniform Lattice in y direction

◆ setAccumulateZ()

void Lattice::setAccumulateZ ( std::vector< double >  accumulatez)

Set the accumulate widths of non-uniform Lattice in z direction.

Parameters
accumulatezthe accumulated widths of non-uniform Lattice in z direction

◆ setNonUniform()

void Lattice::setNonUniform ( bool  non_uniform)

Set the non-uniform boolean of Lattice.

Parameters
non_uniformthe non-uniform boolean of Lattice

◆ setNumX()

void Lattice::setNumX ( int  num_x)

Set the number of Lattice cells along the x-axis.

Parameters
num_xthe number of Lattice cells along x

◆ setNumY()

void Lattice::setNumY ( int  num_y)

Set the number of Lattice cells along the y-axis.

Parameters
num_ythe number of Lattice cells along y

◆ setNumZ()

void Lattice::setNumZ ( int  num_z)

Set the number of Lattice cells along the z-axis.

Parameters
num_zthe number of Lattice cells along z

◆ setOffset()

void Lattice::setOffset ( double  x,
double  y,
double  z = 0.0 
)

Set the offset in global coordinates for this Lattice.

A lattice is assumed to be a rectilinear grid with the center/origin of the grid located in the center of the Lattice's parent universe. The offset represents the offset of the lattice center/origin with respect to the center of the parent universe. Therefore an offset of (-1,2,1) would move the center/origin of the lattice to the left 1 cm, forward 2 cm, and up 1 cm.

Parameters
xthe offset in the x direction
ythe offset in the y direction
zthe offset in the z direction

◆ setUniverses()

void Lattice::setUniverses ( int  num_z,
int  num_y,
int  num_x,
Universe **  universes 
)

Sets the array of Universe pointers filling each Lattice cell.

This is a helper method for SWIG to allow users to assign Universes to a Lattice using a 2D Python list (list of lists). An example how this method can be called from Python is as follows:

u1 = Universe(name='Universe 1')
u2 = Universe(name='Universe 2')
u3 = Universe(name='Universe 3')
lattice.setLatticeCells([[u1, u2, u1, u2],
[u2, u3, u2, u3],
[u1, u2, u1, u2],
[u2, u3, u2, u3]])
Parameters
num_zthe number of Lattice cells along z
num_ythe number of Lattice cells along y
num_xthe number of Lattice cells along x
universesthe array of Universes for each Lattice cell

◆ setWidth()

void Lattice::setWidth ( double  width_x,
double  width_y,
double  width_z = std::numeric_limits<double>::infinity() 
)

Set the width of each Lattice cell.

Parameters
width_xthe width along the x-axis in centimeters
width_ythe width along the y-axis in centimeters
width_zthe width along the z-axis in centimeters

◆ setWidths()

void Lattice::setWidths ( std::vector< double >  widths_x,
std::vector< double >  widths_y,
std::vector< double >  widths_z 
)

Set widths of non-uniform meshes in x y z directions.

An example of how this may be called from Python illustrated below:

Lattice::setWidths([1.0,2.1,3.0], [4.0,5.1,6.0,7.0], [3.3,2.4])
Parameters
widths_xx-direction widths of non-uniform meshes
widths_yy-direction widths of non-uniform meshes
widths_zz-direction widths of non-uniform meshes

◆ setWidthsX()

void Lattice::setWidthsX ( std::vector< double >  widthsx)

Set the widths of non-uniform Lattice in x direction.

Parameters
widthsxthe widths of non-uniform Lattice in x direction

◆ setWidthsY()

void Lattice::setWidthsY ( std::vector< double >  widthsy)

Set the widths of non-uniform Lattice in y direction.

Parameters
widthsythe widths of non-uniform Lattice in y direction

◆ setWidthsZ()

void Lattice::setWidthsZ ( std::vector< double >  widthsz)

Set the widths of non-uniform Lattice in z direction.

Parameters
widthszthe widths of non-uniform Lattice in z direction

◆ subdivideCells()

void Lattice::subdivideCells ( double  max_radius = INFINITY)

Subdivides all of the Material-filled Cells within this Lattice into rings and angular sectors aligned with the z-axis.

Parameters
max_radiusthe maximum allowable radius used in the subdivisions

◆ toString()

std::string Lattice::toString ( )
virtual

Converts a Lattice's attributes to a character array representation.

Returns
character array of this Lattice's attributes

Reimplemented from Universe.

◆ updateUniverse()

void Lattice::updateUniverse ( int  lat_x,
int  lat_y,
int  lat_z,
Universe universe 
)

Update the Universe in a particular Lattice cell.

This method may only be used after an array of Universes has been assigned with the Lattice::setUniverses(...) method.

Parameters
lat_xthe Lattice cell index along x
lat_ythe Lattice cell index along y
lat_zthe Lattice cell index along z
universethe Universe to insert into the Lattice

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