CSGBase creates an internal representation of a Constructive Solid Geometry (CSG) model. More...
#include <CSGBase.h>
Public Member Functions | |
| CSGBase () | |
| Default constructor. More... | |
| CSGBase (const CSGBase &other_base) | |
| Copy constructor. More... | |
| ~CSGBase () | |
| Destructor. More... | |
| std::unique_ptr< CSGBase > | clone () const |
| Create a deep copy of this CSGBase instance. More... | |
| const CSGSurface & | addSurface (std::unique_ptr< CSGSurface > surf) |
| add a unique surface pointer to this base instance More... | |
| void | deleteSurface (const CSGSurface &surface) |
| Remove a Surface object passed in by reference from the stored surface list. More... | |
| std::vector< std::reference_wrapper< const CSGSurface > > | getAllSurfaces () const |
| Get all surface objects. More... | |
| const CSGSurface & | getSurfaceByName (const std::string &name) const |
| Get a Surface object by name. More... | |
| bool | hasSurface (const std::string &name) const |
| Check if a surface with given name exists in CSGBase object. More... | |
| void | renameSurface (const CSGSurface &surface, const std::string &name) |
| rename the specified surface More... | |
| const CSGCell & | createCell (const std::string &name, const std::string &mat_name, const CSGRegion ®ion, const CSGUniverse *add_to_univ=nullptr) |
| Create a Material Cell object. More... | |
| const CSGCell & | createCell (const std::string &name, const CSGRegion ®ion, const CSGUniverse *add_to_univ=nullptr) |
| Create a Void Cell object. More... | |
| const CSGCell & | createCell (const std::string &name, const CSGUniverse &fill_univ, const CSGRegion ®ion, const CSGUniverse *add_to_univ=nullptr) |
| Create a Universe Cell object. More... | |
| const CSGCell & | createCell (const std::string &name, const CSGLattice &fill_lattice, const CSGRegion ®ion, const CSGUniverse *add_to_univ=nullptr) |
| Create a Lattice Cell object. More... | |
| void | deleteCell (const CSGCell &cell) |
| Remove a Cell object passed in by reference from the stored cell list. More... | |
| std::vector< std::reference_wrapper< const CSGCell > > | getAllCells () const |
| Get all cell objects. More... | |
| const CSGCell & | getCellByName (const std::string &name) const |
| Get a Cell object by name. More... | |
| bool | hasCell (const std::string &name) const |
| Check if a cell with given name exists in CSGBase object. More... | |
| void | renameCell (const CSGCell &cell, const std::string &name) |
| rename the specified cell More... | |
| void | updateCellRegion (const CSGCell &cell, const CSGRegion ®ion) |
| change the region of the specified cell More... | |
| void | resetCellFill (const CSGCell &cell) |
| reset the fill of the specified cell to void More... | |
| void | updateCellFill (const CSGCell &cell, const std::string &mat_name) |
| change the fill of the specified cell to a material fill More... | |
| void | updateCellFill (const CSGCell &cell, const CSGUniverse *univ) |
| change the fill of the specified cell to a universe fill More... | |
| void | updateCellFill (const CSGCell &cell, const CSGLattice *lattice) |
| change the fill of the specified cell to a lattice fill More... | |
| const CSGUniverse & | getRootUniverse () const |
| Get the Root Universe object. More... | |
| void | renameRootUniverse (const std::string &name) |
| rename the root universe for this instance (default is ROOT_UNIVERSE) More... | |
| void | renameUniverse (const CSGUniverse &universe, const std::string &name) |
| rename the specified universe More... | |
| const CSGUniverse & | createUniverse (const std::string &name) |
| Create an empty Universe object. More... | |
| const CSGUniverse & | createUniverse (const std::string &name, std::vector< std::reference_wrapper< const CSGCell >> &cells) |
| Create a Universe object from list of cells. More... | |
| void | deleteUniverse (const CSGUniverse &univ) |
| Remove a Universe object passed in by reference from the stored universe list. More... | |
| void | addCellToUniverse (const CSGUniverse &universe, const CSGCell &cell) |
| Add a cell to an existing universe. More... | |
| void | addCellsToUniverse (const CSGUniverse &universe, std::vector< std::reference_wrapper< const CSGCell >> &cells) |
| Add a list of cells to an existing universe. More... | |
| void | removeCellFromUniverse (const CSGUniverse &universe, const CSGCell &cell) |
| Remove a cell from an existing universe. More... | |
| void | removeCellsFromUniverse (const CSGUniverse &universe, std::vector< std::reference_wrapper< const CSGCell >> &cells) |
| Remove a list of cells from an existing universe. More... | |
| std::vector< std::reference_wrapper< const CSGUniverse > > | getAllUniverses () const |
| Get all universe objects. More... | |
| const CSGUniverse & | getUniverseByName (const std::string &name) |
| Get a universe object by name. More... | |
| bool | hasUniverse (const std::string &name) const |
| Check if a universe with given name exists in CSGBase object. More... | |
| template<typename LatticeType = CSGLattice> | |
| const LatticeType & | addLattice (std::unique_ptr< LatticeType > lattice) |
| add a unique lattice pointer to this base instance; universes that make the lattice must already be a part of this CSGBase instance. More... | |
| void | deleteLattice (const CSGLattice &lattice) |
| Remove a Lattice object passed in by reference from the stored lattice list. More... | |
| void | setUniverseAtLatticeIndex (const CSGLattice &lattice, const CSGUniverse &universe, std::pair< int, int > index) |
| set location in the lattice to be the provided universe More... | |
| void | setLatticeUniverses (const CSGLattice &lattice, std::vector< std::vector< std::reference_wrapper< const CSGUniverse >>> &universes) |
| Set provided universes as the layout of the lattice. More... | |
| void | renameLattice (const CSGLattice &lattice, const std::string &name) |
| rename the lattice More... | |
| void | setLatticeOuter (const CSGLattice &lattice, const std::string &outer_name) |
| Set the outer fill for the lattice to the material name provided. More... | |
| void | setLatticeOuter (const CSGLattice &lattice, const CSGUniverse &outer_univ) |
| Set the outer fill for the lattice to the universe provided. More... | |
| void | resetLatticeOuter (const CSGLattice &lattice) |
| reset the outer fill for the lattice to VOID More... | |
| std::vector< std::reference_wrapper< const CSGLattice > > | getAllLattices () const |
| Get all lattice objects. More... | |
| template<typename LatticeType = CSGLattice> | |
| const LatticeType & | getLatticeByName (const std::string &name) |
| Get a lattice object of the specified type by name This is a templated method with a default type of CSGLattice. More... | |
| bool | hasLattice (const std::string &name) const |
| Check if a lattice with given name exists in CSGBase object. More... | |
| void | joinOtherBase (std::unique_ptr< CSGBase > base, const bool ignore_identical_surfaces) |
| Join another CSGBase object to this one. More... | |
| void | joinOtherBase (std::unique_ptr< CSGBase > base, const bool ignore_identical_surfaces, const std::string &new_root_name_join) |
| Join another CSGBase object to this one. More... | |
| void | joinOtherBase (std::unique_ptr< CSGBase > base, const bool ignore_identical_surfaces, const std::string &new_root_name_base, const std::string &new_root_name_join) |
| Join another CSGBase object to this one. More... | |
| nlohmann::json | generateOutput () const |
| generate the JSON representation output for the CSG object More... | |
| bool | operator== (const CSGBase &other) const |
| Operator overload for checking if two CSGBase objects are equal. More... | |
| bool | operator!= (const CSGBase &other) const |
| Operator overload for checking if two CSGBase objects are not equal. More... | |
| void | addTransformation (const CSGObjectVariant &csg_object, TransformationType type, const std::tuple< Real, Real, Real > &values) |
| Apply a transformation to a CSG object. More... | |
| void | applyTranslation (const CSGObjectVariant &csg_object, const std::tuple< Real, Real, Real > &distances) |
| Apply a translation to a CSG object in the specified x, y, and z directions. More... | |
| void | applyRotation (const CSGObjectVariant &csg_object, const std::tuple< Real, Real, Real > &angles) |
| Apply a rotation to a CSG object using (phi, theta, psi) angle notation (in degrees). More... | |
| void | applyAxisRotation (const CSGObjectVariant &csg_object, RotationAxisType axis, const Real angle) |
| Apply a rotation to a CSG object about a specified axis (X, Y, Z). More... | |
| void | applyScaling (const CSGObjectVariant &csg_object, const std::tuple< Real, Real, Real > &values) |
| Scale a CSG object in the specified x, y, and z directions. More... | |
Private Member Functions | |
| CSGSurface & | getSurface (const std::string &name) |
| Get a Surface object by name. More... | |
| void | checkUniverseLinking () const |
| Check universes linked to root universe match universes defined in _universe_list. More... | |
| void | getLinkedUniverses (const CSGUniverse &univ, std::vector< std::string > &linked_universe_names, std::vector< std::string > &linked_cell_names) const |
| Recursive method to retrieve all universes and cells linked to current universe. More... | |
| const CSGSurfaceList & | getSurfaceList () const |
| Get a const reference to the CSGSurfaceList object. More... | |
| CSGSurfaceList & | getSurfaceList () |
| Get a non-const reference to the CSGSurfaceList object. More... | |
| const CSGCellList & | getCellList () const |
| Get a const reference to the CSGCellList object. More... | |
| CSGCellList & | getCellList () |
| Get a non-const reference to the CSGCellList object. More... | |
| const CSGUniverseList & | getUniverseList () const |
| Get a const reference to the CSGUniverseList object. More... | |
| CSGUniverseList & | getUniverseList () |
| Get a non-const reference to the CSGUniverseList object. More... | |
| const CSGLatticeList & | getLatticeList () const |
| Get a const reference to the CSGLatticeList object. More... | |
| CSGLatticeList & | getLatticeList () |
| Get the CSGLatticeList object. More... | |
| void | updateIncomingCellRegions (CSGSurfaceList &surf_list, CSGCellList &cell_list) |
| update cell regions of incoming CSGBase to point to surfaces contained within existing CSGBase object More... | |
| void | joinSurfaceList (CSGSurfaceList &surf_list, const bool ignore_identical_surfaces) |
| join a separate CSGSurfaceList object to this one More... | |
| void | joinCellList (CSGCellList &cell_list) |
| join a separate CSGCellList object to this one More... | |
| void | joinLatticeList (CSGLatticeList &lattice_list) |
| join a separate CSGLatticeList object to this one More... | |
| void | joinUniverseList (CSGUniverseList &univ_list) |
| join a separate CSGUniverseList object to this one; root universes from univ_list will be combined into this root universe More... | |
| void | joinUniverseList (CSGUniverseList &univ_list, const std::string &new_root_name_incoming) |
| join a separate CSGUniverseList object to this one; the incoming root universe will be moved to a new universe of the new name specified. More... | |
| void | joinUniverseList (CSGUniverseList &univ_list, const std::string &new_root_name_base, const std::string &new_root_name_incoming) |
| join a separate CSGUniverseList object to this one; both this root universe and the incoming root universe will be maintained as separate universes of the specified names. More... | |
| void | checkRegionSurfaces (const CSGRegion ®ion) const |
| bool | checkSurfaceInBase (const CSGSurface &surface) const |
| bool | checkCellInBase (const CSGCell &cell) const |
| bool | checkUniverseInBase (const CSGUniverse &universe) const |
| bool | checkLatticeInBase (const CSGLattice &lattice) const |
| const CSGCell & | addCellToList (const CSGCell &cell) |
| Add a new cell to the cell list based on a cell reference. More... | |
| const CSGUniverse & | addUniverseToList (const CSGUniverse &univ) |
| Add a new universe to the universe list based on a universe reference. More... | |
| const CSGLattice & | addLatticeToList (const CSGLattice &lattice) |
| Add a new lattice to the lattice list based on a lattice reference. More... | |
| FRIEND_TEST (CSGBaseTest, testCheckRegionSurfaces) | |
| Friends for unit testing. More... | |
| FRIEND_TEST (CSGBaseTest, testAddGetSurface) | |
| FRIEND_TEST (CSGBaseTest, testUniverseLinking) | |
Private Attributes | |
| CSGSurfaceList | _surface_list |
| List of surfaces associated with CSG object. More... | |
| CSGCellList | _cell_list |
| List of cells associated with CSG object. More... | |
| CSGUniverseList | _universe_list |
| List of universes associated with CSG object. More... | |
| CSGLatticeList | _lattice_list |
| List of lattices associated with CSG object. More... | |
| CSG::CSGBase::CSGBase | ( | ) |
Default constructor.
Definition at line 17 of file CSGBase.C.
| CSG::CSGBase::CSGBase | ( | const CSGBase & | other_base | ) |
Copy constructor.
Definition at line 25 of file CSGBase.C.
| void CSG::CSGBase::addCellsToUniverse | ( | const CSGUniverse & | universe, |
| std::vector< std::reference_wrapper< const CSGCell >> & | cells | ||
| ) |
Add a list of cells to an existing universe.
| universe | universe to which to add the cells |
| cells | list of references to cells to add |
Definition at line 441 of file CSGBase.C.
Referenced by createUniverse().
Add a new cell to the cell list based on a cell reference.
This method is called by the copy constructor of CSGBase
| cell | reference to CSGCell that should be added to cell list |
Definition at line 85 of file CSGBase.C.
Referenced by addUniverseToList(), and CSGBase().
| void CSG::CSGBase::addCellToUniverse | ( | const CSGUniverse & | universe, |
| const CSGCell & | cell | ||
| ) |
Add a cell to an existing universe.
| universe | universe to which to add the cell |
| cell | cell to add |
Definition at line 424 of file CSGBase.C.
Referenced by addCellsToUniverse(), createCell(), CSGBase(), and joinUniverseList().
|
inline |
add a unique lattice pointer to this base instance; universes that make the lattice must already be a part of this CSGBase instance.
| lattice | pointer to lattice to add |
Definition at line 403 of file CSGBase.h.
Referenced by addLatticeToList().
|
private |
Add a new lattice to the lattice list based on a lattice reference.
This method is called by the copy constructor of CSGBase
| lattice | reference to CSGLattice that should be added to universe list |
Definition at line 138 of file CSGBase.C.
Referenced by addCellToList(), and CSGBase().
|
inline |
add a unique surface pointer to this base instance
| surf | pointer to surface to add |
Definition at line 79 of file CSGBase.h.
| void CSG::CSGBase::addTransformation | ( | const CSGObjectVariant & | csg_object, |
| TransformationType | type, | ||
| const std::tuple< Real, Real, Real > & | values | ||
| ) |
Apply a transformation to a CSG object.
| csg_object | The CSG object to transform (Surface, Cell, Universe, Region, or Lattice) |
| type | The type of transformation to apply (TRANSLATION, ROTATION, SCALE) |
| values | tuple of transformation values (3 values for any transformation type) |
Definition at line 545 of file CSGBase.C.
Referenced by applyAxisRotation(), applyRotation(), applyScaling(), and applyTranslation().
|
private |
Add a new universe to the universe list based on a universe reference.
This method is called by the copy constructor of CSGBase
| univ | reference to CSGUniverse that should be added to universe list |
Definition at line 120 of file CSGBase.C.
Referenced by addCellToList(), addLatticeToList(), and CSGBase().
| void CSG::CSGBase::applyAxisRotation | ( | const CSGObjectVariant & | csg_object, |
| RotationAxisType | axis, | ||
| const Real | angle | ||
| ) |
Apply a rotation to a CSG object about a specified axis (X, Y, Z).
| csg_object | The CSG object to rotate (Surface, Cell, Universe, Region, or Lattice) |
| axis | Axis type (X, Y, or Z) about which to rotate |
| angle | angle in degrees to rotate about the specified axis |
Definition at line 633 of file CSGBase.C.
|
inline |
Apply a rotation to a CSG object using (phi, theta, psi) angle notation (in degrees).
| csg_object | The CSG object to rotate (Surface, Cell, Universe, Region, or Lattice) |
| angles | size 3 tuple {phi, theta, psi} with rotation angles in degrees |
Definition at line 619 of file CSGBase.h.
|
inline |
Scale a CSG object in the specified x, y, and z directions.
| csg_object | The CSG object to scale (Surface, Cell, Universe, Region, or Lattice) |
| values | size 3 tuple with scaling values in x, y, and z directions {x, y, z} |
Definition at line 641 of file CSGBase.h.
|
inline |
Apply a translation to a CSG object in the specified x, y, and z directions.
| csg_object | The CSG object to translate (Surface, Cell, Universe, Region, or Lattice) |
| distances | size 3 tuple with translation distances in x, y, and z directions {x, y, z} |
Definition at line 607 of file CSGBase.h.
|
private |
Definition at line 840 of file CSGBase.C.
Referenced by addCellToUniverse(), addTransformation(), deleteCell(), removeCellFromUniverse(), resetCellFill(), updateCellFill(), and updateCellRegion().
|
private |
Definition at line 860 of file CSGBase.C.
Referenced by addTransformation(), deleteLattice(), resetLatticeOuter(), setLatticeOuter(), setLatticeUniverses(), setUniverseAtLatticeIndex(), and updateCellFill().
Definition at line 818 of file CSGBase.C.
Referenced by createCell(), and updateCellRegion().
|
private |
Definition at line 830 of file CSGBase.C.
Referenced by addTransformation(), checkRegionSurfaces(), and deleteSurface().
|
private |
Definition at line 850 of file CSGBase.C.
Referenced by addCellToUniverse(), addLattice(), addTransformation(), deleteUniverse(), removeCellFromUniverse(), setLatticeOuter(), setLatticeUniverses(), setUniverseAtLatticeIndex(), and updateCellFill().
|
private |
Check universes linked to root universe match universes defined in _universe_list.
Definition at line 870 of file CSGBase.C.
Referenced by generateOutput().
|
inline |
| const CSGCell & CSG::CSGBase::createCell | ( | const std::string & | name, |
| const std::string & | mat_name, | ||
| const CSGRegion & | region, | ||
| const CSGUniverse * | add_to_univ = nullptr |
||
| ) |
Create a Material Cell object.
| name | unique cell name |
| mat_name | material name |
| region | cell region |
| add_to_univ | (optional) universe to which this cell will be added (default is root universe) |
Definition at line 199 of file CSGBase.C.
| const CSGCell & CSG::CSGBase::createCell | ( | const std::string & | name, |
| const CSGRegion & | region, | ||
| const CSGUniverse * | add_to_univ = nullptr |
||
| ) |
Create a Void Cell object.
| name | unique cell name |
| region | cell region |
| add_to_univ | (optional) universe to which this cell will be added (default is root universe) |
Definition at line 214 of file CSGBase.C.
| const CSGCell & CSG::CSGBase::createCell | ( | const std::string & | name, |
| const CSGUniverse & | fill_univ, | ||
| const CSGRegion & | region, | ||
| const CSGUniverse * | add_to_univ = nullptr |
||
| ) |
Create a Universe Cell object.
| name | unique cell name |
| fill_univ | universe that will fill the cell |
| region | cell region |
| add_to_univ | (optional) universe to which this cell will be added (default is root universe) |
Definition at line 228 of file CSGBase.C.
| const CSGCell & CSG::CSGBase::createCell | ( | const std::string & | name, |
| const CSGLattice & | fill_lattice, | ||
| const CSGRegion & | region, | ||
| const CSGUniverse * | add_to_univ = nullptr |
||
| ) |
Create a Lattice Cell object.
| name | unique cell name |
| fill_lattice | lattice that will fill the cell |
| region | cell region |
| add_to_univ | (optional) universe to which this cell will be added (default is root universe) |
Definition at line 247 of file CSGBase.C.
|
inline |
Create an empty Universe object.
| name | unique universe name |
Definition at line 308 of file CSGBase.h.
Referenced by addUniverseToList(), and joinUniverseList().
| const CSGUniverse & CSG::CSGBase::createUniverse | ( | const std::string & | name, |
| std::vector< std::reference_wrapper< const CSGCell >> & | cells | ||
| ) |
Create a Universe object from list of cells.
| name | unique universe name |
| cells | list of cells to add to universe |
Definition at line 371 of file CSGBase.C.
Remove a Cell object passed in by reference from the stored cell list.
Any CSG components connected to cell will not be recursively removed.
| cell | reference to cell to delete |
Definition at line 275 of file CSGBase.C.
| void CSG::CSGBase::deleteLattice | ( | const CSGLattice & | lattice | ) |
Remove a Lattice object passed in by reference from the stored lattice list.
Any CSG components connected to lattice will not be recursively removed.
| lattice | reference to lattice to delete |
Definition at line 176 of file CSGBase.C.
| void CSG::CSGBase::deleteSurface | ( | const CSGSurface & | surface | ) |
Remove a Surface object passed in by reference from the stored surface list.
Any CSG components connected to surface will not be recursively removed.
| surface | reference to surface to delete |
Definition at line 59 of file CSGBase.C.
| void CSG::CSGBase::deleteUniverse | ( | const CSGUniverse & | univ | ) |
Remove a Universe object passed in by reference from the stored universe list.
Any CSG components connected to universe will not be recursively removed.
| univ | reference to universe to delete |
Definition at line 380 of file CSGBase.C.
|
private |
Friends for unit testing.
|
private |
|
private |
| nlohmann::json CSG::CSGBase::generateOutput | ( | ) | const |
generate the JSON representation output for the CSG object
Definition at line 925 of file CSGBase.C.
|
inline |
Get all cell objects.
Definition at line 203 of file CSGBase.h.
Referenced by checkUniverseLinking(), and generateOutput().
|
inline |
Get all lattice objects.
Definition at line 496 of file CSGBase.h.
Referenced by generateOutput().
|
inline |
Get all surface objects.
Definition at line 97 of file CSGBase.h.
Referenced by generateOutput().
|
inline |
Get all universe objects.
Definition at line 370 of file CSGBase.h.
Referenced by checkUniverseLinking(), and generateOutput().
|
inline |
Get a Cell object by name.
| name | cell name |
Definition at line 214 of file CSGBase.h.
|
inlineprivate |
Get a const reference to the CSGCellList object.
Definition at line 692 of file CSGBase.h.
Referenced by CSGBase(), and operator==().
|
inlineprivate |
Get a non-const reference to the CSGCellList object.
Definition at line 699 of file CSGBase.h.
|
inline |
Get a lattice object of the specified type by name This is a templated method with a default type of CSGLattice.
If a specific lattice type is needed, it can be specified when calling. If the type is unknown or not specified, it will default to CSGLattice to get the base class reference. NOTE: if CSGLattice is used as the template type, any lattice type-specific attributes or methods may not be accessible, except using a reference cast.
| name | lattice name |
Definition at line 513 of file CSGBase.h.
|
inlineprivate |
Get a const reference to the CSGLatticeList object.
Definition at line 720 of file CSGBase.h.
Referenced by CSGBase(), and operator==().
|
inlineprivate |
Get the CSGLatticeList object.
Definition at line 727 of file CSGBase.h.
|
private |
Recursive method to retrieve all universes and cells linked to current universe.
| univ | Reference to universe under consideration |
| linked_universe_names | List of universe names linked to current universe |
| linked_cell_names | List of cell names linked to current universe |
Definition at line 894 of file CSGBase.C.
Referenced by checkUniverseLinking().
|
inline |
Get the Root Universe object.
Definition at line 279 of file CSGBase.h.
Referenced by checkUniverseLinking(), createCell(), CSGBase(), deleteCell(), deleteUniverse(), and joinUniverseList().
|
inlineprivate |
Get a Surface object by name.
Note: This is a private method that returns a non-const reference. For the public method that returns a const reference, use getSurfaceByName
| name | surface name |
Definition at line 657 of file CSGBase.h.
|
inline |
Get a Surface object by name.
| name | surface name |
Definition at line 108 of file CSGBase.h.
Referenced by updateIncomingCellRegions().
|
inlineprivate |
Get a const reference to the CSGSurfaceList object.
Definition at line 678 of file CSGBase.h.
Referenced by operator==().
|
inlineprivate |
Get a non-const reference to the CSGSurfaceList object.
Definition at line 685 of file CSGBase.h.
|
inline |
Get a universe object by name.
| name | universe name |
Definition at line 381 of file CSGBase.h.
|
inlineprivate |
Get a const reference to the CSGUniverseList object.
Definition at line 706 of file CSGBase.h.
Referenced by CSGBase(), and operator==().
|
inlineprivate |
Get a non-const reference to the CSGUniverseList object.
Definition at line 713 of file CSGBase.h.
|
inline |
Check if a cell with given name exists in CSGBase object.
| name | cell name |
Definition at line 222 of file CSGBase.h.
|
inline |
Check if a lattice with given name exists in CSGBase object.
| name | lattice name |
Definition at line 529 of file CSGBase.h.
|
inline |
Check if a surface with given name exists in CSGBase object.
| name | surface name |
Definition at line 119 of file CSGBase.h.
Referenced by updateIncomingCellRegions().
|
inline |
Check if a universe with given name exists in CSGBase object.
| name | universe name |
Definition at line 392 of file CSGBase.h.
|
private |
join a separate CSGCellList object to this one
| cell_list | CSGCellList from a separate CSGBase object |
Definition at line 734 of file CSGBase.C.
Referenced by joinOtherBase().
|
private |
join a separate CSGLatticeList object to this one
| lattice_list | CSGLatticeList from a separate CSGBase object |
Definition at line 742 of file CSGBase.C.
Referenced by joinOtherBase().
| void CSG::CSGBase::joinOtherBase | ( | std::unique_ptr< CSGBase > | base, |
| const bool | ignore_identical_surfaces | ||
| ) |
Join another CSGBase object to this one.
The cells of the root universe of the incoming CSGBase will be added to the existing root universe of this CSGBase.
| base | pointer to a different CSGBase object |
| ignore_identical_surfaces | if true, will skip adding identical surfaces to the CSGBase object |
Definition at line 663 of file CSGBase.C.
| void CSG::CSGBase::joinOtherBase | ( | std::unique_ptr< CSGBase > | base, |
| const bool | ignore_identical_surfaces, | ||
| const std::string & | new_root_name_join | ||
| ) |
Join another CSGBase object to this one.
For the incoming CSGBase object, the root universe is added to this CSGBase object as a new non-root universe with the specified new name. Note: this newly created universe will not be connected to the root universe of this CSGBase object by default.
| base | pointer to a different CSGBase object |
| ignore_identical_surfaces | if true, will skip adding identical surfaces to the CSGBase object |
| new_root_name_join | new name for the universe generated from the incoming root universe |
Definition at line 676 of file CSGBase.C.
| void CSG::CSGBase::joinOtherBase | ( | std::unique_ptr< CSGBase > | base, |
| const bool | ignore_identical_surfaces, | ||
| const std::string & | new_root_name_base, | ||
| const std::string & | new_root_name_join | ||
| ) |
Join another CSGBase object to this one.
The root universe for the incoming CSGBase object is added to this CSGBase object as a non-root universe with a new name. The root universe of this CSGBase object will be renamed and designated as non-root. Note: upon completion of this join method, the root universe of this CSGBase object will be empty. Neither of the new non-root universes will be connected to the new root universe by default.
| base | pointer to a different CSGBase object |
| ignore_identical_surfaces | if true, will skip adding identical surfaces to the CSGBase object |
| new_root_name_base | new name for universe generated from this root universe |
| new_root_name_join | new name for the universe generated from the incoming root universe |
Definition at line 691 of file CSGBase.C.
|
private |
join a separate CSGSurfaceList object to this one
| surf_list | CSGSurfaceList from a separate CSGBase object |
| ignore_identical_surfaces | if true, will skip adding identical surfaces to the CSGBase object |
Definition at line 726 of file CSGBase.C.
Referenced by joinOtherBase().
|
private |
join a separate CSGUniverseList object to this one; root universes from univ_list will be combined into this root universe
| univ_list | CSGUniverseList from a separate CSGBase object |
Definition at line 750 of file CSGBase.C.
Referenced by joinOtherBase().
|
private |
join a separate CSGUniverseList object to this one; the incoming root universe will be moved to a new universe of the new name specified.
| univ_list | CSGUniverseList from a separate CSGBase object |
| new_root_name_incoming | new name for the universe generated from the incoming root universe |
Definition at line 770 of file CSGBase.C.
|
private |
join a separate CSGUniverseList object to this one; both this root universe and the incoming root universe will be maintained as separate universes of the specified names.
Note: upon completion of this join method, the root universe will be empty.
| univ_list | CSGUniverseList from a separate CSGBase object |
| new_root_name_base | new name for universe generated from this root universe |
| new_root_name_incoming | new name for the universe generated from the incoming root universe |
Definition at line 790 of file CSGBase.C.
| bool CSG::CSGBase::operator!= | ( | const CSGBase & | other | ) | const |
| bool CSG::CSGBase::operator== | ( | const CSGBase & | other | ) | const |
Operator overload for checking if two CSGBase objects are equal.
Definition at line 1017 of file CSGBase.C.
| void CSG::CSGBase::removeCellFromUniverse | ( | const CSGUniverse & | universe, |
| const CSGCell & | cell | ||
| ) |
Remove a cell from an existing universe.
| universe | universe from which to remove the cell |
| cell | cell to remove |
Definition at line 449 of file CSGBase.C.
Referenced by removeCellsFromUniverse().
| void CSG::CSGBase::removeCellsFromUniverse | ( | const CSGUniverse & | universe, |
| std::vector< std::reference_wrapper< const CSGCell >> & | cells | ||
| ) |
Remove a list of cells from an existing universe.
| universe | universe from which to remove the cells |
| cells | list of references to cells to remove |
Definition at line 466 of file CSGBase.C.
Referenced by joinUniverseList().
rename the specified cell
| cell | reference to CSGCell to rename |
| name | new name |
Definition at line 230 of file CSGBase.h.
|
inline |
rename the lattice
| lattice | lattice to rename |
| name | new name |
Definition at line 461 of file CSGBase.h.
|
inline |
rename the root universe for this instance (default is ROOT_UNIVERSE)
| name | new name for the root universe |
Definition at line 286 of file CSGBase.h.
|
inline |
rename the specified surface
| surface | CSGSurface to rename |
| name | new name |
Definition at line 127 of file CSGBase.h.
|
inline |
rename the specified universe
| universe | reference to CSGUniverse to rename |
| name | new name |
Definition at line 297 of file CSGBase.h.
reset the fill of the specified cell to void
| cell | cell to update the fill for |
Definition at line 317 of file CSGBase.C.
| void CSG::CSGBase::resetLatticeOuter | ( | const CSGLattice & | lattice | ) |
reset the outer fill for the lattice to VOID
| lattice | lattice to update |
Definition at line 499 of file CSGBase.C.
| void CSG::CSGBase::setLatticeOuter | ( | const CSGLattice & | lattice, |
| const std::string & | outer_name | ||
| ) |
Set the outer fill for the lattice to the material name provided.
This will set the outer type to CSG_MATERIAL regardless of its previous outer type.
| lattice | lattice to update |
| outer_name | name of material to use as outer fill between lattice elements |
Definition at line 474 of file CSGBase.C.
| void CSG::CSGBase::setLatticeOuter | ( | const CSGLattice & | lattice, |
| const CSGUniverse & | outer_univ | ||
| ) |
Set the outer fill for the lattice to the universe provided.
This will set the outer type to UNIVERSE regardless of its previous outer type.
| lattice | lattice to update |
| outer_univ | universe to use as outer fill between lattice elements |
Definition at line 485 of file CSGBase.C.
| void CSG::CSGBase::setLatticeUniverses | ( | const CSGLattice & | lattice, |
| std::vector< std::vector< std::reference_wrapper< const CSGUniverse >>> & | universes | ||
| ) |
Set provided universes as the layout of the lattice.
| lattice | lattice to add universes to |
| universes | list of list of universes in the proper layout for the lattice type and dimensions |
Definition at line 526 of file CSGBase.C.
| void CSG::CSGBase::setUniverseAtLatticeIndex | ( | const CSGLattice & | lattice, |
| const CSGUniverse & | universe, | ||
| std::pair< int, int > | index | ||
| ) |
set location in the lattice to be the provided universe
| lattice | lattice to update |
| universe | universe to set at the location |
| index | index of the lattice element (int, int) |
Definition at line 510 of file CSGBase.C.
change the fill of the specified cell to a material fill
| cell | cell to update the fill for |
| mat_name | name of material fill |
Definition at line 328 of file CSGBase.C.
| void CSG::CSGBase::updateCellFill | ( | const CSGCell & | cell, |
| const CSGUniverse * | univ | ||
| ) |
change the fill of the specified cell to a universe fill
| cell | cell to update the fill for |
| univ | pointer to universe fill |
Definition at line 339 of file CSGBase.C.
| void CSG::CSGBase::updateCellFill | ( | const CSGCell & | cell, |
| const CSGLattice * | lattice | ||
| ) |
change the fill of the specified cell to a lattice fill
| cell | cell to update the fill for |
| lattice | pointer to lattice fill |
Definition at line 355 of file CSGBase.C.
change the region of the specified cell
| cell | cell to update the region for |
| region | new region to assign to cell |
Definition at line 305 of file CSGBase.C.
|
private |
update cell regions of incoming CSGBase to point to surfaces contained within existing CSGBase object
| surf_list | CSGSurfaceList from a separate CSGBase object |
| cell_list | CSGCellList from a separate CSGBase object |
Definition at line 707 of file CSGBase.C.
Referenced by joinOtherBase().
|
private |
List of cells associated with CSG object.
Definition at line 838 of file CSGBase.h.
Referenced by addCellToList(), addTransformation(), checkCellInBase(), createCell(), CSGBase(), deleteCell(), deleteLattice(), deleteSurface(), deleteUniverse(), getAllCells(), getCellByName(), getCellList(), hasCell(), joinCellList(), renameCell(), resetCellFill(), updateCellFill(), and updateCellRegion().
|
private |
List of lattices associated with CSG object.
Definition at line 844 of file CSGBase.h.
Referenced by addLattice(), addLatticeToList(), addTransformation(), checkLatticeInBase(), deleteLattice(), deleteUniverse(), getAllLattices(), getLatticeByName(), getLatticeList(), hasLattice(), joinLatticeList(), renameLattice(), resetLatticeOuter(), setLatticeOuter(), setLatticeUniverses(), and setUniverseAtLatticeIndex().
|
private |
List of surfaces associated with CSG object.
Definition at line 835 of file CSGBase.h.
Referenced by addSurface(), addTransformation(), checkSurfaceInBase(), deleteSurface(), getAllSurfaces(), getSurface(), getSurfaceByName(), getSurfaceList(), hasSurface(), joinSurfaceList(), and renameSurface().
|
private |
List of universes associated with CSG object.
Definition at line 841 of file CSGBase.h.
Referenced by addCellToUniverse(), addTransformation(), addUniverseToList(), checkUniverseInBase(), createUniverse(), deleteCell(), deleteUniverse(), getAllUniverses(), getRootUniverse(), getUniverseByName(), getUniverseList(), hasUniverse(), joinUniverseList(), removeCellFromUniverse(), renameRootUniverse(), and renameUniverse().
1.8.14