https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
CSG Namespace Reference

Classes

class  CSGBase
 CSGBase creates an internal representation of a Constructive Solid Geometry (CSG) model. More...
 
class  CSGCartesianLattice
 CSGCartesianLattice is the class for constructing regular Cartesian lattices of CSGUniverses. More...
 
class  CSGCell
 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...
 
class  CSGCellEngUnit
 CSGCellEngUnit is an abstract base class for "engineering units" that are cell-like. More...
 
class  CSGCellList
 CSGCellList creates a container for CSGCell objects to pass to CSGBase object. More...
 
class  CSGEngUnit
 CSGEngUnit is the abstract base class for all "engineering unit" types in the CSG system. More...
 
class  CSGEngUnitList
 CSGEngUnitList is a non-owning index of CSGEngUnit objects stored in the type lists (CSGSurfaceList, CSGCellList, CSGUniverseList) of a CSGBase instance. More...
 
class  CSGHexagonalLattice
 CSGHexagonalLattice is the class for constructing hexagonal lattices of CSGUniverses arranged in concentric hexagonal rings. More...
 
class  CSGLattice
 CSGLattice is the abstract class for defining lattices. More...
 
class  CSGLatticeList
 CSGLatticeList creates a container for CSGLattice objects to pass to CSGBase. More...
 
class  CSGNPolygonUnit
 CSGNPolygonUnit is a CSGSurfaceEngUnit that represents a regular N-sided polygon (prismatic region) with its axis aligned with the z-axis. More...
 
class  CSGPlane
 CSGPlane creates an internal representation of a Constructive Solid Geometry (CSG) plane, represented in the form aX + bY + cZ = d. More...
 
class  CSGRegion
 CSGRegions creates an internal representation of a CSG region, which can refer to an intersection, union, complement, or half-space. More...
 
class  CSGSphere
 CSGSphere creates an internal representation of a Constructive Solid Geometry (CSG) sphere, represented in the form (x - x0)^2 + (y - y0)^2 + (z - z0)^2 = r^2. More...
 
class  CSGSurface
 CSGSurface creates an internal representation of a Constructive Solid Geometry (CSG) surface, represented as some polynomial in x, y, and z. More...
 
class  CSGSurfaceEngUnit
 CSGSurfaceEngUnit is an abstract base class for "engineering units" that can be used as surfaces in cell region definitions. More...
 
class  CSGSurfaceList
 CSGSurfaceList is a container for storing CSGSurface objects in the CSGBase object. More...
 
class  CSGTransformationHelper
 Class for managing transformations in CSG objects. More...
 
class  CSGUniverse
 CSGUniverse creates an internal representation of a Constructive Solid Geometry (CSG) universe, which represents a collection of cells that can be defined repeatedly within a separate container of cells. More...
 
class  CSGUniverseEngUnit
 CSGUniverseEngUnit is an abstract base class for "engineering units" that are universe-like. More...
 
class  CSGUniverseList
 CSGUniverseList creates a container for CSGUniverse objects to pass to CSGBase. More...
 
class  CSGXCylinder
 CSGXCylinder creates an internal representation of a Constructive Solid Geometry (CSG) x-axis aligned cylinder, represented in the following form (y - y0)^2 + (z - z0)^2 = r^2. More...
 
class  CSGYCylinder
 CSGYCylinder creates an internal representation of a Constructive Solid Geometry (CSG) y-axis aligned cylinder, represented in the following form (x - x0)^2 + (z - z0)^2 = r^2. More...
 
class  CSGZCylinder
 CSGZCylinder creates an internal representation of a Constructive Solid Geometry (CSG) z-axis aligned cylinder, represented in the following form (x - x0)^2 + (y - y0)^2 = r^2. More...
 

Typedefs

typedef std::variant< std::reference_wrapper< const CSGSurface >, std::reference_wrapper< const CSGCell >, std::reference_wrapper< const CSGUniverse >, std::reference_wrapper< const CSGRegion >, std::reference_wrapper< const CSGLattice >, std::reference_wrapper< const CSGEngUnit > > CSGObjectVariant
 Define a variant type that can hold references to different CSG object types.
 
typedef std::variant< std::reference_wrapper< const CSGUniverse >, std::string > OuterVariant
 Type definition for a variant that can hold either a CSGUniverse reference or a string for use as the outer parameter in lattice constructors.
 

Enumerations

enum class  RotationAxisType { X = 0 , Y = 1 , Z = 2 }
 Enumeration of axis types for rotations. More...
 
enum class  TransformationType { TRANSLATION = 0 , ROTATION = 1 , SCALE = 2 }
 Enumeration of transformation types that can be applied to CSG objects. More...
 

Functions

unsigned int nRowToRing (int nrow)
 methods to help convert between number of rows and rings get the total number of rings from the number of rows
 
unsigned int nRingToRow (int nring)
 get the total number of rows from the number of rings
 
const CSGRegion operator+ (const CSGSurface &surf)
 Operation overloads for operation based region construction.
 
const CSGRegion operator- (const CSGSurface &surf)
 Overload for creating a region from the negative half-space (-) of a surface.
 
const CSGRegion operator& (const CSGRegion &region_a, const CSGRegion &region_b)
 Overload for creating a region from the the intersection (&) of two regions.
 
