An open source method of characteristics neutron transport code.
|
A Universe represents an unbounded space in 3D. More...
#include "src/Universe.h"
Public Member Functions | |
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... | |
Cell * | getCell (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... | |
Cell * | findCell (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. | |
virtual std::string | toString () |
Convert the member attributes of this Universe to a character array. More... | |
void | printString () |
Prints a string representation of the Universe's attributes to the console. | |
Universe * | clone () |
Clones this Universe and copy cells map. More... | |
Protected Attributes | |
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 | |
static int | _n = 0 |
A Universe represents an unbounded space in 3D.
A Universe contains cell which are bounded subspaces in 3D which together form the Universe. Universes allow for complex, repeating (i.e. lattices) geometries to be simply represented with as few data structures as possible.
Universe::Universe | ( | const int | id = -1 , |
const char * | name = "" |
||
) |
void Universe::addCell | ( | Cell * | cell | ) |
Universe * Universe::clone | ( | ) |
bool Universe::containsPoint | ( | Point * | point | ) |
Cell * Universe::findCell | ( | LocalCoords * | coords | ) |
Finds the Cell for which a LocalCoords object resides.
Finds the Cell that a LocalCoords object is located inside by checking each of this Universe's Cells. Returns NULL if the LocalCoords is not in any of the Cells.
coords | a pointer to the LocalCoords of interest |
std::map< int, Cell * > Universe::getAllCells | ( | ) |
std::map< int, Material * > Universe::getAllMaterials | ( | ) |
std::map< int, Universe * > Universe::getAllUniverses | ( | ) |
Cell * Universe::getCell | ( | int | cell_id | ) |
Returns a Cell in this universe.
cell_id | the integer the cell_id |
std::map< int, Cell * > Universe::getCells | ( | ) | const |
int Universe::getId | ( | ) | const |
double Universe::getMaxX | ( | ) |
Returns the maximum reachable x-coordinate in the Universe.
boundaryType Universe::getMaxXBoundaryType | ( | ) |
Returns the boundary conditions (VACUUM or REFLECTIVE) at the maximum reachable x-coordinate in the Universe.
double Universe::getMaxY | ( | ) |
Returns the maximum reachable y-coordinate in the Universe.
boundaryType Universe::getMaxYBoundaryType | ( | ) |
Returns the boundary conditions (VACUUM or REFLECTIVE) at the maximum reachable y-coordinate in the Universe.
double Universe::getMaxZ | ( | ) |
Returns the maximum reachable z-coordinate in the Universe.
boundaryType Universe::getMaxZBoundaryType | ( | ) |
Returns the boundary conditions (VACUUM or REFLECTIVE) at the maximum reachable z-coordinate in the Universe.
double Universe::getMinX | ( | ) |
Returns the minimum reachable x-coordinate in the Universe.
boundaryType Universe::getMinXBoundaryType | ( | ) |
Returns the boundary conditions (VACUUM or REFLECTIVE) at the minimum reachable x-coordinate in the Universe.
double Universe::getMinY | ( | ) |
Returns the minimum reachable y-coordinate in the Universe.
boundaryType Universe::getMinYBoundaryType | ( | ) |
Returns the boundary conditions (VACUUM or REFLECTIVE) at the minimum reachable y-coordinate in the Universe.
double Universe::getMinZ | ( | ) |
Returns the minimum reachable z-coordinate in the Universe.
boundaryType Universe::getMinZBoundaryType | ( | ) |
Returns the boundary conditions (VACUUM or REFLECTIVE) at the minimum reachable z-coordinate in the Universe.
char * Universe::getName | ( | ) | const |
int Universe::getNumCells | ( | ) | const |
Return the number of Cells in this Universe.
universeType Universe::getType | ( | ) |
bool Universe::isFissionable | ( | ) |
Returns true if the Universe contains a Cell filled by a fissionable Material and false otherwise.
This method should not be called prior to the calling of the Geometry::computeFissionability() method.
void Universe::removeCell | ( | Cell * | cell | ) |
void Universe::setFissionability | ( | bool | fissionable | ) |
Sets whether or not this Universe contains a fissionable Material with a non-zero fission cross-section.
This method is called by the Geometry::computeFissionability() class method.
void Universe::setName | ( | const char * | name | ) |
void Universe::setType | ( | universeType | type | ) |
void Universe::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.
max_radius | the maximum allowable radius used in the subdivisions |
|
virtual |
|
protected |
A flag for determining if boundaries are up to date
|
protected |
|
protected |
|
protected |
A user-defined id for each Universe created
|
protected |
The extrema of the Universe
|
protected |
The boundaryTypes of the universe
|
staticprotected |
A static counter for the number of Universes
|
protected |
A user-defined name for the Surface
|
protected |
The type of Universe (ie, SIMPLE or LATTICE)
|
protected |
A monotonically increasing unique ID for each Universe created