CSGCell creates an internal representation of a Constructive Solid Geometry (CSG) cell, which represents a region of space filled by a material or void. More...
#include <CSGCell.h>
Public Member Functions | |
| CSGCell (const std::string &name, const CSGRegion ®ion) | |
| Constructor for void cell. More... | |
| CSGCell (const std::string &name, const std::string &mat_name, const CSGRegion ®ion) | |
| Constructor for Material Cell. More... | |
| CSGCell (const std::string &name, const CSGUniverse *univ, const CSGRegion ®ion) | |
| Constructor for Universe Cell. More... | |
| CSGCell (const std::string &name, const CSGLattice *lattice, const CSGRegion ®ion) | |
| Constructor for a Lattice Cell. More... | |
| virtual | ~CSGCell ()=default |
| Destructor. More... | |
| const std::string | getFillType () const |
| Get the type of fill for the cell. More... | |
| const CSGUniverse & | getFillUniverse () const |
| Get the cell fill if fill type is UNIVERSE. More... | |
| const std::string & | getFillMaterial () const |
| Get the cell fill material name if fill fype is CSG_MATERIAL. More... | |
| const CSGLattice & | getFillLattice () const |
| Get the cell fill if fill type is LATTICE. More... | |
| const std::string & | getFillName () const |
| Get the name of the fill, regardless of its type. More... | |
| const std::string & | getName () const |
| Get the cell name. More... | |
| const CSGRegion & | getRegion () const |
| Get the cell region. More... | |
| void | resetCellFill () |
| Reset the cell fill to void. More... | |
| void | updateCellFill (const std::string &mat_name) |
| Set the cell fill to a material name. More... | |
| void | updateCellFill (const CSGUniverse *univ) |
| Set the cell fill to a universe. More... | |
| void | updateCellFill (const CSGLattice *lattice) |
| Set the cell fill to a lattice. More... | |
| bool | operator== (const CSGCell &other) const |
| Operator overload for checking if two CSGCell objects are equal. More... | |
| bool | operator!= (const CSGCell &other) const |
| Operator overload for checking if two CSGCell objects are not equal. More... | |
| const std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > & | getTransformations () const |
| Get the list of transformations. More... | |
| std::vector< std::pair< std::string, std::tuple< Real, Real, Real > > > | getTransformationsAsStrings () const |
| Get the transformations of this object with string representations for types. More... | |
Static Public Member Functions | |
| static bool | isValidTransformationValue (TransformationType type, const std::tuple< Real, Real, Real > &values) |
| Check if the transformation value is valid for the given type. More... | |
| static std::string | getTransformationTypeString (TransformationType type) |
| Get the string representation of the transformation type. More... | |
Protected Member Functions | |
| void | updateCellRegionSurfaces (std::map< std::string, std::reference_wrapper< const CSGSurface >> &identical_surface_refs) |
| Update surface references of cell region based on map of input surface references. More... | |
| void | setName (const std::string &name) |
| void | updateRegion (const CSGRegion ®ion) |
| void | addTransformation (TransformationType type, const std::tuple< Real, Real, Real > &values) |
| Add a transformation to the list of transformations. More... | |
| Point | applyReverseTransformsToPoint (Point p) const |
| update the value of point p by applying the inverse of the list of transformations to the point More... | |
| FRIEND_TEST (CSGCellTest, testSetName) | |
| Friends for unit testing. More... | |
| FRIEND_TEST (CSGCellTest, testUpdateRegion) | |
| FRIEND_TEST (CSGCellTest, testCellEquality) | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithTransform) | |
| Friends for unit testing. More... | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithNullTransform) | |
Protected Attributes | |
| std::string | _name |
| Name of surface. More... | |
| MooseEnum | _fill_type {"VOID CSG_MATERIAL UNIVERSE LATTICE"} |
| An enum for type of fill for cell region. More... | |
| std::string | _fill_name |
| name of the fill object for CSG_MATERIAL fills More... | |
| CSGRegion | _region |
| Cell region, represented as a CSGRegion object. More... | |
| const CSGUniverse * | _fill_universe |
| Fill object if fill is CSGUniverse. More... | |
| const CSGLattice * | _fill_lattice |
| Fill object if fill is CSGLattice. More... | |
| std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > | _transformations |
| List of transformations applied to this object. More... | |
Friends | |
| class | CSGCellList |
| class | CSGBase |
CSGCell creates an internal representation of a Constructive Solid Geometry (CSG) cell, which represents a region of space filled by a material or void.
| CSG::CSGCell::CSGCell | ( | const std::string & | name, |
| const CSGRegion & | region | ||
| ) |
Constructor for void cell.
| name | name of cell |
| region | cell region |
Definition at line 18 of file CSGCell.C.
| CSG::CSGCell::CSGCell | ( | const std::string & | name, |
| const std::string & | mat_name, | ||
| const CSGRegion & | region | ||
| ) |
Constructor for Material Cell.
| name | name of cell |
| mat_name | name of the CSG material (not a MOOSE material) to use as the cell fill |
| region | cell region |
Definition at line 25 of file CSGCell.C.
| CSG::CSGCell::CSGCell | ( | const std::string & | name, |
| const CSGUniverse * | univ, | ||
| const CSGRegion & | region | ||
| ) |
Constructor for Universe Cell.
| name | name of cell |
| univ | universe to be the fill |
| region | cell region |
Definition at line 32 of file CSGCell.C.
| CSG::CSGCell::CSGCell | ( | const std::string & | name, |
| const CSGLattice * | lattice, | ||
| const CSGRegion & | region | ||
| ) |
Constructor for a Lattice Cell.
| name | name of cell |
| lattice | lattice to be the fill |
| region | cell region |
Definition at line 39 of file CSGCell.C.
|
virtualdefault |
Destructor.
|
protectedinherited |
Add a transformation to the list of transformations.
| type | The type of transformation |
| values | The values for the transformation |
Definition at line 16 of file CSGTransformationHelper.C.
|
protectedinherited |
update the value of point p by applying the inverse of the list of transformations to the point
| p | point to transform |
Definition at line 74 of file CSGTransformationHelper.C.
Referenced by CSG::CSGSurface::getHalfspaceFromPoint().
|
protectedinherited |
Friends for unit testing.
|
protectedinherited |
|
protected |
Friends for unit testing.
|
protected |
|
protected |
| const CSGLattice & CSG::CSGCell::getFillLattice | ( | ) | const |
Get the cell fill if fill type is LATTICE.
Definition at line 76 of file CSGCell.C.
Referenced by CSG::CSGBase::addCellToList(), and operator==().
| const std::string & CSG::CSGCell::getFillMaterial | ( | ) | const |
Get the cell fill material name if fill fype is CSG_MATERIAL.
Definition at line 67 of file CSGCell.C.
Referenced by CSG::CSGBase::addCellToList(), and operator==().
| const std::string & CSG::CSGCell::getFillName | ( | ) | const |
Get the name of the fill, regardless of its type.
Definition at line 47 of file CSGCell.C.
Referenced by operator==().
|
inline |
Get the type of fill for the cell.
Definition at line 77 of file CSGCell.h.
Referenced by CSG::CSGBase::addCellToList(), getFillLattice(), getFillMaterial(), getFillName(), getFillUniverse(), and operator==().
| const CSGUniverse & CSG::CSGCell::getFillUniverse | ( | ) | const |
Get the cell fill if fill type is UNIVERSE.
Definition at line 58 of file CSGCell.C.
Referenced by CSG::CSGBase::addCellToList(), and operator==().
|
inline |
Get the cell name.
Definition at line 112 of file CSGCell.h.
Referenced by CSG::CSGUniverse::addCell(), CSG::CSGCellList::addCell(), CSG::CSGBase::addCellToList(), CSG::CSGBase::addCellToUniverse(), CSG::CSGBase::addTransformation(), CSG::CSGBase::checkCellInBase(), CSG::CSGBase::deleteCell(), getFillLattice(), getFillMaterial(), getFillUniverse(), operator==(), CSG::CSGBase::removeCellFromUniverse(), CSG::CSGCellList::renameCell(), CSG::CSGBase::resetCellFill(), CSG::CSGBase::updateCellFill(), and CSG::CSGBase::updateCellRegion().
|
inline |
Get the cell region.
Definition at line 119 of file CSGCell.h.
Referenced by CSG::CSGBase::addCellToList(), and operator==().
|
inlineinherited |
Get the list of transformations.
Definition at line 47 of file CSGTransformationHelper.h.
Referenced by CSG::CSGSurface::getHalfspaceFromPoint(), CSG::CSGUniverse::operator==(), CSG::CSGSurface::operator==(), operator==(), and CSG::CSGLattice::operator==().
|
inherited |
Get the transformations of this object with string representations for types.
Definition at line 65 of file CSGTransformationHelper.C.
|
staticinherited |
Get the string representation of the transformation type.
| type | The transformation type |
Definition at line 56 of file CSGTransformationHelper.C.
Referenced by CSG::CSGTransformationHelper::addTransformation(), and CSG::CSGTransformationHelper::getTransformationsAsStrings().
|
staticinherited |
Check if the transformation value is valid for the given type.
| type | The type of transformation |
| values | The values for the transformation |
Definition at line 26 of file CSGTransformationHelper.C.
Referenced by CSG::CSGTransformationHelper::addTransformation().
| bool CSG::CSGCell::operator!= | ( | const CSGCell & | other | ) | const |
| bool CSG::CSGCell::operator== | ( | const CSGCell & | other | ) | const |
Operator overload for checking if two CSGCell objects are equal.
Definition at line 125 of file CSGCell.C.
| void CSG::CSGCell::resetCellFill | ( | ) |
Reset the cell fill to void.
Definition at line 85 of file CSGCell.C.
Referenced by CSG::CSGBase::resetCellFill(), and updateCellFill().
|
inlineprotected |
| void CSG::CSGCell::updateCellFill | ( | const std::string & | mat_name | ) |
Set the cell fill to a material name.
| mat_name | name of material fill |
Definition at line 94 of file CSGCell.C.
Referenced by CSG::CSGBase::updateCellFill().
| void CSG::CSGCell::updateCellFill | ( | const CSGUniverse * | univ | ) |
Set the cell fill to a universe.
| univ | universe fill |
Definition at line 102 of file CSGCell.C.
| void CSG::CSGCell::updateCellFill | ( | const CSGLattice * | lattice | ) |
Set the cell fill to a lattice.
| lattice | lattice fill |
Definition at line 110 of file CSGCell.C.
|
protected |
Update surface references of cell region based on map of input surface references.
| identical_surface_refs | map of surface name to surface references that region should be defined with |
Definition at line 118 of file CSGCell.C.
Definition at line 170 of file CSGCell.h.
Referenced by CSG::CSGBase::updateCellRegion().
|
friend |
|
protected |
Fill object if fill is CSGLattice.
Definition at line 188 of file CSGCell.h.
Referenced by getFillLattice(), getFillName(), resetCellFill(), and updateCellFill().
|
protected |
name of the fill object for CSG_MATERIAL fills
Definition at line 179 of file CSGCell.h.
Referenced by getFillMaterial(), getFillName(), resetCellFill(), and updateCellFill().
|
protected |
An enum for type of fill for cell region.
Definition at line 176 of file CSGCell.h.
Referenced by CSGCell(), getFillType(), resetCellFill(), and updateCellFill().
|
protected |
Fill object if fill is CSGUniverse.
Definition at line 185 of file CSGCell.h.
Referenced by getFillName(), getFillUniverse(), resetCellFill(), and updateCellFill().
|
protected |
|
protected |
Cell region, represented as a CSGRegion object.
Definition at line 182 of file CSGCell.h.
Referenced by getRegion(), updateCellRegionSurfaces(), and updateRegion().
|
protectedinherited |
List of transformations applied to this object.
Definition at line 92 of file CSGTransformationHelper.h.
Referenced by CSG::CSGTransformationHelper::addTransformation(), CSG::CSGTransformationHelper::applyReverseTransformsToPoint(), CSG::CSGTransformationHelper::getTransformations(), and CSG::CSGTransformationHelper::getTransformationsAsStrings().
1.8.14