21 mooseError(
"N-sided polygon engineering unit " +
name +
" must have 3 or more sides.");
23 mooseError(
"N-sided polygon engineering unit " +
name +
" apothem must be positive.");
50 std::unordered_map<std::string, AttributeVariant>
80 std::string base_name =
getName() +
"_expanded_surf_";
84 auto sname = base_name + std::to_string(k);
87 std::unique_ptr<CSG::CSGPlane> s_ptr = std::make_unique<CSG::CSGPlane>(sname, a, b, c, d);
91 auto hp_type = surf.getHalfspaceFromPoint(p);
std::string name(const ElemQuality q)
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sin(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tan
CSGNPolygonUnit(const std::string &name, int n_sides, Real apothem)
Construct a new CSGNPolygonUnit.
Real evaluateSurfaceEquationAtPoint(const Point &p) const override
Evaluate the polygon's surface equation at the given point.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
std::unique_ptr< CSGBase > _internal_base
CSGBase populated by expandUnit(); joined into the parent CSGBase by expandEngUnit() ...
auto max(const L &left, const R &right)
CSGRegion _expanded_region
Stores the result of expandUnit(); EMPTY until then.
const std::string & getName() const override
Satisfy CSGEngUnit::getName() – resolved via CSGSurface::getName()
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cos(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cos
RegionType getRegionType() const
Get the region type.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const int _n_sides
Number of sides of the regular polygon.
const Real _apothem
Distance from the polygon center to the midpoint of each side.
std::unordered_map< std::string, AttributeVariant > getAttributes() const override
Return the polygon attributes for this object.
CSGSurfaceEngUnit is an abstract base class for "engineering units" that can be used as surfaces in c...
void expandUnit() override
Create N CSGPlane surfaces in _internal_base, one per polygon side.