const CSGRegion operator| (const CSGRegion &region_a, const CSGRegion &region_b)
 Overload for creating a region from the union (|) of two regions.
 
const CSGRegion operator~ (const CSGRegion &region)
 Overload for creating a region from the complement (~) of another region.
 

Variables

static const MooseEnum transformation_type_enum {"TRANSLATION=0 ROTATION=1 SCALE=2"}
 MooseEnum for transformation types, matching the TransformationType enum values.
 

Typedef Documentation

◆ CSGObjectVariant

typedef std::variant<std::reference_wrapper<const CSGSurface>, std::reference_wrapper<const CSGCell>, std::reference_wrapper<const CSGUniverse>, std::reference_wrapper<const CSGRegion>, std::reference_wrapper<const CSGLattice>, std::reference_wrapper<const CSGEngUnit> > CSG::CSGObjectVariant

Define a variant type that can hold references to different CSG object types.

Definition at line 47 of file CSGBase.h.

◆ OuterVariant

typedef std::variant<std::reference_wrapper<const CSGUniverse>, std::string> CSG::OuterVariant

Type definition for a variant that can hold either a CSGUniverse reference or a string for use as the outer parameter in lattice constructors.

Definition at line 29 of file CSGLattice.h.

Enumeration Type Documentation

◆ RotationAxisType

enum class CSG::RotationAxisType
strong

Enumeration of axis types for rotations.

Enumerator

Definition at line 31 of file CSGBase.h.

32{
33 X = 0, // X axis
34 Y = 1, // Y axis
35 Z = 2 // Z axis
36};

◆ TransformationType

enum class CSG::TransformationType
strong

Enumeration of transformation types that can be applied to CSG objects.

Enumerator
TRANSLATION 
ROTATION 
SCALE 

Definition at line 25 of file CSGTransformationHelper.h.

26{
27 TRANSLATION = 0, // Translation in x, y, z directions
28 ROTATION = 1, // Rotation in the form of euler angles (phi, theta, psi)
29 SCALE = 2 // Scaling in x, y, z directions
30};

Function Documentation

◆ nRingToRow()

unsigned int CSG::nRingToRow ( int  nring)

get the total number of rows from the number of rings

Definition at line 250 of file CSGHexagonalLattice.C.

251{
252 if (nring == 0) // special case
253 return 0;
254 if (nring < 0)
255 mooseError("Cannot convert number of rings " + std::to_string(nring) +
256 " to number of rows in hexagonal lattice. Number of rings must be >= 0.");
257 return 2 * nring - 1;
258}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311

◆ nRowToRing()

unsigned int CSG::nRowToRing ( int  nrow)

methods to help convert between number of rows and rings get the total number of rings from the number of rows

convenience functions for converting between number of rows and number of rings

Definition at line 236 of file CSGHexagonalLattice.C.

237{
238 if (nrow == 0) // special case
239 return 0;
240 std::string base_msg = "Cannot convert number of rows " + std::to_string(nrow) +
241 " to number of rings in hexagonal lattice. ";
242 if (nrow < 0)
243 mooseError(base_msg + "Number of rows must be >= 0.");
244 if (nrow % 2 == 0)
245 mooseError(base_msg + "Number of rows must be odd.");
246 return (nrow + 1) / 2;
247}

Referenced by CSG::CSGHexagonalLattice::setUniverses().

◆ operator&()

const CSGRegion CSG::operator& ( const CSGRegion region_a,
const CSGRegion region_b 
)

Overload for creating a region from the the intersection (&) of two regions.

Definition at line 333 of file CSGRegion.C.

334{
335 return CSGRegion(region_a, region_b, "INTERSECTION");
336}
CSGRegions creates an internal representation of a CSG region, which can refer to an intersection,...
Definition CSGRegion.h:23

◆ operator+()

const CSGRegion CSG::operator+ ( const CSGSurface surf)

Operation overloads for operation based region construction.

Overload for creating a region from the positive half-space (+) of a surface

Definition at line 319 of file CSGRegion.C.

320{
321 return CSGRegion(surf, CSGSurface::Halfspace::POSITIVE);
322}

◆ operator-()

const CSGRegion CSG::operator- ( const CSGSurface surf)

Overload for creating a region from the negative half-space (-) of a surface.

Definition at line 326 of file CSGRegion.C.

327{
328 return CSGRegion(surf, CSGSurface::Halfspace::NEGATIVE);
329}

◆ operator|()

const CSGRegion CSG::operator| ( const CSGRegion region_a,
const CSGRegion region_b 
)

Overload for creating a region from the union (|) of two regions.

Definition at line 340 of file CSGRegion.C.

341{
342 return CSGRegion(region_a, region_b, "UNION");
343}

◆ operator~()

const CSGRegion CSG::operator~ ( const CSGRegion region)

Overload for creating a region from the complement (~) of another region.

Definition at line 347 of file CSGRegion.C.

348{
349 return CSGRegion(region, "COMPLEMENT");
350}

Variable Documentation

◆ transformation_type_enum

const MooseEnum CSG::transformation_type_enum {"TRANSLATION=0 ROTATION=1 SCALE=2"}
static

MooseEnum for transformation types, matching the TransformationType enum values.

Definition at line 33 of file CSGTransformationHelper.h.

33{"TRANSLATION=0 ROTATION=1 SCALE=2"};

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