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

CSGRegions creates an internal representation of a CSG region, which can refer to an intersection, union, complement, or half-space. More...

#include <CSGRegion.h>

Public Types

enum  RegionType {
  RegionType::EMPTY, RegionType::HALFSPACE, RegionType::COMPLEMENT, RegionType::INTERSECTION,
  RegionType::UNION
}
 Enum for representing region types, defined to match _region_type MooseEnum. More...
 
typedef std::variant< std::reference_wrapper< const CSGSurface >, RegionType, CSGSurface::HalfspacePostfixTokenVariant
 Type definition for a variant that represents the datatypes for entries within the list that represents the region in postfix notation. More...
 

Public Member Functions

 CSGRegion ()
 Default Constructor. More...
 
 CSGRegion (const CSGSurface &surf, const CSGSurface::Halfspace halfspace)
 Constructor for half-space of a surface. More...
 
 CSGRegion (const CSGRegion &region_a, const CSGRegion &region_b, const std::string &region_type)
 Constructor for union and intersection. More...
 
 CSGRegion (const CSGRegion &region, const std::string &region_type)
 Constructor for complement or empty region (clear the region) More...
 
virtual ~CSGRegion ()=default
 Destructor. More...
 
nlohmann::json toInfixJSON () const
 gets the infix JSON representation of the region, which involves converting region representation from postfix to infix notation More...
 
std::vector< std::string > toPostfixStringList () const
 gets the list of postfix tokens of the region in string representation More...
 
std::string postfixTokenToString (const PostfixTokenVariant &token) const
 converts postfix token from PostfixTokenVariant to string representation More...
 
RegionType getRegionType () const
 Get the region type. More...
 
const std::string getRegionTypeString () const
 Get the region type as a string. More...
 
std::vector< std::reference_wrapper< const CSGSurface > > getSurfaces () const
 Get the list of surfaces associated with the region. More...
 
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. More...
 
CSGRegionoperator &= (const CSGRegion &other_region)
 Operator overload for &= which creates an intersection between the current region and the other_region. More...
 
CSGRegionoperator|= (const CSGRegion &other_region)
 Operator overload for |= which creates a union of the current region with the other_region. More...
 
bool operator== (const CSGRegion &other) const
 Operator overload for checking if two CSGRegion objects are equal. More...
 
bool operator!= (const CSGRegion &other) const
 Operator overload for checking if two CSGRegion objects are not equal. More...
 

Static Public Member Functions

static char regionSymbol (const RegionType region_type)
 
static char halfspaceSymbol (const CSGSurface::Halfspace halfspace)
 

Protected Member Functions

const std::vector< PostfixTokenVariant > & getPostfixTokens () const
 Get the list of postfix tokens associated with the region. More...
 
bool nextRegionOpIsIdentical (const RegionType region, const std::size_t postfix_token_index) const
 Iterate through postfix tokens and check if next region operator matches the given operator. More...
 
bool checkRegionEquality (const std::vector< PostfixTokenVariant > &other_tokens) const
 Loop through postfix tokens and check equality with another list of postfix tokens. More...
 

Protected Attributes

MooseEnum _region_type {"EMPTY=0 HALFSPACE=1 COMPLEMENT=2 INTERSECTION=3 UNION=4"}
 An enum for type of type of operation that defines region. More...
 
std::vector< PostfixTokenVariant_postfix_tokens
 List of tokens representing the region in postfix notation. More...
 

Detailed Description

CSGRegions creates an internal representation of a CSG region, which can refer to an intersection, union, complement, or half-space.

Definition at line 22 of file CSGRegion.h.

Member Typedef Documentation

◆ PostfixTokenVariant

typedef std::variant<std::reference_wrapper<const CSGSurface>, RegionType, CSGSurface::Halfspace> CSG::CSGRegion::PostfixTokenVariant

Type definition for a variant that represents the datatypes for entries within the list that represents the region in postfix notation.

This can be a surface reference, a region type, or halfspace

Definition at line 41 of file CSGRegion.h.

