1#ifndef included_AMP_Geometry_CircleFrustum
2#define included_AMP_Geometry_CircleFrustum
4#include "AMP/geometry/LogicalGeometry.h"
33 explicit CircleFrustum(
const std::array<double, 2> &r,
int dir,
double height );
42 std::string
getName() const override final {
return "CircleFrustum"; }
43 bool isConvex() const override final {
return true; }
47 int NSurface() const override final {
return 3; }
54 double volume() const override final;
55 void displace( const
double *x ) override final;
59 bool operator==( const
Geometry &rhs ) const override final;
65 std::array<
double, 2>
d_r = { 0, 0 };
73 void initialize(
int dir,
const std::array<double, 2> &r,
double h );
Simple class to store the array dimensions.
A geometry for a circular frustum.
int surface(const Point &x) const override final
Get the surface id.
CircleFrustum(const std::array< double, 2 > &r, int dir, double height)
Construct a CircleFrustum geometry.
Point physical(const Point &x) const override final
Return the physical position.
CircleFrustum(std::shared_ptr< const AMP::Database > db)
Construct a CircleFrustum geometry.
void displace(const double *x) override final
Displace the entire geometry.
CircleFrustum(int64_t)
Construct from restart.
CircleFrustum(const CircleFrustum &)=default
Copy contructor.
std::array< double, 2 > d_r
Point logical(const Point &x) const override final
Return the logical position.
int NSurface() const override final
Get the number of surfaces.
Point convertToReference(const Point &) const
Point centroid() const override final
Return the centroid.
void initialize(int dir, const std::array< double, 2 > &r, double h)
bool isConvex() const override final
Is the object convex.
Point surfaceNorm(const Point &x) const override final
Return the outward normal to a surface.
Point nearest(const Point &pos) const override final
Calculate the nearest point on the surface.
std::pair< Point, Point > box() const override final
Return the bounding box.
Point convertFromReference(const Point &) const
std::unique_ptr< AMP::Geometry::Geometry > clone() const override final
Clone the object.
ArraySize getLogicalGridSize(const ArraySize &x) const override final
Return the logical grid size.
std::array< double, 3 > d_offset
bool inside(const Point &pos) const override final
Is the point in the geometry.
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.
std::string getName() const override final
Get the name of the geometry.
void writeRestart(int64_t) const override
Write restart data to file.
A class used to abstract away geometry information from an application or mesh.
A class used to abstract away logical geometry based operations.