CSGCellEngUnit is an abstract base class for "engineering units" that are cell-like. More...
#include <CSGCellEngUnit.h>
Public Member Functions | |
| const std::string & | getName () const override |
| Satisfy CSGEngUnit::getName() (resolved via CSGCell::getName()) More... | |
| bool | isEngUnit () const override |
| Engineering units report true so comparisons can skip the dynamic_cast fast path. More... | |
| bool | operator== (const CSGCellEngUnit &other) const |
| Disambiguate == and != by forwarding to CSGEngUnit (name/property-based comparison) More... | |
| bool | operator!= (const CSGCellEngUnit &other) const |
| const std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > & | getTransformations () const override |
| Delegate to CSGCell (CSGTransformationHelper) More... | |
| std::vector< std::pair< std::string, std::tuple< Real, Real, Real > > > | getTransformationsAsStrings () const override |
| Delegate to CSGCell (CSGTransformationHelper) 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 CSGRegion & | getRegion () const |
| Get the cell region. 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::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 | |
| CSGCellEngUnit (const std::string &name) | |
| Constructor for derived classes. More... | |
| virtual std::unique_ptr< CSGCellEngUnit > | clone () const =0 |
| Create a deep copy of this engineering unit for use in a different CSGBase instance. More... | |
| void | expandUnit () override=0 |
| Create the CSGCell and any other necessary components in _internal_base. More... | |
| const CSGCell & | getExpandedCell () const |
| Return the single cell in _internal_base's root, which IS the expanded cell. More... | |
| void | setName (const std::string &name) |
| 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 | 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 | resetCellFill ()=delete |
| Cell fill and region updates are not permitted on engineering units. More... | |
| void | updateCellFill (const std::string &)=delete |
| void | updateCellFill (const CSGUniverse *)=delete |
| void | updateCellFill (const CSGLattice *)=delete |
| void | updateRegion (const CSGRegion &)=delete |
| FRIEND_TEST (CSGCellTest, testSetName) | |
| Friends for unit testing. More... | |
| FRIEND_TEST (CSGCellTest, testUpdateRegion) | |
| FRIEND_TEST (CSGCellTest, testCellEquality) | |
| FRIEND_TEST (CSGCellTest, testUpdateFill) | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithTransform) | |
| Friends for unit testing. More... | |
| FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithNullTransform) | |
| FRIEND_TEST (CSGEngUnitTest, testEngUnitEqual) | |
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... | |
| 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 |
CSGCellEngUnit is an abstract base class for "engineering units" that are cell-like.
Derived classes define domain-specific attributes and implement expandUnit() to produce the equivalent CSGCell representation using basic CSG components.
Derived classes must implement:
Definition at line 38 of file CSGCellEngUnit.h.
|
protected |
Constructor for derived classes.
Initializes the base CSGCell with a placeholder empty CSGRegion.
| name | name of the cell (will be preserved on the plain CSGCell after expansion) |
Definition at line 17 of file CSGCellEngUnit.C.
|
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 |
Create the CSGCell and any other necessary components in _internal_base.
Called exclusively by CSGBase. 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 |
|
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==().
|
protected |
Return the single cell in _internal_base's root, which IS the expanded cell.
Enforces that exactly one cell is in the root (errors otherwise). Valid after expandUnit() has been called. Not valid after CSGBase::expandEngUnit() has consumed the internal base.
Definition at line 23 of file CSGCellEngUnit.C.
|
inherited |
Get the cell fill if fill type is LATTICE.
Definition at line 77 of file CSGCell.C.
Referenced by CSG::CSGBase::addCellToList(), and CSG::CSGCell::operator==().
|
inherited |
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 CSG::CSGCell::operator==().
|
inherited |
Get the name of the fill, regardless of its type.
Definition at line 48 of file CSGCell.C.
Referenced by CSG::CSGCell::operator==().
|
inlineinherited |
Get the type of fill for the cell.
Definition at line 77 of file CSGCell.h.
Referenced by CSG::CSGBase::addCellToList(), CSG::CSGCell::getFillLattice(), CSG::CSGCell::getFillMaterial(), CSG::CSGCell::getFillName(), CSG::CSGCell::getFillUniverse(), CSG::CSGCell::operator==(), and CSG::CSGBase::replaceUniverseRefs().
|
inherited |
Get the cell fill if fill type is UNIVERSE.
Definition at line 59 of file CSGCell.C.
Referenced by CSG::CSGBase::addCellToList(), CSG::CSGCell::operator==(), and CSG::CSGBase::replaceUniverseRefs().
|
inlineoverridevirtual |
Satisfy CSGEngUnit::getName() (resolved via CSGCell::getName())
Implements CSG::CSGEngUnit.
Definition at line 42 of file CSGCellEngUnit.h.
Referenced by CSG::CSGBase::expandEngUnit(), and getExpandedCell().
|
inlineinherited |
Get the cell region.
Definition at line 119 of file CSGCell.h.
Referenced by CSG::CSGBase::addCellToList(), CSG::CSGCell::operator==(), and CSG::CSGBase::replaceSurfaceRefsWithRegion().
|
inlineoverridevirtual |
Delegate to CSGCell (CSGTransformationHelper)
Implements CSG::CSGEngUnit.
Definition at line 52 of file CSGCellEngUnit.h.
|
inlineoverridevirtual |
Delegate to CSGCell (CSGTransformationHelper)
Implements CSG::CSGEngUnit.
Definition at line 59 of file CSGCellEngUnit.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 getExpandedCell(), CSG::CSGUniverseEngUnit::getExpandedUniverse(), and CSG::CSGEngUnit::operator==().
|
inlineoverridevirtual |
Engineering units report true so comparisons can skip the dynamic_cast fast path.
Reimplemented from CSG::CSGCell.
Definition at line 45 of file CSGCellEngUnit.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 CSGCellEngUnit.h.
|
inherited |
Operator overload for checking if two CSGEngUnit objects are not equal.
Definition at line 50 of file CSGEngUnit.C.
Referenced by operator!=(), CSG::CSGUniverseEngUnit::operator!=(), and CSG::CSGSurfaceEngUnit::operator!=().
|
inherited |
|
inline |
Disambiguate == and != by forwarding to CSGEngUnit (name/property-based comparison)
Definition at line 48 of file CSGCellEngUnit.h.
|
inherited |
Operator overload for checking if two CSGEngUnit objects are equal.
Definition at line 34 of file CSGEngUnit.C.
Referenced by operator==(), CSG::CSGUniverseEngUnit::operator==(), and CSG::CSGSurfaceEngUnit::operator==().
|
inherited |
Operator overload for checking if two CSGCell objects are equal.
Definition at line 126 of file CSGCell.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.
|
protecteddelete |
Cell fill and region updates are not permitted on engineering units.
The geometry is defined by the derived class and produced only via expandUnit().
|
inlineprotectedinherited |
|
protecteddelete |
|
protecteddelete |
|
protecteddelete |
|
protectedinherited |
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.
|
friend |
Definition at line 117 of file CSGCellEngUnit.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 |
Fill object if fill is CSGLattice.
Definition at line 199 of file CSGCell.h.
Referenced by CSG::CSGCell::getFillLattice(), CSG::CSGCell::getFillName(), CSG::CSGCell::resetCellFill(), and CSG::CSGCell::updateCellFill().
|
protectedinherited |
name of the fill object for CSG_MATERIAL fills
Definition at line 190 of file CSGCell.h.
Referenced by CSG::CSGCell::getFillMaterial(), CSG::CSGCell::getFillName(), CSG::CSGCell::resetCellFill(), and CSG::CSGCell::updateCellFill().
|
protectedinherited |
An enum for type of fill for cell region.
Definition at line 187 of file CSGCell.h.
Referenced by CSG::CSGCell::CSGCell(), CSG::CSGCell::getFillType(), CSG::CSGCell::resetCellFill(), and CSG::CSGCell::updateCellFill().
|
protectedinherited |
Fill object if fill is CSGUniverse.
Definition at line 196 of file CSGCell.h.
Referenced by CSG::CSGCell::getFillName(), CSG::CSGCell::getFillUniverse(), CSG::CSGCell::resetCellFill(), and CSG::CSGCell::updateCellFill().
|
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(), getExpandedCell(), CSG::CSGUniverseEngUnit::getExpandedUniverse(), and CSG::CSGEngUnit::releaseBase().
|
protectedinherited |
Name of surface.
Definition at line 184 of file CSGCell.h.
Referenced by CSG::CSGCell::getName(), and CSG::CSGCell::setName().
|
protectedinherited |
Cell region, represented as a CSGRegion object.
Definition at line 193 of file CSGCell.h.
Referenced by CSG::CSGCell::getRegion(), CSG::CSGCell::updateCellRegionSurfaces(), and CSG::CSGCell::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().
1.8.14