Member Enumeration Documentation

◆ RegionType

Enum for representing region types, defined to match _region_type MooseEnum.

Enumerator
EMPTY 
HALFSPACE 
COMPLEMENT 
INTERSECTION 
UNION 

Definition at line 26 of file CSGRegion.h.

27  {
28  EMPTY,
29  HALFSPACE,
30  COMPLEMENT,
31  INTERSECTION,
32  UNION
33  };

Constructor & Destructor Documentation

◆ CSGRegion() [1/4]

CSG::CSGRegion::CSGRegion ( )

Default Constructor.

Definition at line 90 of file CSGRegion.C.

Referenced by operator|=().

91 {
92  _region_type = "EMPTY";
93  _postfix_tokens.clear();
94 }
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186
MooseEnum _region_type
An enum for type of type of operation that defines region.
Definition: CSGRegion.h:183

◆ CSGRegion() [2/4]

CSG::CSGRegion::CSGRegion ( const CSGSurface surf,
const CSGSurface::Halfspace  halfspace 
)

Constructor for half-space of a surface.

Parameters
surfreferance to surface used to define the half-space
halfspacehalf-space to apply to surface (POSITIVE or NEGATIVE)

Definition at line 97 of file CSGRegion.C.

98 {
99  _region_type = "HALFSPACE";
100 
101  // (halfspace surf) in postfix is represented as (surf halfspace)
102  _postfix_tokens.push_back(surf);
103  _postfix_tokens.push_back(halfspace);
104 }
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186
MooseEnum _region_type
An enum for type of type of operation that defines region.
Definition: CSGRegion.h:183

◆ CSGRegion() [3/4]

CSG::CSGRegion::CSGRegion ( const CSGRegion region_a,
const CSGRegion region_b,
const std::string &  region_type 
)

Constructor for union and intersection.

Parameters
region_areference to first region to union or intersect
region_breference to second region to union or intersect
region_typetype of region operation (UNION or INTERSECTION)

Definition at line 107 of file CSGRegion.C.

