16 #include "nlohmann/json.h" 18 #ifdef MOOSE_UNIT_TEST 19 #include "gtest/gtest.h" 97 const std::string & mat_name,
134 std::vector<std::reference_wrapper<const CSGCell>>
getAllCells()
const 213 std::vector<std::reference_wrapper<const CSGCell>> & cells);
230 std::vector<std::reference_wrapper<const CSGCell>> & cells);
247 std::vector<std::reference_wrapper<const CSGCell>> & cells);
289 void joinOtherBase(std::unique_ptr<CSGBase> base, std::string & new_root_name_join);
304 const std::string & new_root_name_base,
305 const std::string & new_root_name_join);
335 std::vector<std::string> & linked_universe_names)
const;
403 const std::string & new_root_name_base,
404 const std::string & new_root_name_incoming);
424 #ifdef MOOSE_UNIT_TEST std::string name(const ElemQuality q)
void joinCellList(CSGCellList &cell_list)
join a separate CSGCellList object to this one
void renameUniverse(const CSGUniverse &universe, const std::string &name)
rename the specified universe
CSGCell & getCell(const std::string &name) const
Get the CSGCell by name.
std::vector< std::reference_wrapper< const CSGUniverse > > getAllUniverses() const
Get all the universes in CSGBase instance.
std::vector< std::reference_wrapper< const CSGUniverse > > getAllUniverses() const
Get all universe objects.
CSGUniverseList _universe_list
List of universes associated with CSG object.
CSGRegions creates an internal representation of a CSG region, which can refer to an intersection...
CSGCellList creates a container for CSGCell objects to pass to CSGBase object.
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.
void joinUniverseList(CSGUniverseList &univ_list)
join a separate CSGUniverseList object to this one; root universes from univ_list will be combined in...
void joinOtherBase(std::unique_ptr< CSGBase > base)
Join another CSGBase object to this one.
const CSGSurface & getSurfaceByName(const std::string &name) const
Get a Surface object by name.
std::vector< std::reference_wrapper< const CSGCell > > getAllCells() const
Get all the cells in CSGBase instance.
CSGUniverse creates an internal representation of a Constructive Solid Geometry (CSG) universe...
CSGSurface & getSurface(const std::string &name) const
Get a surface by name.
CSGSurfaceList _surface_list
List of surfaces associated with CSG object.
void getLinkedUniverses(const CSGUniverse &univ, std::vector< std::string > &linked_universe_names) const
Recursive method to retrieve all universes linked to current universe.
nlohmann::json generateOutput() const
generate the JSON representation output for the CSG object
std::vector< std::reference_wrapper< const CSGSurface > > getAllSurfaces() const
Get list of references to all surfaces in surface list.
CSGUniverse & getUniverse(const std::string &name) const
Get a Universe from the list by its name.
void addCellsToUniverse(const CSGUniverse &universe, std::vector< std::reference_wrapper< const CSGCell >> &cells)
Add a list of cells to an existing universe.
const CSGUniverse & getRootUniverse() const
Get the Root Universe object.
void updateCellRegion(const CSGCell &cell, const CSGRegion ®ion)
change the region of the specified cell
CSGUniverseList creates a container for CSGUniverse objects to pass to CSGBase.
void renameSurface(const CSGSurface &surface, const std::string &name)
rename the specified surface
FRIEND_TEST(CSGBaseTest, testCheckRegionSurfaces)
Friends for unit testing.
void renameCell(const CSGCell &cell, const std::string &name)
rename the specified cell
const CSGUniverse & getRoot() const
Get the root universe.
void renameRootUniverse(const std::string &name)
rename the root universe for this instance (default is ROOT_UNIVERSE)
void joinSurfaceList(CSGSurfaceList &surf_list)
join a separate CSGSurfaceList object to this one
const CSGSurface & addSurface(std::unique_ptr< CSGSurface > surf)
add a unique surface pointer to this base instance
void removeCellsFromUniverse(const CSGUniverse &universe, std::vector< std::reference_wrapper< const CSGCell >> &cells)
Remove a list of cells from an existing universe.
CSGSurface & getSurface(const std::string &name)
Get a Surface object by name.
CSGUniverse & addUniverse(const std::string &name)
create an empty universe
bool checkUniverseInBase(const CSGUniverse &universe) const
CSGCell creates an internal representation of a Constructive Solid Geometry (CSG) cell...
void checkRegionSurfaces(const CSGRegion ®ion) const
CSGCellList _cell_list
List of cells associated with CSG object.
CSGCellList & getCellList()
Get the CSGCellList object.
const CSGCell & getCellByName(const std::string &name) const
Get a Cell object by name.
void renameUniverse(const CSGUniverse &universe, const std::string &name)
rename the specified universe
CSGUniverseList & getUniverseList()
Get the CSGUniverseList object.
void renameCell(const CSGCell &cell, const std::string &name)
rename the specified cell
bool checkCellInBase(const CSGCell &cell) const
CSGSurfaceList is a container for storing CSGSurface objects in the CSGBase object.
CSGSurface creates an internal representation of a Constructive Solid Geometry (CSG) surface...
CSGBase()
Default constructor.
CSGSurface & addSurface(std::unique_ptr< CSGSurface > surf)
add a surface object to existing SurfaceList.
const CSGUniverse & createUniverse(const std::string &name)
Create an empty Universe object.
void addCellToUniverse(const CSGUniverse &universe, const CSGCell &cell)
Add a cell to an existing universe.
CSGSurfaceList & getSurfaceList()
Get the CSGSurfaceList object.
void checkUniverseLinking() const
Check universes linked to root universe match universes defined in _universe_list.
std::vector< std::reference_wrapper< const CSGCell > > getAllCells() const
Get all cell objects.
void renameSurface(const CSGSurface &surface, const std::string &name)
rename the specified surface
CSGBase creates an internal representation of a Constructive Solid Geometry (CSG) model...
const CSGUniverse & getUniverseByName(const std::string &name)
Get a universe object by name.
void removeCellFromUniverse(const CSGUniverse &universe, const CSGCell &cell)
Remove a cell from an existing universe.
std::vector< std::reference_wrapper< const CSGSurface > > getAllSurfaces() const
Get all surface objects.