1#ifndef included_AMP_Geometry_Cylinder
2#define included_AMP_Geometry_Cylinder
4#include "AMP/geometry/LogicalGeometry.h"
25 explicit Cylinder( std::shared_ptr<const AMP::Database> db );
33 explicit Cylinder(
double r,
double z_min,
double z_max );
39 std::string
getName() const override final {
return "Cylinder"; }
40 bool isConvex() const override final {
return true; }
44 int NSurface() const override final {
return 3; }
51 double volume() const override final;
52 void displace( const
double *x ) override final;
56 bool operator==( const
Geometry &rhs ) const override final;
69 double getR(
double z )
const;
Simple class to store the array dimensions.
ArraySize getLogicalGridSize(const ArraySize &x) const override final
Return the logical grid size.
double volume() const override final
Return the volume.
double distance(const Point &pos, const Point &dir) const override final
Calculate the distance to the object given a ray.
Cylinder(int64_t)
Construct from restart.
std::pair< Point, Point > box() const override final
Return the bounding box.
std::array< double, 3 > d_offset
std::array< double, 2 > d_chamfer
int NSurface() const override final
Get the number of surfaces.
std::unique_ptr< AMP::Geometry::Geometry > clone() const override final
Clone the object.
Point physical(const Point &x) const override final
Return the physical position.
Point surfaceNorm(const Point &x) const override final
Return the outward normal to a surface.
std::string getName() const override final
Get the name of the geometry.
Cylinder(double r, double z_min, double z_max)
Construct a Cylinder geometry.
double getR(double z) const
Cylinder(std::shared_ptr< const AMP::Database > db)
Construct a Cylinder geometry.
Point nearest(const Point &pos) const override final
Calculate the nearest point on the surface.
bool isConvex() const override final
Is the object convex.
bool inside(const Point &pos) const override final
Is the point in the geometry.
void displace(const double *x) override final
Displace the entire geometry.
int surface(const Point &x) const override final
Get the surface id.
Point centroid() const override final
Return the centroid.
void writeRestart(int64_t) const override
Write restart data to file.
Point logical(const Point &x) const override final
Return the logical position.
A class used to abstract away geometry information from an application or mesh.
A class used to abstract away logical geometry based operations.