1#ifndef included_AMP_Geometry
2#define included_AMP_Geometry
4#include "AMP/mesh/MeshID.h"
5#include "AMP/utils/Database.h"
6#include "AMP/utils/MeshPoint.h"
127 virtual std::pair<Point, Point>
box()
const = 0;
145 virtual std::unique_ptr<AMP::Geometry::Geometry>
clone()
const = 0;
184 static std::shared_ptr<AMP::Geometry::Geometry>
A class used to abstract away geometry information from an application or mesh.
Geometry & operator=(Geometry &&)=delete
virtual void writeRestart(int64_t fid) const
Write restart data to file.
virtual int surface(const Point &x) const =0
Get the surface id.
virtual ~Geometry()=default
Destructor.
virtual bool operator==(const Geometry &rhs) const =0
Check if two geometries are equal.
virtual bool inside(const Point &pos) const =0
Is the point in the geometry.
Geometry & operator=(const Geometry &)=delete
Geometry(Geometry &&)=delete
virtual Point centroid() const =0
Return the centroid.
virtual std::pair< Point, Point > box() const =0
Return the bounding box.
virtual void registerChildObjects(AMP::IO::RestartManager *manager) const
Register child objects.
virtual void displace(const double *x)=0
Displace the entire geometry.
virtual double volume() const =0
Return the volume.
virtual AMP::Mesh::GeomType getGeomType() const
Get the geometric type for the geometry.
bool operator!=(const Geometry &rhs) const
Check if two geometries are not equal.
const uint8_t d_physicalDim
virtual bool isConvex() const =0
Is the object convex.
static std::shared_ptr< AMP::Geometry::Geometry > buildGeometry(std::shared_ptr< const AMP::Database > db)
Create a geometry.
virtual Point surfaceNorm(const Point &x) const =0
Return the outward normal to a surface.
uint8_t getDim() const
Get the number of dimensions for the object.
virtual uint64_t getID() const
Return a unique hash id.
Geometry(const Geometry &)=default
virtual Point nearest(const Point &pos) const =0
Calculate the nearest point on the surface.
virtual double distance(const Point &pos, const Point &dir) const =0
Calculate the distance to the object given a ray.
virtual int NSurface() const =0
Get the number of surfaces.
Geometry(int ndim)
Empty constructor for the base class.
Geometry(int64_t fid)
Initialize the base class from file.
virtual std::unique_ptr< AMP::Geometry::Geometry > clone() const =0
Clone the object.
virtual std::string getName() const =0
Get the name of the geometry.
Class to manage reading/writing restart data.
GeomType
Enumeration for basic mesh-based quantities.