https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CSG::CSGCell Class Reference

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>

Inheritance diagram for CSG::CSGCell:
[legend]

Public Member Functions

 CSGCell (const std::string &name, const CSGRegion &region)
 Constructor for void cell. More...
 
 CSGCell (const std::string &name, const std::string &mat_name, const CSGRegion &region)
 Constructor for Material Cell. More...
 
 CSGCell (const std::string &name, const CSGUniverse *univ, const CSGRegion &region)
 Constructor for Universe Cell. More...
 
 CSGCell (const std::string &name, const CSGLattice *lattice, const CSGRegion &region)
 Constructor for a Lattice Cell. More...
 
virtual ~CSGCell ()=default
 Destructor. More...
 
const std::string getFillType () const
 Get the type of fill for the cell. More...
 
const CSGUniversegetFillUniverse () 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 CSGLatticegetFillLattice () 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 std::string & getName () const
 Get the cell name. More...
 
const CSGRegiongetRegion () const
 Get the cell region. More...
 
void resetCellFill ()
 Reset the cell fill to void. More...
 
void updateCellFill (const std::string &mat_name)
 Set the cell fill to a material name. More...
 
void updateCellFill (const CSGUniverse *univ)
 Set the cell fill to a universe. More...
 
void updateCellFill (const CSGLattice *lattice)
 Set the cell fill to a lattice. 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::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > & getTransformations () const
 Get the list of transformations. More...
 
std::vector< std::pair< std::string, std::tuple< Real, Real, Real > > > getTransformationsAsStrings () const
 Get the transformations of this object with string representations for types. 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

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 setName (const std::string &name)
 
void updateRegion (const CSGRegion &region)
 
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...
 
 FRIEND_TEST (CSGCellTest, testSetName)
 Friends for unit testing. More...
 
 FRIEND_TEST (CSGCellTest, testUpdateRegion)
 
 FRIEND_TEST (CSGCellTest, testCellEquality)
 
 FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithTransform)
 Friends for unit testing. More...
 
 FRIEND_TEST (CSGSurfaceTest, testHalfspaceWithNullTransform)
 

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...
 

Friends

class CSGCellList
 
class CSGBase
 

Detailed Description

CSGCell creates an internal representation of a Constructive Solid Geometry (CSG) cell, which represents a region of space filled by a material or void.

Definition at line 29 of file CSGCell.h.

Constructor & Destructor Documentation

◆ CSGCell() [1/4]

CSG::CSGCell::CSGCell ( const std::string &  name,
const CSGRegion region 
)

Constructor for void cell.

Parameters
namename of cell
regioncell region

Definition at line 18 of file CSGCell.C.

