https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CSGSurfaceEngUnit.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://www.mooseframework.org
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "CSGSurfaceEngUnit.h"
11
12namespace CSG
13{
14
15CSGSurfaceEngUnit::CSGSurfaceEngUnit(const std::string & name)
16 : CSGSurface(name), CSGEngUnit("SURFACE")
17{
18}
19
20std::unordered_map<std::string, Real>
22{
23 mooseError("CSGSurfaceEngUnit '",
24 getName(),
25 "' cannot getCoeffs(). Coefficients are only callable on CSGSurface(s) generated by "
26 "expandUnit().");
27}
28
31{
32 // check if unit has been expanded first to define the region
34 mooseError("getExpandedRegion() cannot be called on CSGSurfaceEngUnit '",
35 getName(),
36 "' before expandUnit() has been called.");
37 return _expanded_region;
38}
39
40} // namespace CSG
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
CSGEngUnit is the abstract base class for all "engineering unit" types in the CSG system.
Definition CSGEngUnit.h:33
CSGRegions creates an internal representation of a CSG region, which can refer to an intersection,...
Definition CSGRegion.h:23
RegionType getRegionType() const
Get the region type.
Definition CSGRegion.h:123
CSGSurfaceEngUnit(const std::string &name)
Construct a new CSGSurfaceEngUnit.
std::unordered_map< std::string, Real > getCoeffs() const override
Always throws – coefficients are not defined for a surface engineering unit.
CSGRegion _expanded_region
Stores the result of expandUnit(); EMPTY until then.
CSGRegion getExpandedRegion() const
Return the CSGRegion formed by the expanded CSGSurfaces.
const std::string & getName() const override
Satisfy CSGEngUnit::getName() – resolved via CSGSurface::getName()
CSGSurface creates an internal representation of a Constructive Solid Geometry (CSG) surface,...
Definition CSGSurface.h:27