110 {
111  _region_type = region_type;
113  mooseError("Region type " + getRegionTypeString() + " is not supported for two regions.");
114  if (region_a.getRegionType() == RegionType::EMPTY ||
115  region_b.getRegionType() == RegionType::EMPTY)
116  mooseError("Region operation " + getRegionTypeString() +
117  " cannot be performed on an empty region.");
118 
119  // (region_a region_type region_b) in postfix is represented as (region_a region_b region_type)
120  _postfix_tokens.insert(_postfix_tokens.end(),
121  region_a.getPostfixTokens().begin(),
122  region_a.getPostfixTokens().end());
123  _postfix_tokens.insert(_postfix_tokens.end(),
124  region_b.getPostfixTokens().begin(),
125  region_b.getPostfixTokens().end());
126  _postfix_tokens.push_back(getRegionType());
127 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186
RegionType getRegionType() const
Get the region type.
Definition: CSGRegion.h:117
MooseEnum _region_type
An enum for type of type of operation that defines region.
Definition: CSGRegion.h:183
const std::string getRegionTypeString() const
Get the region type as a string.
Definition: CSGRegion.h:124

◆ CSGRegion() [4/4]

CSG::CSGRegion::CSGRegion ( const CSGRegion region,
const std::string &  region_type 
)

Constructor for complement or empty region (clear the region)

Parameters
regionreference to region to apply complement
region_typetype of region to apply (COMPLEMENT or EMPTY)

Definition at line 130 of file CSGRegion.C.

131 {
132  _region_type = region_type;
134  mooseError("Region type " + getRegionTypeString() + " is not supported for a single region.");
135 
137  {
138  // (complement region) in postfix is represented as (region complement)
139  _postfix_tokens = region.getPostfixTokens();
140  _postfix_tokens.push_back(getRegionType());
141  }
142  else if (getRegionType() == RegionType::EMPTY)
143  _postfix_tokens.clear();
144 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186
RegionType getRegionType() const
Get the region type.
Definition: CSGRegion.h:117
MooseEnum _region_type
An enum for type of type of operation that defines region.
Definition: CSGRegion.h:183
const std::string getRegionTypeString() const
Get the region type as a string.
Definition: CSGRegion.h:124

◆ ~CSGRegion()

virtual CSG::CSGRegion::~CSGRegion ( )
virtualdefault

Destructor.

Member Function Documentation

◆ checkRegionEquality()

bool CSG::CSGRegion::checkRegionEquality ( const std::vector< PostfixTokenVariant > &  other_tokens) const
protected

Loop through postfix tokens and check equality with another list of postfix tokens.

Parameters
other_tokenslist of postfix tokens to compare to
Returns
true if postfix token lists are equal, false otherwise

Definition at line 54 of file CSGRegion.C.

Referenced by operator==().

55 {
56  const auto & tokens = getPostfixTokens();
57  if (tokens.size() != other_tokens.size())
58  return false;
59 
60  // Loop through all tokens and check equality
61  for (const auto i : index_range(tokens))
62  {
63  const auto & token = tokens[i];
64  const auto & other_token = other_tokens[i];
65  if (std::holds_alternative<std::reference_wrapper<const CSGSurface>>(token))
66  {
67  // For surface references, compare references themselves for equality
68  if (!std::holds_alternative<std::reference_wrapper<const CSGSurface>>(other_token))
69  return false;
70  const auto & surf_ref = std::get<std::reference_wrapper<const CSGSurface>>(token);
71  const auto & other_surf_ref = std::get<std::reference_wrapper<const CSGSurface>>(other_token);
72  if (surf_ref.get() != other_surf_ref.get())
73  return false;
74  }
75  else
76  {
77  // For region types and halfspaces, compare based on string representations
78  mooseAssert(std::holds_alternative<RegionType>(token) ||
79  std::holds_alternative<CSGSurface::Halfspace>(token),
80  "Unexpected token type");
81  if (std::holds_alternative<std::reference_wrapper<const CSGSurface>>(other_token))
82  return false;
83  if (postfixTokenToString(token) != postfixTokenToString(other_token))
84  return false;
85  }
86  }
87  return true;
88 }
const std::vector< PostfixTokenVariant > & getPostfixTokens() const
Get the list of postfix tokens associated with the region.
Definition: CSGRegion.h:160
std::string postfixTokenToString(const PostfixTokenVariant &token) const
converts postfix token from PostfixTokenVariant to string representation
Definition: CSGRegion.C:224
auto index_range(const T &sizable)

◆ getPostfixTokens()

const std::vector<PostfixTokenVariant>& CSG::CSGRegion::getPostfixTokens ( ) const
inlineprotected

Get the list of postfix tokens associated with the region.

Returns
list of tokens that define the region in postfix notation

Definition at line 160 of file CSGRegion.h.

Referenced by checkRegionEquality(), CSGRegion(), and operator==().

160 { return _postfix_tokens; }
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186

◆ getRegionType()

RegionType CSG::CSGRegion::getRegionType ( ) const
inline

Get the region type.

Returns
region type enum

Definition at line 117 of file CSGRegion.h.

Referenced by CSGRegion(), CSGUtils::getInnerRegion(), and operator==().

117 { return _region_type.getEnum<RegionType>(); }
T getEnum() const
get the current value cast to the enum type T
Definition: MooseEnum.h:172
MooseEnum _region_type
An enum for type of type of operation that defines region.
Definition: CSGRegion.h:183
RegionType
Enum for representing region types, defined to match _region_type MooseEnum.
Definition: CSGRegion.h:26

◆ getRegionTypeString()

const std::string CSG::CSGRegion::getRegionTypeString ( ) const
inline

Get the region type as a string.

Returns
region type string

Definition at line 124 of file CSGRegion.h.

Referenced by CSGRegion().

124 { return _region_type; }
MooseEnum _region_type
An enum for type of type of operation that defines region.
Definition: CSGRegion.h:183

◆ getSurfaces()

std::vector< std::reference_wrapper< const CSGSurface > > CSG::CSGRegion::getSurfaces ( ) const

Get the list of surfaces associated with the region.

Returns
list of references to surfaces that define the region

Definition at line 266 of file CSGRegion.C.

Referenced by CSG::CSGBase::addTransformation(), and CSG::CSGBase::checkRegionSurfaces().

267 {
268  std::vector<std::reference_wrapper<const CSGSurface>> surface_references;
269  for (auto & token : _postfix_tokens)
270  if (std::holds_alternative<std::reference_wrapper<const CSGSurface>>(token))
271  surface_references.push_back(std::get<std::reference_wrapper<const CSGSurface>>(token));
272 
273  return surface_references;
274 }
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186

◆ halfspaceSymbol()

char CSG::CSGRegion::halfspaceSymbol ( const CSGSurface::Halfspace  halfspace)
static
Returns
The symbol associated with the given halfspace

Definition at line 37 of file CSGRegion.C.

Referenced by postfixTokenToString(), and toInfixJSON().

38 {
39  mooseAssert(halfspace == CSGSurface::Halfspace::POSITIVE ||
41  "Unexpected halfspace");
42 
43  constexpr std::array<char, 2> symbols = {
44  '+', // CSGSurface::Halfspace::POSITIVE
45  '-' // CSGSurface::Halfspace::NEGATIVE
46  };
47  static_assert(symbols[static_cast<std::size_t>(CSGSurface::Halfspace::POSITIVE)] == '+');
48  static_assert(symbols[static_cast<std::size_t>(CSGSurface::Halfspace::NEGATIVE)] == '-');
49 
50  return symbols[static_cast<std::size_t>(halfspace)];
51 }

◆ nextRegionOpIsIdentical()

bool CSG::CSGRegion::nextRegionOpIsIdentical ( const RegionType  region,
const std::size_t  postfix_token_index 
) const
protected

Iterate through postfix tokens and check if next region operator matches the given operator.

Parameters
regionthe region type
postfix_token_indexindex in _postfix_tokens to start region operator comparisons
Returns
true if next region operator in _postfix_tokens matches region_op_string, false otherwise

Definition at line 242 of file CSGRegion.C.

Referenced by toInfixJSON().

244 {
245  for (const auto i : make_range(postfix_token_index, _postfix_tokens.size()))
246  if (const auto region_ptr = std::get_if<RegionType>(&_postfix_tokens[i]))
247  return region == *region_ptr;
248  return false;
249 }
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186
IntRange< T > make_range(T beg, T end)

◆ operator &=()

CSGRegion& CSG::CSGRegion::operator&= ( const CSGRegion other_region)

Operator overload for &= which creates an intersection between the current region and the other_region.

◆ operator!=()

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

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

Definition at line 337 of file CSGRegion.C.

338 {
339  return !(*this == other);
340 }

◆ operator==()

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

Operator overload for checking if two CSGRegion objects are equal.

Definition at line 330 of file CSGRegion.C.

331 {
332  const bool region_type_eq = this->getRegionType() == other.getRegionType();
333  return (region_type_eq && checkRegionEquality(other.getPostfixTokens()));
334 }
RegionType getRegionType() const
Get the region type.
Definition: CSGRegion.h:117
bool checkRegionEquality(const std::vector< PostfixTokenVariant > &other_tokens) const
Loop through postfix tokens and check equality with another list of postfix tokens.
Definition: CSGRegion.C:54

◆ operator|=()

CSGRegion & CSG::CSGRegion::operator|= ( const CSGRegion other_region)

Operator overload for |= which creates a union of the current region with the other_region.

Definition at line 285 of file CSGRegion.C.

286 {
287  if (this != &other_region)
288  *this = CSGRegion(*this, other_region, "UNION");
289  return *this;
290 }
CSGRegion()
Default Constructor.
Definition: CSGRegion.C:90

◆ postfixTokenToString()

std::string CSG::CSGRegion::postfixTokenToString ( const PostfixTokenVariant token) const

converts postfix token from PostfixTokenVariant to string representation

Parameters
tokenpostfix token of type PostfixTokenVariant
Returns
string representation of postfix token

Definition at line 224 of file CSGRegion.C.

Referenced by checkRegionEquality(), and toPostfixStringList().

225 {
226  // Lambda function to return all variant types as strings
227  return std::visit(
228  [](auto && arg) -> std::string
229  {
230  using T = std::decay_t<decltype(arg)>;
231  if constexpr (std::is_same_v<T, std::reference_wrapper<const CSGSurface>>)
232  return arg.get().getName();
233  else if constexpr (std::is_same_v<T, RegionType>)
234  return std::string{regionSymbol(arg)};
235  else // if constexpr (std::is_same_v<T, CSGSurface::Halfspace>)
236  return std::string{halfspaceSymbol(arg)};
237  },
238  token);
239 }
static char halfspaceSymbol(const CSGSurface::Halfspace halfspace)
Definition: CSGRegion.C:37
static char regionSymbol(const RegionType region_type)
Definition: CSGRegion.C:16
RegionType
Enum for representing region types, defined to match _region_type MooseEnum.
Definition: CSGRegion.h:26
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD

◆ regionSymbol()

char CSG::CSGRegion::regionSymbol ( const RegionType  region_type)
static
Returns
The symbol associated with the given region type

Definition at line 16 of file CSGRegion.C.

Referenced by postfixTokenToString(), and toInfixJSON().

17 {
18  mooseAssert(region_type == RegionType::COMPLEMENT || region_type == RegionType::UNION ||
19  region_type == RegionType::INTERSECTION,
20  "Unexpected region type");
21 
22  constexpr std::array<char, 5> symbols = {
23  '\0', // CSGRegion::RegionType::EMPTY (unused)
24  '\0', // CSGRegion::RegionType::HALFSPACE (unused)
25  '~', // CSGRegion::RegionType::COMPLEMENT
26  '&', // CSGRegion::RegionType::INTERSECTION
27  '|' // CSGRegion::RegionType::UNION
28  };
29  static_assert(symbols[static_cast<std::size_t>(RegionType::COMPLEMENT)] == '~');
30  static_assert(symbols[static_cast<std::size_t>(RegionType::INTERSECTION)] == '&');
31  static_assert(symbols[static_cast<std::size_t>(RegionType::UNION)] == '|');
32 
33  return symbols[static_cast<std::size_t>(region_type)];
34 }

◆ toInfixJSON()

nlohmann::json CSG::CSGRegion::toInfixJSON ( ) const

gets the infix JSON representation of the region, which involves converting region representation from postfix to infix notation

Returns
infix JSON representation of the region

Definition at line 147 of file CSGRegion.C.

148 {
149  // Return an empty JSON object if no postfix tokens are defined
150  if (_postfix_tokens.empty())
151  return nlohmann::json::parse("[]");
152 
153  // Build the region string using a stack, iterating through each token within _postfix_tokens
154  std::stack<std::string> postfix_stack;
155  for (auto i : index_range(_postfix_tokens))
156  {
157  const auto & token = _postfix_tokens[i];
158  // Surface: Push name to stack
159  if (const auto surface_ref_ptr = std::get_if<std::reference_wrapper<const CSGSurface>>(&token))
160  postfix_stack.push(surface_ref_ptr->get().getName());
161  // Halfspaces and region operators
162  else
163  {
164  std::string region_string;
165  // Halfspace: Pop from the stack, update region string, push back
166  if (const auto halfspace_ptr = std::get_if<CSGSurface::Halfspace>(&token))
167  {
168  std::string symbol = std::string(1, halfspaceSymbol(*halfspace_ptr));
169  region_string = "\"" + symbol + postfix_stack.top() + "\"";
170  postfix_stack.pop();
171  }
172  // Region operator: Pop 1 or 2 values, update region string, push back
173  else
174  {
175  const auto region = std::get<RegionType>(token);
176  const std::string symbol{regionSymbol(region)};
177  if (region == RegionType::COMPLEMENT)
178  {
179  region_string = postfix_stack.top();
180  postfix_stack.pop();
181  if (region_string[0] == '[')
182  region_string = "\"" + symbol + "\", " + region_string;
183  else
184  region_string = "\"" + symbol + "\", [" + region_string + "]";
185  }
186  else
187  {
188  auto region_string_b = postfix_stack.top();
189  postfix_stack.pop();
190  auto region_string_a = postfix_stack.top();
191  postfix_stack.pop();
192  region_string = region_string_a + ", \"" + symbol + "\", " + region_string_b;
193  // Skip putting parentheses around the region string if the next region operator in the
194  // postfix token list is identical
195  if (!nextRegionOpIsIdentical(region, i + 1))
196  region_string = "[" + region_string + "]";
197  }
198  }
199  postfix_stack.push(region_string);
200  }
201  }
202 
203  // Top of stack should now have region string we desire. Now, we
204  // parse the string into a JSON object
205  std::string region_string = postfix_stack.top();
206  // Wrap region string in square brackets so that it is always treated as a
207  // list in the output JSON object
208  if (region_string[0] != '[')
209  region_string = "[" + region_string + "]";
210  return nlohmann::json::parse(region_string);
211 }
static char halfspaceSymbol(const CSGSurface::Halfspace halfspace)
Definition: CSGRegion.C:37
static char regionSymbol(const RegionType region_type)
Definition: CSGRegion.C:16
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186
bool nextRegionOpIsIdentical(const RegionType region, const std::size_t postfix_token_index) const
Iterate through postfix tokens and check if next region operator matches the given operator...
Definition: CSGRegion.C:242
auto index_range(const T &sizable)

◆ toPostfixStringList()

std::vector< std::string > CSG::CSGRegion::toPostfixStringList ( ) const

gets the list of postfix tokens of the region in string representation

Returns
list of postfix tokens that represent the region

Definition at line 214 of file CSGRegion.C.

215 {
216  std::vector<std::string> postfix_string_list;
217  postfix_string_list.reserve(_postfix_tokens.size());
218  for (const auto & token : _postfix_tokens)
219  postfix_string_list.push_back(postfixTokenToString(token));
220  return postfix_string_list;
221 }
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186
std::string postfixTokenToString(const PostfixTokenVariant &token) const
converts postfix token from PostfixTokenVariant to string representation
Definition: CSGRegion.C:224

◆ updateSurfaceReferences()

void CSG::CSGRegion::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.

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

Definition at line 252 of file CSGRegion.C.

Referenced by CSG::CSGCell::updateCellRegionSurfaces().

254 {
255  for (auto & token : _postfix_tokens)
256  if (std::holds_alternative<std::reference_wrapper<const CSGSurface>>(token))
257  {
258  const auto & surf_ref = std::get<std::reference_wrapper<const CSGSurface>>(token);
259  const auto & surf_name = surf_ref.get().getName();
260  if (identical_surface_refs.find(surf_name) != identical_surface_refs.end())
261  token = identical_surface_refs.at(surf_name);
262  }
263 }
std::vector< PostfixTokenVariant > _postfix_tokens
List of tokens representing the region in postfix notation.
Definition: CSGRegion.h:186

Member Data Documentation

◆ _postfix_tokens

std::vector<PostfixTokenVariant> CSG::CSGRegion::_postfix_tokens
protected

List of tokens representing the region in postfix notation.

Definition at line 186 of file CSGRegion.h.

Referenced by CSGRegion(), getPostfixTokens(), getSurfaces(), nextRegionOpIsIdentical(), toInfixJSON(), toPostfixStringList(), and updateSurfaceReferences().

◆ _region_type

MooseEnum CSG::CSGRegion::_region_type {"EMPTY=0 HALFSPACE=1 COMPLEMENT=2 INTERSECTION=3 UNION=4"}
protected

An enum for type of type of operation that defines region.

Definition at line 183 of file CSGRegion.h.

Referenced by CSGRegion(), getRegionType(), and getRegionTypeString().


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