19  : _name(name), _fill_name(""), _region(region)
20 {
22  _fill_type = "VOID";
23 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
std::string _name
Name of surface.
Definition: CSGCell.h:173
CSGRegion _region
Cell region, represented as a CSGRegion object.
Definition: CSGCell.h:182
void checkValidCSGName(const std::string &name)
Check name of CSG component for disallowed characters and symbols.
Definition: CSGUtils.C:36
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179

◆ CSGCell() [2/4]

CSG::CSGCell::CSGCell ( const std::string &  name,
const std::string &  mat_name,
const CSGRegion region 
)

Constructor for Material Cell.

Parameters
namename of cell
mat_namename of the CSG material (not a MOOSE material) to use as the cell fill
regioncell region

Definition at line 25 of file CSGCell.C.

26  : _name(name), _fill_name(mat_name), _region(region)
27 {
29  _fill_type = "CSG_MATERIAL";
30 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
std::string _name
Name of surface.
Definition: CSGCell.h:173
CSGRegion _region
Cell region, represented as a CSGRegion object.
Definition: CSGCell.h:182
void checkValidCSGName(const std::string &name)
Check name of CSG component for disallowed characters and symbols.
Definition: CSGUtils.C:36
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179

◆ CSGCell() [3/4]

CSG::CSGCell::CSGCell ( const std::string &  name,
const CSGUniverse univ,
const CSGRegion region 
)

Constructor for Universe Cell.

Parameters
namename of cell
univuniverse to be the fill
regioncell region

Definition at line 32 of file CSGCell.C.

33  : _name(name), _fill_name(""), _region(region), _fill_universe(univ)
34 {
36  _fill_type = "UNIVERSE";
37 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
std::string _name
Name of surface.
Definition: CSGCell.h:173
CSGRegion _region
Cell region, represented as a CSGRegion object.
Definition: CSGCell.h:182
void checkValidCSGName(const std::string &name)
Check name of CSG component for disallowed characters and symbols.
Definition: CSGUtils.C:36
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179
const CSGUniverse * _fill_universe
Fill object if fill is CSGUniverse.
Definition: CSGCell.h:185

◆ CSGCell() [4/4]

CSG::CSGCell::CSGCell ( const std::string &  name,
const CSGLattice lattice,
const CSGRegion region 
)

Constructor for a Lattice Cell.

Parameters
namename of cell
latticelattice to be the fill
regioncell region

Definition at line 39 of file CSGCell.C.

40  : _name(name), _fill_name(""), _region(region), _fill_lattice(lattice)
41 {
43  _fill_type = "LATTICE";
44 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
std::string _name
Name of surface.
Definition: CSGCell.h:173
CSGRegion _region
Cell region, represented as a CSGRegion object.
Definition: CSGCell.h:182
const CSGLattice * _fill_lattice
Fill object if fill is CSGLattice.
Definition: CSGCell.h:188
void checkValidCSGName(const std::string &name)
Check name of CSG component for disallowed characters and symbols.
Definition: CSGUtils.C:36
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179

◆ ~CSGCell()

virtual CSG::CSGCell::~CSGCell ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addTransformation()

void CSG::CSGTransformationHelper::addTransformation ( TransformationType  type,
const std::tuple< Real, Real, Real > &  values 
)
protectedinherited

Add a transformation to the list of transformations.

Parameters
typeThe type of transformation
valuesThe values for the transformation

Definition at line 16 of file CSGTransformationHelper.C.

18 {
19  if (!isValidTransformationValue(type, values))
20  mooseError("Invalid transformation values provided for transformation type " +
22  _transformations.emplace_back(type, values);
23 }
static bool isValidTransformationValue(TransformationType type, const std::tuple< Real, Real, Real > &values)
Check if the transformation value is valid for the given type.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
static std::string getTransformationTypeString(TransformationType type)
Get the string representation of the transformation type.
std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > _transformations
List of transformations applied to this object.

◆ applyReverseTransformsToPoint()

Point CSG::CSGTransformationHelper::applyReverseTransformsToPoint ( Point  p) const
protectedinherited

update the value of point p by applying the inverse of the list of transformations to the point

Parameters
ppoint to transform
Returns
transformed point

Definition at line 74 of file CSGTransformationHelper.C.

Referenced by CSG::CSGSurface::getHalfspaceFromPoint().

75 {
76  // iterate list of transformations in reverse and apply the inverse operation
77  for (auto it = _transformations.rbegin(); it != _transformations.rend(); ++it)
78  {
79  auto trans_type = it->first;
80  auto val = it->second;
81 
82  if (trans_type == TransformationType::TRANSLATION)
83  {
84  Point offset(std::get<0>(val), std::get<1>(val), std::get<2>(val));
85  p -= offset;
86  }
87  else if (trans_type == TransformationType::SCALE)
88  {
89  Point scale(std::get<0>(val), std::get<1>(val), std::get<2>(val));
90  for (int i = 0; i < 3; ++i)
91  p(i) /= scale(i);
92  }
93  else if (trans_type == TransformationType::ROTATION)
94  {
95  // get the transpose of the original rotation matrix and apply to point p
96  const auto rot_matrix = RealTensorValue::intrinsic_rotation_matrix(
97  std::get<0>(val), std::get<1>(val), std::get<2>(val));
98  const auto rot_transpose = rot_matrix.transpose();
99  p = rot_transpose * p;
100  }
101  else
102  mooseError("Transformation type is not recognized.");
103  }
104  return p;
105 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
void scale(MeshBase &mesh, const Real xs, const Real ys=0., const Real zs=0.)
std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > _transformations
List of transformations applied to this object.
static TensorValue< Real > intrinsic_rotation_matrix(Real phi, Real theta, Real psi)

◆ FRIEND_TEST() [1/5]

CSG::CSGTransformationHelper::FRIEND_TEST ( CSGSurfaceTest  ,
testHalfspaceWithTransform   
)
protectedinherited

Friends for unit testing.

◆ FRIEND_TEST() [2/5]

CSG::CSGTransformationHelper::FRIEND_TEST ( CSGSurfaceTest  ,
testHalfspaceWithNullTransform   
)
protectedinherited

◆ FRIEND_TEST() [3/5]

CSG::CSGCell::FRIEND_TEST ( CSGCellTest  ,
testSetName   
)
protected

Friends for unit testing.

◆ FRIEND_TEST() [4/5]

CSG::CSGCell::FRIEND_TEST ( CSGCellTest  ,
testUpdateRegion   
)
protected

◆ FRIEND_TEST() [5/5]

CSG::CSGCell::FRIEND_TEST ( CSGCellTest  ,
testCellEquality   
)
protected

◆ getFillLattice()

const CSGLattice & CSG::CSGCell::getFillLattice ( ) const

Get the cell fill if fill type is LATTICE.

Returns
Reference to CSGLattice fill

Definition at line 76 of file CSGCell.C.

Referenced by CSG::CSGBase::addCellToList(), and operator==().

77 {
78  if (getFillType() != "LATTICE")
79  mooseError("Cell '" + getName() + "' has " + getFillType() + " fill, not LATTICE.");
80  else
81  return *_fill_lattice;
82 }
const std::string & getName() const
Get the cell name.
Definition: CSGCell.h:112
const std::string getFillType() const
Get the type of fill for the cell.
Definition: CSGCell.h:77
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const CSGLattice * _fill_lattice
Fill object if fill is CSGLattice.
Definition: CSGCell.h:188

◆ getFillMaterial()

const std::string & CSG::CSGCell::getFillMaterial ( ) const

Get the cell fill material name if fill fype is CSG_MATERIAL.

Returns
name of the cell's CSG material fill

Definition at line 67 of file CSGCell.C.

Referenced by CSG::CSGBase::addCellToList(), and operator==().

68 {
69  if (getFillType() != "CSG_MATERIAL")
70  mooseError("Cell '" + getName() + "' has " + getFillType() + " fill, not CSG_MATERIAL.");
71  else
72  return _fill_name;
73 }
const std::string & getName() const
Get the cell name.
Definition: CSGCell.h:112
const std::string getFillType() const
Get the type of fill for the cell.
Definition: CSGCell.h:77
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179

◆ getFillName()

const std::string & CSG::CSGCell::getFillName ( ) const

Get the name of the fill, regardless of its type.

Returns
std::string fill name

Definition at line 47 of file CSGCell.C.

Referenced by operator==().

48 {
49  if (getFillType() == "UNIVERSE")
50  return _fill_universe->getName();
51  else if (getFillType() == "LATTICE")
52  return _fill_lattice->getName();
53  else
54  return _fill_name;
55 }
const std::string getFillType() const
Get the type of fill for the cell.
Definition: CSGCell.h:77
const std::string & getName() const
Get the name of lattice.
Definition: CSGLattice.h:62
const std::string & getName() const
Get the name of the universe.
Definition: CSGUniverse.h:80
const CSGLattice * _fill_lattice
Fill object if fill is CSGLattice.
Definition: CSGCell.h:188
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179
const CSGUniverse * _fill_universe
Fill object if fill is CSGUniverse.
Definition: CSGCell.h:185

◆ getFillType()

const std::string CSG::CSGCell::getFillType ( ) const
inline

Get the type of fill for the cell.

Returns
fill type

Definition at line 77 of file CSGCell.h.

Referenced by CSG::CSGBase::addCellToList(), getFillLattice(), getFillMaterial(), getFillName(), getFillUniverse(), and operator==().

77 { return _fill_type; }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176

◆ getFillUniverse()

const CSGUniverse & CSG::CSGCell::getFillUniverse ( ) const

Get the cell fill if fill type is UNIVERSE.

Returns
Reference to CSGUniverse fill

Definition at line 58 of file CSGCell.C.

Referenced by CSG::CSGBase::addCellToList(), and operator==().

59 {
60  if (getFillType() != "UNIVERSE")
61  mooseError("Cell '" + getName() + "' has " + getFillType() + " fill, not UNIVERSE.");
62  else
63  return *_fill_universe;
64 }
const std::string & getName() const
Get the cell name.
Definition: CSGCell.h:112
const std::string getFillType() const
Get the type of fill for the cell.
Definition: CSGCell.h:77
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const CSGUniverse * _fill_universe
Fill object if fill is CSGUniverse.
Definition: CSGCell.h:185

◆ getName()

const std::string& CSG::CSGCell::getName ( ) const
inline

◆ getRegion()

const CSGRegion& CSG::CSGCell::getRegion ( ) const
inline

Get the cell region.

Returns
const CSGRegion& region of the cell

Definition at line 119 of file CSGCell.h.

Referenced by CSG::CSGBase::addCellToList(), and operator==().

119 { return _region; }
CSGRegion _region
Cell region, represented as a CSGRegion object.
Definition: CSGCell.h:182

◆ getTransformations()

const std::vector<std::pair<TransformationType, std::tuple<Real, Real, Real> > >& CSG::CSGTransformationHelper::getTransformations ( ) const
inlineinherited

Get the list of transformations.

Returns
The list of transformations

Definition at line 47 of file CSGTransformationHelper.h.

Referenced by CSG::CSGSurface::getHalfspaceFromPoint(), CSG::CSGUniverse::operator==(), CSG::CSGSurface::operator==(), operator==(), and CSG::CSGLattice::operator==().

48  {
49  return _transformations;
50  }
std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > _transformations
List of transformations applied to this object.

◆ getTransformationsAsStrings()

std::vector< std::pair< std::string, std::tuple< Real, Real, Real > > > CSG::CSGTransformationHelper::getTransformationsAsStrings ( ) const
inherited

Get the transformations of this object with string representations for types.

Returns
Vector of transformation pairs with string representations for types

Definition at line 65 of file CSGTransformationHelper.C.

66 {
67  std::vector<std::pair<std::string, std::tuple<Real, Real, Real>>> result;
68  for (const auto & transform_pair : _transformations)
69  result.emplace_back(getTransformationTypeString(transform_pair.first), transform_pair.second);
70  return result;
71 }
static std::string getTransformationTypeString(TransformationType type)
Get the string representation of the transformation type.
std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > _transformations
List of transformations applied to this object.

◆ getTransformationTypeString()

std::string CSG::CSGTransformationHelper::getTransformationTypeString ( TransformationType  type)
staticinherited

Get the string representation of the transformation type.

Parameters
typeThe transformation type
Returns
String name of the transformation type

Definition at line 56 of file CSGTransformationHelper.C.

Referenced by CSG::CSGTransformationHelper::addTransformation(), and CSG::CSGTransformationHelper::getTransformationsAsStrings().

57 {
58  // Set the enum to the value and convert it to string
60  enum_copy = static_cast<int>(type);
61  return std::string(enum_copy);
62 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:54
static const MooseEnum transformation_type_enum
MooseEnum for transformation types, matching the TransformationType enum values.

◆ isValidTransformationValue()

bool CSG::CSGTransformationHelper::isValidTransformationValue ( TransformationType  type,
const std::tuple< Real, Real, Real > &  values 
)
staticinherited

Check if the transformation value is valid for the given type.

Parameters
typeThe type of transformation
valuesThe values for the transformation
Returns
True if the values are valid for the type

Definition at line 26 of file CSGTransformationHelper.C.

Referenced by CSG::CSGTransformationHelper::addTransformation().

28 {
29  // Additional validation specific to each transformation type could be added here
30  switch (type)
31  {
33  // All translation values are inherently valid
34  return true;
35 
37  // Rotation uses euler notation; values are angles in degrees (phi, theta, psi)
38  // For consistency with TransformGenerator, there are no restrictions on the angles
39  // phi: rotation around Z-axis
40  // theta: rotation around new X-axis
41  // psi: rotation around new Z-axis
42  return true;
43 
45  // Scaling factors should be non-zero
46  if (std::get<0>(values) == 0.0 || std::get<1>(values) == 0.0 || std::get<2>(values) == 0.0)
47  return false;
48  return true;
49 
50  default:
51  mooseError("Unknown transformation type");
52  }
53 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311

◆ operator!=()

bool CSG::CSGCell::operator!= ( const CSGCell other) const

Operator overload for checking if two CSGCell objects are not equal.

Definition at line 148 of file CSGCell.C.

149 {
150  return !(*this == other);
151 }

◆ operator==()

bool CSG::CSGCell::operator== ( const CSGCell other) const

Operator overload for checking if two CSGCell objects are equal.

Definition at line 125 of file CSGCell.C.

126 {
127  const auto name_eq = this->getName() == other.getName();
128  const auto region_eq = this->getRegion() == other.getRegion();
129  const auto fill_type_eq =
130  (this->getFillType() == other.getFillType()) && (this->getFillName() == other.getFillName());
131  const auto transformations_eq = this->getTransformations() == other.getTransformations();
132  if (name_eq && region_eq && fill_type_eq && transformations_eq)
133  {
134  if (this->getFillType() == "CSG_MATERIAL")
135  return this->getFillMaterial() == other.getFillMaterial();
136  else if (this->getFillType() == "UNIVERSE")
137  return this->getFillUniverse() == other.getFillUniverse();
138  else if (this->getFillType() == "LATTICE")
139  return this->getFillLattice() == other.getFillLattice();
140  else
141  return true;
142  }
143  else
144  return false;
145 }
const CSGLattice & getFillLattice() const
Get the cell fill if fill type is LATTICE.
Definition: CSGCell.C:76
const CSGUniverse & getFillUniverse() const
Get the cell fill if fill type is UNIVERSE.
Definition: CSGCell.C:58
const std::string & getName() const
Get the cell name.
Definition: CSGCell.h:112
const std::string getFillType() const
Get the type of fill for the cell.
Definition: CSGCell.h:77
const std::string & getFillName() const
Get the name of the fill, regardless of its type.
Definition: CSGCell.C:47
const CSGRegion & getRegion() const
Get the cell region.
Definition: CSGCell.h:119
const std::string & getFillMaterial() const
Get the cell fill material name if fill fype is CSG_MATERIAL.
Definition: CSGCell.C:67
const std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > & getTransformations() const
Get the list of transformations.

◆ resetCellFill()

void CSG::CSGCell::resetCellFill ( )

Reset the cell fill to void.

Definition at line 85 of file CSGCell.C.

Referenced by CSG::CSGBase::resetCellFill(), and updateCellFill().

86 {
87  _fill_name = "";
88  _fill_universe = nullptr;
89  _fill_lattice = nullptr;
90  _fill_type = "VOID";
91 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
const CSGLattice * _fill_lattice
Fill object if fill is CSGLattice.
Definition: CSGCell.h:188
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179
const CSGUniverse * _fill_universe
Fill object if fill is CSGUniverse.
Definition: CSGCell.h:185

◆ setName()

void CSG::CSGCell::setName ( const std::string &  name)
inlineprotected

Definition at line 166 of file CSGCell.h.

166 { _name = name; }
std::string name(const ElemQuality q)
std::string _name
Name of surface.
Definition: CSGCell.h:173

◆ updateCellFill() [1/3]

void CSG::CSGCell::updateCellFill ( const std::string &  mat_name)

Set the cell fill to a material name.

Parameters
mat_namename of material fill

Definition at line 94 of file CSGCell.C.

Referenced by CSG::CSGBase::updateCellFill().

95 {
96  resetCellFill();
97  _fill_type = "CSG_MATERIAL";
98  _fill_name = mat_name;
99 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
void resetCellFill()
Reset the cell fill to void.
Definition: CSGCell.C:85
std::string _fill_name
name of the fill object for CSG_MATERIAL fills
Definition: CSGCell.h:179

◆ updateCellFill() [2/3]

void CSG::CSGCell::updateCellFill ( const CSGUniverse univ)

Set the cell fill to a universe.

Parameters
univuniverse fill

Definition at line 102 of file CSGCell.C.

103 {
104  resetCellFill();
105  _fill_type = "UNIVERSE";
106  _fill_universe = univ;
107 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
void resetCellFill()
Reset the cell fill to void.
Definition: CSGCell.C:85
const CSGUniverse * _fill_universe
Fill object if fill is CSGUniverse.
Definition: CSGCell.h:185

◆ updateCellFill() [3/3]

void CSG::CSGCell::updateCellFill ( const CSGLattice lattice)

Set the cell fill to a lattice.

Parameters
latticelattice fill

Definition at line 110 of file CSGCell.C.

111 {
112  resetCellFill();
113  _fill_type = "LATTICE";
114  _fill_lattice = lattice;
115 }
MooseEnum _fill_type
An enum for type of fill for cell region.
Definition: CSGCell.h:176
void resetCellFill()
Reset the cell fill to void.
Definition: CSGCell.C:85
const CSGLattice * _fill_lattice
Fill object if fill is CSGLattice.
Definition: CSGCell.h:188

◆ updateCellRegionSurfaces()

void CSG::CSGCell::updateCellRegionSurfaces ( std::map< std::string, std::reference_wrapper< const CSGSurface >> &  identical_surface_refs)
protected

Update surface references of cell region based on map of input surface references.

Parameters
identical_surface_refsmap of surface name to surface references that region should be defined with

Definition at line 118 of file CSGCell.C.

120 {
121  _region.updateSurfaceReferences(identical_surface_refs);
122 }
CSGRegion _region
Cell region, represented as a CSGRegion object.
Definition: CSGCell.h:182
void updateSurfaceReferences(std::map< std::string, std::reference_wrapper< const CSGSurface >> &identical_surface_refs)
Update surface references of region based on map of input surface references.
Definition: CSGRegion.C:252

◆ updateRegion()

void CSG::CSGCell::updateRegion ( const CSGRegion region)
inlineprotected

Definition at line 170 of file CSGCell.h.

Referenced by CSG::CSGBase::updateCellRegion().

170 { _region = region; }
CSGRegion _region
Cell region, represented as a CSGRegion object.
Definition: CSGCell.h:182

Friends And Related Function Documentation

◆ CSGBase

friend class CSGBase
friend

Definition at line 191 of file CSGCell.h.

◆ CSGCellList

friend class CSGCellList
friend

Definition at line 190 of file CSGCell.h.

Member Data Documentation

◆ _fill_lattice

const CSGLattice* CSG::CSGCell::_fill_lattice
protected

Fill object if fill is CSGLattice.

Definition at line 188 of file CSGCell.h.

Referenced by getFillLattice(), getFillName(), resetCellFill(), and updateCellFill().

◆ _fill_name

std::string CSG::CSGCell::_fill_name
protected

name of the fill object for CSG_MATERIAL fills

Definition at line 179 of file CSGCell.h.

Referenced by getFillMaterial(), getFillName(), resetCellFill(), and updateCellFill().

◆ _fill_type

MooseEnum CSG::CSGCell::_fill_type {"VOID CSG_MATERIAL UNIVERSE LATTICE"}
protected

An enum for type of fill for cell region.

Definition at line 176 of file CSGCell.h.

Referenced by CSGCell(), getFillType(), resetCellFill(), and updateCellFill().

◆ _fill_universe

const CSGUniverse* CSG::CSGCell::_fill_universe
protected

Fill object if fill is CSGUniverse.

Definition at line 185 of file CSGCell.h.

Referenced by getFillName(), getFillUniverse(), resetCellFill(), and updateCellFill().

◆ _name

std::string CSG::CSGCell::_name
protected

Name of surface.

Definition at line 173 of file CSGCell.h.

Referenced by getName(), and setName().

◆ _region

CSGRegion CSG::CSGCell::_region
protected

Cell region, represented as a CSGRegion object.

Definition at line 182 of file CSGCell.h.

Referenced by getRegion(), updateCellRegionSurfaces(), and updateRegion().

◆ _transformations

std::vector<std::pair<TransformationType, std::tuple<Real, Real, Real> > > CSG::CSGTransformationHelper::_transformations
protectedinherited

The documentation for this class was generated from the following files: