97 double _rotation_matrix[9];
103 double _translation[3];
115 std::vector<Cell*> _neighbors;
117 void ringify(std::vector<Cell*>& subcells,
double max_radius);
118 void sectorize(std::vector<Cell*>& subcells);
121 Cell(
int id=0,
const char* name=
"");
134 double getPhi(std::string units=
"degrees");
135 double getTheta(std::string units=
"degrees");
136 double getPsi(std::string units=
"degrees");
140 std::string units=
"degrees");
168 void setName(
const char* name);
176 void setRotation(
double* rotation,
int num_axes, std::string units=
"degrees");
Material * getFillMaterial()
Return a pointer to the Material filling this Cell.
Definition: Cell.cpp:154
void setFill(Material *fill)
Sets the Material filling this Cell.
Definition: Cell.cpp:830
void setNumSectors(int num_sectors)
Set the Cell's number of sectors.
Definition: Cell.cpp:1021
double * getTranslation()
Return pointer to array for the translations along x, y and z.
Definition: Cell.cpp:332
Represents a Cell inside of a Universe.
Definition: Cell.h:56
The LocalCoords represents a set of local coordinates on some level of nested Universes making up the...
Definition: LocalCoords.h:46
int getUid() const
Return the Cell's unique ID.
Definition: Cell.cpp:118
double getPhi(std::string units="degrees")
Get the rotation angle about the x-axis in degrees.
Definition: Cell.cpp:228
int cell_id()
Returns an auto-generated unique Cell ID.
Definition: Cell.cpp:20
Region * getRegion()
Return the Cell's Region, its spatial domain.
Definition: Cell.cpp:178
double getMaxX()
Return the maximum reachable x-coordinate in the Cell.
Definition: Cell.cpp:409
Represents a general Surface in 3D.
Definition: Surface.h:70
void setTranslation(double *translation, int num_axes)
Set the Cell's translation along the x, y and z axes.
Definition: Cell.cpp:983
Cell * getParent()
Return this Cell's parent Cell.
Definition: Cell.cpp:725
double getMaxY()
Return the maximum reachable y-coordinate in the Cell.
Definition: Cell.cpp:461
boundaryType getMinXBoundaryType()
Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the minimum reachable x-coordinat...
Definition: Cell.cpp:540
boundaryType
The types of boundary conditions supported by OpenMOC for Surfaces.
Definition: boundary_type.h:15
void removeSurface(Surface *surface)
Removes a Surface from this Cell's container of bounding Surfaces.
Definition: Cell.cpp:1099
void addLogicalNode(int region_type)
Insert a logical node (intersection or union) into the cell region.
Definition: Cell.cpp:1117
int getNumInstances()
Return the number of instances of this Cell in the Geometry.
Definition: Cell.cpp:209
double getTheta(std::string units="degrees")
Get the rotation angle about the y-axis in degrees.
Definition: Cell.cpp:248
void incrementNumInstances()
Increment the number of instances of this Cell.
Definition: Cell.cpp:961
A Universe represents an unbounded space in 3D.
Definition: Universe.h:58
int getNumZCylinders()
Obtain and return the number of ZCylinders in the cell's surfaces.
Definition: Cell.cpp:1696
bool isFissionable()
Returns true if this Cell is filled with a fissionable Material.
Definition: Cell.cpp:1269
Cell(int id=0, const char *name="")
Constructor sets the unique and user-specifed IDs for this Cell.
Definition: Cell.cpp:59
void setName(const char *name)
Sets the name of the Cell.
Definition: Cell.cpp:811
boundaryType getMinYBoundaryType()
Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the minimum reachable y-coordinat...
Definition: Cell.cpp:586
void addSurface(int halfspace, Surface *surface)
Insert a Surface into this Cell's bounding Region, assuming that an intersection between the region a...
Definition: Cell.cpp:1052
double * getRotationMatrix()
Return pointer to array for the rotation matrix.
Definition: Cell.cpp:287
Class to represent a 2D/3D point in space.
Definition: Point.h:24
Cell * clone(bool clone_region=true)
Create a duplicate of the Cell.
Definition: Cell.cpp:1284
void printString()
Prints a string representation of all of the Cell's attributes to the console.
Definition: Cell.cpp:1687
bool isRotated()
Return a boolean indicating whether the Cell has been rotated.
Definition: Cell.cpp:198
A region of space that can be assigned to a Cell.
Definition: Region.h:43
std::map< int, Cell * > getAllCells()
Returns the std::map of Cell IDs and Cell pointers within any nested Universes filling this Cell...
Definition: Cell.cpp:762
boundaryType getMinZBoundaryType()
Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the minimum reachable z-coordinat...
Definition: Cell.cpp:632
cellType getType() const
Return the Cell type (FILL or MATERIAL).
Definition: Cell.cpp:145
void addNeighborCell(Cell *cell)
Add a neighboring Cell to this Cell's collection of neighbors.
Definition: Cell.cpp:1171
void setParent(Cell *parent)
Assign a parent Cell to this Cell.
Definition: Cell.cpp:1041
Cell * getOldestAncestor()
Get the oldest ancestor Cell for this Cell.
Definition: Cell.cpp:738
char * getName() const
Return the user-defined name of the Cell.
Definition: Cell.cpp:136
void retrieveRotation(double *rotations, int num_axes, std::string units="degrees")
Fills an array with the rotation angles for x, y and z.
Definition: Cell.cpp:307
void reset_cell_id()
Resets the auto-generated unique Cell ID counter to 1,000,000.
Definition: Cell.cpp:34
std::string toString()
Convert this Cell's attributes to a string format.
Definition: Cell.cpp:1640
bool hasParent()
Return true if the Cell has a parent and false otherwise.
Definition: Cell.cpp:711
void setVolume(double volume)
Set the volume/area of the Cell.
Definition: Cell.cpp:862
Universe * getFillUniverse()
Return a pointer to the Material filling this Cell.
Definition: Cell.cpp:166
int getNumRings()
Return the number of rings in the Cell.
Definition: Cell.cpp:365
virtual ~Cell()
Destructor clears vector of Surface pointers bounding the Cell.
Definition: Cell.cpp:101
void setRotation(double *rotation, int num_axes, std::string units="degrees")
Set the Cell's rotation angles about the x, y and z axes.
Definition: Cell.cpp:906
bool containsCoords(LocalCoords *coords)
Determines whether a Point is contained inside a Cell.
Definition: Cell.cpp:1218
void maximize_cell_id(int cell_id)
Maximize the auto-generated unique Cell ID counter.
Definition: Cell.cpp:48
double getMinY()
Return the minimum reachable y-coordinate in the Cell.
Definition: Cell.cpp:435
boundaryType getMaxYBoundaryType()
Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the maximum reachable y-coordinat...
Definition: Cell.cpp:609
int getId() const
Return the Cell's user-specified ID.
Definition: Cell.cpp:127
double minSurfaceDist(Point *point, double azim, double polar)
Computes the minimum distance to a Surface from a Point with a given trajectory at a certain angle...
Definition: Cell.cpp:1252
bool isTranslated()
Return a boolean indicating whether the Cell has been translated.
Definition: Cell.cpp:218
The Material class represents a unique material and its relevant nuclear data (i.e., multigroup cross-sections) for neutron transport.
Definition: Material.h:51
bool containsPoint(Point *point)
Determines whether a Point is contained inside a Cell.
Definition: Cell.cpp:1187
boundaryType getMaxZBoundaryType()
Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the maximum reachable z-coordinat...
Definition: Cell.cpp:655
void goUpOneRegionLogical()
Climb up the logical tree of regions.
Definition: Cell.cpp:1162
double getMinX()
Return the minimum reachable x-coordinate in the Cell.
Definition: Cell.cpp:383
void buildNeighbors()
Build a collection of neighboring Cells for optimized ray tracing.
Definition: Cell.cpp:1611
double getVolume()
Return the aggregate volume/area of all instances of this Cell.
Definition: Cell.cpp:189
double getMinZ()
Return the minimum reachable z-coordinate in the Cell.
Definition: Cell.cpp:487
void setNumInstances(int num_instances)
Set the number of instances of this Cell.
Definition: Cell.cpp:882
void setNumRings(int num_rings)
Set the Cell's number of rings.
Definition: Cell.cpp:1005
void addSurfaceInRegion(int halfspace, Surface *surface)
Insert a Surface into this Cell's bounding Region.
Definition: Cell.cpp:1081
boundaryType getMaxXBoundaryType()
Return the boundary condition (REFLECTIVE, VACUUM, or INTERFACE) at the maximum reachable x-coordinat...
Definition: Cell.cpp:563
void subdivideCell(double max_radius)
Subdivides a Cell into rings and sectors aligned with the z-axis.
Definition: Cell.cpp:1583
void incrementVolume(double volume)
Increment the volume/area of the Cell by some amount.
Definition: Cell.cpp:873
void retrieveTranslation(double *translations, int num_axes)
Fills an array with the translations along x, y and z.
Definition: Cell.cpp:351
int getNumSectors()
Return the number of sectors in the Cell.
Definition: Cell.cpp:374
A positive or negative halfspace Region.
Definition: Region.h:129
double getPsi(std::string units="degrees")
Get the rotation angle about the z-axis in degrees.
Definition: Cell.cpp:268
std::map< int, Halfspace * > getSurfaces() const
Return the std::map of Halfspace object pointers for all surfaces within the Region bounding the Cell...
Definition: Cell.cpp:690
std::vector< Cell * > getNeighbors() const
Return the std::vector of neighbor Cells to this Cell.
Definition: Cell.cpp:702
std::map< int, Universe * > getAllUniverses()
Returns the std::map of all nested Universe IDs and Universe pointers filling this Cell...
Definition: Cell.cpp:787
cellType
The type of cell.
Definition: Cell.h:39
void setRegion(Region *region)
Sets the Region this Cell lives in.
Definition: Cell.cpp:853
int getNumSurfaces() const
Return the number of Surfaces in the Cell.
Definition: Cell.cpp:677
double getMaxZ()
Return the maximum reachable z-coordinate in the Cell.
Definition: Cell.cpp:513