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. | |
| CSGCell (const std::string &name, const std::string &mat_name, const CSGRegion ®ion) | |
| Constructor for Material Cell. | |
| CSGCell (const std::string &name, const CSGUniverse *univ, const CSGRegion ®ion) | |
| Constructor for Universe Cell. | |
| CSGCell (const std::string &name, const CSGLattice *lattice, const CSGRegion ®ion) | |
| Constructor for a Lattice Cell. | |
| virtual | ~CSGCell ()=default |
| Destructor. | |
| const std::string | getFillType () const |
| Get the type of fill for the cell. | |
| const CSGUniverse & | getFillUniverse () const |
| Get the cell fill if fill type is UNIVERSE. | |
| const std::string & | getFillMaterial () const |
| Get the cell fill material name if fill fype is CSG_MATERIAL. | |
| const CSGLattice & | getFillLattice () const |
| Get the cell fill if fill type is LATTICE. | |
| const std::string & | getFillName () const |
| Get the name of the fill, regardless of its type. | |
| const std::string & | getName () const |
| Get the cell name. | |
| const CSGRegion & | getRegion () const |
| Get the cell region. | |
| void | resetCellFill () |
| Reset the cell fill to void. | |
| virtual bool | isEngUnit () const |
| Whether this cell is an engineering unit. | |
| bool | operator== (const CSGCell &other) const |
| Operator overload for checking if two CSGCell objects are equal. | |
| bool | operator!= (const CSGCell &other) const |
| Operator overload for checking if two CSGCell objects are not equal. | |
| const std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > & | getTransformations () const |
| Get the list of transformations. | |
| std::vector< std::pair< std::string, std::tuple< Real, Real, Real > > > | getTransformationsAsStrings () const |
| Get the transformations of this object with string representations for types. | |
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. | |
| static std::string | getTransformationTypeString (TransformationType type) |
| Get the string representation of the transformation type. | |
Protected Member Functions | |
| void | setName (const std::string &name) |
| void | updateRegion (const CSGRegion ®ion) |
| void | updateCellFill (const std::string &mat_name) |
| Set the cell fill to a material name. | |
| void | updateCellFill (const CSGUniverse *univ) |
| Set the cell fill to a universe. | |
| void | updateCellFill (const CSGLattice *lattice) |
| Set the cell fill to a lattice. | |
| 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. | |
| void | addTransformation (TransformationType type, const std::tuple< Real, Real, Real > &values) |
| Add a transformation to the list of transformations. | |
| Point | applyReverseTransformsToPoint (Point p) const |
| update the value of point p by applying the inverse of the list of transformations to the point | |
| FRIEND_TEST (CSGCellTest, testSetName) | |
| Friends for unit testing. | |
| FRIEND_TEST (CSGCellTest, testUpdateRegion) | |
| FRIEND_TEST (CSGCellTest, testCellEquality) | |
| FRIEND_TEST (CSGCellTest, testUpdateFill) | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithTransform) | |
| Friends for unit testing. | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithNullTransform) | |
| FRIEND_TEST (CSGEngUnitTest, testEngUnitEqual) | |
Protected Attributes | |
| std::string | _name |
| Name of surface. | |
| MooseEnum | _fill_type {"VOID CSG_MATERIAL UNIVERSE LATTICE"} |
| An enum for type of fill for cell region. | |
| std::string | _fill_name |
| name of the fill object for CSG_MATERIAL fills | |
| CSGRegion | _region |
| Cell region, represented as a CSGRegion object. | |
| const CSGUniverse * | _fill_universe |
| Fill object if fill is CSGUniverse. | |
| const CSGLattice * | _fill_lattice |
| Fill object if fill is CSGLattice. | |
| std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > | _transformations |
| List of transformations applied to this object. | |
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 19 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 |
| 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 33 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 40 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.
Referenced by CSG::CSGBase::addTransformation(), CSG::CSGBase::expandEngUnit(), CSG::CSGBase::expandEngUnit(), and CSG::CSGBase::expandEngUnit().
|
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().
|
protected |
|
protected |
Friends for unit testing.
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Friends for unit testing.
| const CSGLattice & CSG::CSGCell::getFillLattice | ( | ) | const |
Get the cell fill if fill type is LATTICE.
Definition at line 77 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 68 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 48 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(), operator==(), and CSG::CSGBase::replaceUniverseRefs().
| const CSGUniverse & CSG::CSGCell::getFillUniverse | ( | ) | const |
Get the cell fill if fill type is UNIVERSE.
Definition at line 59 of file CSGCell.C.
Referenced by CSG::CSGBase::addCellToList(), operator==(), and CSG::CSGBase::replaceUniverseRefs().
|
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(), CSG::CSGBase::expandEngUnit(), getFillLattice(), getFillMaterial(), getFillUniverse(), CSG::CSGCellEngUnit::getName(), operator==(), CSG::CSGBase::prepareCellDeletion(), CSG::CSGBase::removeCellFromUniverse(), CSG::CSGBase::renameCell(), CSG::CSGCellList::renameCell(), CSG::CSGBase::resetCellFill(), CSG::CSGBase::updateCellFill(), CSG::CSGBase::updateCellFill(), 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(), operator==(), and CSG::CSGBase::replaceSurfaceRefsWithRegion().
|
inlineinherited |
Get the list of transformations.
Definition at line 51 of file CSGTransformationHelper.h.
Referenced by CSG::CSGSurface::getHalfspaceFromPoint(), CSG::CSGCellEngUnit::getTransformations(), CSG::CSGSurfaceEngUnit::getTransformations(), CSG::CSGUniverseEngUnit::getTransformations(), operator==(), CSG::CSGLattice::operator==(), CSG::CSGSurface::operator==(), and CSG::CSGUniverse::operator==().
|
inherited |
Get the transformations of this object with string representations for types.
Definition at line 65 of file CSGTransformationHelper.C.
Referenced by CSG::CSGCellEngUnit::getTransformationsAsStrings(), CSG::CSGSurfaceEngUnit::getTransformationsAsStrings(), and CSG::CSGUniverseEngUnit::getTransformationsAsStrings().
|
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().
|
inlinevirtual |
Whether this cell is an engineering unit.
Returns false for a plain CSGCell; overridden to return true by the engineering unit types. Used to avoid a dynamic_cast on the common plain-cell comparison path (see operator==).
Reimplemented in CSG::CSGCellEngUnit.
Definition at line 136 of file CSGCell.h.
Referenced by operator==().
|
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 126 of file CSGCell.C.
| void CSG::CSGCell::resetCellFill | ( | ) |
Reset the cell fill to void.
Definition at line 86 of file CSGCell.C.
Referenced by CSG::CSGBase::resetCellFill(), updateCellFill(), updateCellFill(), and updateCellFill().
|
inlineprotected |
|
protected |
Set the cell fill to a lattice.
| lattice | lattice fill |
|
protected |
Set the cell fill to a universe.
| univ | universe fill |
|
protected |
Set the cell fill to a material name.
| mat_name | name of material fill |
Definition at line 95 of file CSGCell.C.
Referenced by CSG::CSGBase::updateCellFill(), CSG::CSGBase::updateCellFill(), and CSG::CSGBase::updateCellFill().
|
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 119 of file CSGCell.C.
|
inlineprotected |
Definition at line 151 of file CSGCell.h.
Referenced by CSG::CSGBase::updateCellRegion().
|
friend |
|
protected |
Fill object if fill is CSGLattice.
Definition at line 199 of file CSGCell.h.
Referenced by getFillLattice(), getFillName(), resetCellFill(), and updateCellFill().
|
protected |
name of the fill object for CSG_MATERIAL fills
Definition at line 190 of file CSGCell.h.
Referenced by getFillMaterial(), getFillName(), resetCellFill(), and updateCellFill().
|
protected |
An enum for type of fill for cell region.
Definition at line 187 of file CSGCell.h.
Referenced by CSGCell(), CSGCell(), CSGCell(), CSGCell(), getFillType(), resetCellFill(), updateCellFill(), updateCellFill(), and updateCellFill().
|
protected |
Fill object if fill is CSGUniverse.
Definition at line 196 of file CSGCell.h.
Referenced by getFillName(), getFillUniverse(), resetCellFill(), and updateCellFill().
|
protected |
|
protected |
Cell region, represented as a CSGRegion object.
Definition at line 193 of file CSGCell.h.
Referenced by getRegion(), updateCellRegionSurfaces(), and updateRegion().
|
protectedinherited |
List of transformations applied to this object.
Definition at line 96 of file CSGTransformationHelper.h.
Referenced by CSG::CSGTransformationHelper::addTransformation(), CSG::CSGTransformationHelper::applyReverseTransformsToPoint(), CSG::CSGTransformationHelper::getTransformations(), and CSG::CSGTransformationHelper::getTransformationsAsStrings().