CSGUniverseEngUnit is an abstract base class for "engineering units" that are universe-like. More...
#include <CSGUniverseEngUnit.h>
Public Member Functions | |
| const std::string & | getName () const override |
| Satisfy CSGEngUnit::getName() (resolved via CSGUniverse::getName()) More... | |
| bool | isEngUnit () const override |
| Engineering units report true so comparisons can skip the dynamic_cast fast path. More... | |
| bool | operator== (const CSGUniverseEngUnit &other) const |
| Disambiguate == and != by forwarding to CSGEngUnit (name/property-based comparison) More... | |
| bool | operator!= (const CSGUniverseEngUnit &other) const |
| const std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > & | getTransformations () const override |
| Delegate to CSGUniverse (CSGTransformationHelper) More... | |
| std::vector< std::pair< std::string, std::tuple< Real, Real, Real > > > | getTransformationsAsStrings () const override |
| Delegate to CSGUniverse (CSGTransformationHelper) More... | |
| const CSGCell & | getCell (const std::string &name) |
| Get the CSGCell object by name. More... | |
| bool | hasCell (const std::string &name) const |
| check if cell of provided name is present in universe More... | |
| const std::vector< std::reference_wrapper< const CSGCell > > & | getAllCells () const |
| Get list of the all cells in the universe. More... | |
| bool | isRoot () const |
| return true if the universe is the root universe More... | |
| bool | operator== (const CSGUniverse &other) const |
| Operator overload for checking if two CSGUniverse objects are equal. More... | |
| bool | operator!= (const CSGUniverse &other) const |
| Operator overload for checking if two CSGUniverse objects are not equal. More... | |
| const std::string | getBehavior () const |
| Get the behavior of this engineering unit (surface (i.e. More... | |
| const std::string | getUnitType () const |
| Get the type name of this engineering unit. More... | |
| virtual std::unordered_map< std::string, AttributeVariant > | getAttributes () const =0 |
| Get the attributes that define this engineering unit. More... | |
| bool | operator== (const CSGEngUnit &other) const |
| Operator overload for checking if two CSGEngUnit objects are equal. More... | |
| bool | operator!= (const CSGEngUnit &other) const |
| Operator overload for checking if two CSGEngUnit objects are not equal. 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 | |
| CSGUniverseEngUnit (const std::string &name, bool is_root=false) | |
| Constructor for derived classes. More... | |
| virtual std::unique_ptr< CSGUniverseEngUnit > | clone () const =0 |
| Create a deep copy of this engineering unit for use in a different CSGBase instance. More... | |
| void | expandUnit () override=0 |
| Populate _internal_base with the CSGUniverse and any supporting objects. More... | |
| const CSGUniverse & | getExpandedUniverse () const |
| Return the root universe of _internal_base, which IS the expanded universe. More... | |
| void | removeCell (const std::string &name) |
| remove a cell of the specified name from the universe More... | |
| void | removeAllCells () |
| remove all cells from the universe More... | |
| void | setName (const std::string &name) |
| 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... | |
| CSGBase & | getBase () |
| Get the internal CSGBase owned by this engineering unit. More... | |
| std::unique_ptr< CSGBase > | releaseBase () |
| Transfer ownership of the internal CSGBase out of this unit. More... | |
| void | addCell (const CSGCell &)=delete |
| addCell updates are not permitted on engineering units. More... | |
| FRIEND_TEST (CSGUniverseTest, testGetCell) | |
| Friends for unit testing. More... | |
| FRIEND_TEST (CSGUniverseTest, testAddCell) | |
| FRIEND_TEST (CSGUniverseTest, testRemoveCell) | |
| FRIEND_TEST (CSGUniverseTest, testRemoveAllCells) | |
| FRIEND_TEST (CSGUniverseTest, testSetName) | |
| FRIEND_TEST (CSGUniverseTest, testUniverseEquality) | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithTransform) | |
| Friends for unit testing. More... | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithNullTransform) | |
| FRIEND_TEST (CSGEngUnitTest, testEngUnitEqual) | |
Protected Attributes | |
| std::string | _name |
| Name of universe. More... | |
| std::vector< std::reference_wrapper< const CSGCell > > | _cells |
| list of references to cells in universe More... | |
| bool | _is_root |
| whether or not this universe is the root universe More... | |
| std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > | _transformations |
| List of transformations applied to this object. More... | |
| std::unique_ptr< CSGBase > | _internal_base |
| CSGBase populated by expandUnit(); joined into the parent CSGBase by expandEngUnit() More... | |
| MooseEnum | _behavior {"SURFACE CELL UNIVERSE"} |
| The basic CSG type this unit produces: "SURFACE", "CELL", or "UNIVERSE". More... | |
Friends | |
| class | CSGBase |
CSGUniverseEngUnit is an abstract base class for "engineering units" that are universe-like.
Derived classes define domain-specific attributes and implement expandUnit() to produce the equivalent CSGUniverse representation, along with all supporting surfaces and cells.
Derived classes must implement:
Definition at line 38 of file CSGUniverseEngUnit.h.
|
protected |
Constructor for derived classes.
| name | unique name of the universe (will be preserved on the plain CSGUniverse) |
| is_root | true if this is the root universe (default false) |
Definition at line 16 of file CSGUniverseEngUnit.C.
addCell updates are not permitted on engineering units.
The geometry is defined by the derived class and produced only via expandUnit().
|
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::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().
|
protectedpure virtual |
Create a deep copy of this engineering unit for use in a different CSGBase instance.
Derived classes must implement this and return a fully-constructed copy with the same attributes.
|
overrideprotectedpure virtual |
Populate _internal_base with the CSGUniverse and any supporting objects.
Called exclusively by CSGBase. The root universe of _internal_base represents this engineering unit's expanded universe. The implementation should:
Implements CSG::CSGEngUnit.
Referenced by CSG::CSGBase::expandEngUnit().
|
protectedinherited |
Friends for unit testing.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Friends for unit testing.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inlineinherited |
Get list of the all cells in the universe.
Definition at line 73 of file CSGUniverse.h.
Referenced by CSG::CSGBase::addUniverseToList(), CSG::CSGBase::CSGBase(), CSG::CSGBase::getLinkedUniverses(), CSG::CSGUniverse::operator==(), and CSG::CSGBase::replaceCellRefs().
|
pure virtualinherited |
Get the attributes that define this engineering unit.
Returns a map of domain-specific parameter names to their values, describing the EngUnit in meaningful engineering terms.
Implemented in CSG::CSGNPolygonUnit.
Referenced by CSG::CSGEngUnit::operator==().
|
inlineprotectedinherited |
Get the internal CSGBase owned by this engineering unit.
Definition at line 117 of file CSGEngUnit.h.
|
inlineinherited |
Get the behavior of this engineering unit (surface (i.e.
region), cell, or universe).
Returns "SURFACE", "CELL", or "UNIVERSE" depending on which intermediate EngUnit class the concrete type derives from. Set automatically at construction.
Definition at line 56 of file CSGEngUnit.h.
Referenced by CSG::CSGEngUnit::operator==().
|
inherited |
Get the CSGCell object by name.
| name | name of cell |
Definition at line 40 of file CSGUniverse.C.
|
protected |
Return the root universe of _internal_base, which IS the expanded universe.
Valid after expandUnit() has populated _internal_base. Not valid after CSGBase::expandEngUnit() has run (the internal base is consumed by the join).
Definition at line 22 of file CSGUniverseEngUnit.C.
|
inlineoverridevirtual |
Satisfy CSGEngUnit::getName() (resolved via CSGUniverse::getName())
Implements CSG::CSGEngUnit.
Definition at line 42 of file CSGUniverseEngUnit.h.
Referenced by CSG::CSGBase::expandEngUnit(), and getExpandedUniverse().
|
inlineoverridevirtual |
Delegate to CSGUniverse (CSGTransformationHelper)
Implements CSG::CSGEngUnit.
Definition at line 53 of file CSGUniverseEngUnit.h.
|
inlineoverridevirtual |
Delegate to CSGUniverse (CSGTransformationHelper)
Implements CSG::CSGEngUnit.
Definition at line 60 of file CSGUniverseEngUnit.h.
|
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().
|
inlineinherited |
Get the type name of this engineering unit.
Definition at line 63 of file CSGEngUnit.h.
Referenced by CSG::CSGCellEngUnit::getExpandedCell(), getExpandedUniverse(), and CSG::CSGEngUnit::operator==().
|
inherited |
check if cell of provided name is present in universe
| name | name of cell |
Definition at line 51 of file CSGUniverse.C.
Referenced by CSG::CSGUniverse::addCell(), CSG::CSGUniverse::getCell(), and CSG::CSGUniverse::removeCell().
|
inlineoverridevirtual |
Engineering units report true so comparisons can skip the dynamic_cast fast path.
Reimplemented from CSG::CSGUniverse.
Definition at line 45 of file CSGUniverseEngUnit.h.
|
inlineinherited |
return true if the universe is the root universe
Definition at line 87 of file CSGUniverse.h.
|
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().
|
inline |
Definition at line 49 of file CSGUniverseEngUnit.h.
|
inherited |
Operator overload for checking if two CSGEngUnit objects are not equal.
Definition at line 50 of file CSGEngUnit.C.
Referenced by CSG::CSGCellEngUnit::operator!=(), operator!=(), and CSG::CSGSurfaceEngUnit::operator!=().
|
inherited |
Operator overload for checking if two CSGUniverse objects are not equal.
Definition at line 104 of file CSGUniverse.C.
|
inline |
Disambiguate == and != by forwarding to CSGEngUnit (name/property-based comparison)
Definition at line 48 of file CSGUniverseEngUnit.h.
|
inherited |
Operator overload for checking if two CSGEngUnit objects are equal.
Definition at line 34 of file CSGEngUnit.C.
Referenced by CSG::CSGCellEngUnit::operator==(), operator==(), and CSG::CSGSurfaceEngUnit::operator==().
|
inherited |
Operator overload for checking if two CSGUniverse objects are equal.
Definition at line 74 of file CSGUniverse.C.
|
protectedinherited |
Transfer ownership of the internal CSGBase out of this unit.
Called once by CSGBase::expandEngUnit() to join the internal base into the parent. After this call _internal_base is null.
Definition at line 28 of file CSGEngUnit.C.
|
inlineprotectedinherited |
remove all cells from the universe
Definition at line 124 of file CSGUniverse.h.
|
protectedinherited |
remove a cell of the specified name from the universe
| name | name of cell to remove |
Definition at line 60 of file CSGUniverse.C.
Referenced by CSG::CSGBase::removeCellFromUniverse().
|
inlineprotectedinherited |
Definition at line 128 of file CSGUniverse.h.
|
friend |
Definition at line 113 of file CSGUniverseEngUnit.h.
|
protectedinherited |
The basic CSG type this unit produces: "SURFACE", "CELL", or "UNIVERSE".
Definition at line 133 of file CSGEngUnit.h.
Referenced by CSG::CSGEngUnit::CSGEngUnit(), and CSG::CSGEngUnit::getBehavior().
|
protectedinherited |
list of references to cells in universe
Definition at line 134 of file CSGUniverse.h.
Referenced by CSG::CSGUniverse::addCell(), CSG::CSGUniverse::getAllCells(), CSG::CSGUniverse::getCell(), CSG::CSGUniverse::hasCell(), CSG::CSGUniverse::removeAllCells(), and CSG::CSGUniverse::removeCell().
|
protectedinherited |
CSGBase populated by expandUnit(); joined into the parent CSGBase by expandEngUnit()
Definition at line 130 of file CSGEngUnit.h.
Referenced by CSG::CSGNPolygonUnit::expandUnit(), CSG::CSGEngUnit::getBase(), CSG::CSGCellEngUnit::getExpandedCell(), getExpandedUniverse(), and CSG::CSGEngUnit::releaseBase().
|
protectedinherited |
whether or not this universe is the root universe
Definition at line 137 of file CSGUniverse.h.
Referenced by CSG::CSGUniverse::isRoot().
|
protectedinherited |
Name of universe.
Definition at line 131 of file CSGUniverse.h.
Referenced by CSG::CSGUniverse::getCell(), CSG::CSGUniverse::getName(), CSG::CSGUniverse::removeCell(), and CSG::CSGUniverse::setName().
|
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().
1.8.14