12 #ifdef MOOSE_UNIT_TEST 13 #include "gtest/gtest.h" 71 std::unordered_map<std::string, AttributeVariant>
getAttributes()
const override;
109 std::unique_ptr<CSGSurface>
clone()
const override 131 #ifdef MOOSE_UNIT_TEST 132 FRIEND_TEST(CSGEngUnitTest, testPolygonUnitExpansion);
std::string name(const ElemQuality q)
CSGNPolygonUnit(const std::string &name, int n_sides, Real apothem)
Construct a new CSGNPolygonUnit.
FRIEND_TEST(CSGEngUnitTest, testPolygonUnitExpansion)
Real evaluateSurfaceEquationAtPoint(const Point &p) const override
Evaluate the polygon's surface equation at the given point.
std::vector< const CSGSurface * > _planes
Pointers to the expanded plane surfaces, populated during expandUnit()
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cos(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cos
std::unique_ptr< CSGSurface > clone() const override
Return a deep copy of this unit.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::string _name
Name of surface.
Real getSideLength()
Get the polygon side length.
Real getRadius()
Get the the circumradius for the polygon (center-to-vertex distance)
Real getApothem()
Get the polygon apothem (center-to-flat distance)
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.
CSGNPolygonUnit is a CSGSurfaceEngUnit that represents a regular N-sided polygon (prismatic region) w...
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...
int getNumSides()
Get the number of sides for the polygon.
void expandUnit() override
Create N CSGPlane surfaces in _internal_base, one per polygon side.