1#ifndef included_AMP_RotationalGeometry
2#define included_AMP_RotationalGeometry
4#include "AMP/geometry/Geometry.h"
25 d_isPeriodic = geom->getPeriodicDim();
26 d_ids = geom->getLogicalSurfaceIds();
30 std::string
getName()
const {
return "RotationalGeometry<" +
d_geom->getName() +
">"; }
43 {
return out(
d_geom->physical( to( x ) );
46 std::pair<Point, Point>
box() const override final;
48 void displace(
const double *x )
override final;
50 virtual std::vector<int>
55 std::unique_ptr<AMP::Geometry::Geometry>
clone() const override final
61 std::shared_ptr<LogicalGeometry>
d_geom;
A class used to abstract away logical geometry based operations.
const std::array< int, 6 > d_ids
const uint8_t d_logicalDim
A geometry to rotate a geometry object about the centroid.
double distance(const Point &x, const Point &dir) const
Calculate the distance to the object given a ray.
Point rotateDir(const Point &dir)
RotationalGeometry(std::shared_ptr< LogicalGeometry > geom)
Construct a RotationalGeometry geometry.
bool isConvex() const
Is the object convex.
std::shared_ptr< LogicalGeometry > d_geom
int NSurface() const
Get the number of surfaces.
std::pair< Point, Point > box() const override final
Return the bounding box.
Point physical(const Point &x) const override final
Return the physical position.
double volume() const override final
Return the volume.
Point surfaceNorm(const Point &x) const
Return the outward normal to a surface.
Point out(const Point &x)
std::string getName() const
Get the name of the geometry.
Point logical(const Point &x) const final
Return the logical position.
Point centroid() const override final
Return the centroid.
Point nearest(const Point &x) const
Calculate the nearest point on the surface.
int surface(const Point &x) const
Get the surface id.
std::vector< int > getLogicalGridSize(const std::vector< int > &x) const override final
std::unique_ptr< AMP::Geometry::Geometry > clone() const override final
Clone the object.
bool inside(const Point &x) const
Is the point in the geometry.
void displace(const double *x) override final
Displace the entire geometry.
virtual std::vector< int > getLogicalGridSize(const std::vector< double > &res) const override final
Return the logical grid size.