1#ifndef included_AMP_MeshGeometry
2#define included_AMP_MeshGeometry
4#include "AMP/geometry/Geometry.h"
5#include "AMP/mesh/Mesh.h"
6#include "AMP/mesh/MeshUtilities.h"
36 std::string
getName()
const override {
return "MeshGeometry"; }
111 std::pair<Point, Point>
box()
const override;
129 std::unique_ptr<AMP::Geometry::Geometry>
clone()
const override;
A class used to abstract away geometry information from an application or mesh.
A class used to abstract away geometry information from an application or mesh.
MeshGeometry(const MeshGeometry &)=delete
Copy constructor.
int surface(const Point &x) const override
Get the surface id.
std::vector< int > d_surfaceIds
std::pair< Point, Point > box() const override
Return the bounding box.
double distance(const Point &pos, const Point &dir) const override
Calculate the distance to the object given a ray.
Point nearest(const Point &pos) const override
Calculate the nearest point on the surface.
Point centroid() const override
Return the centroid.
void displace(const double *x) override
Displace the entire geometry.
int NSurface() const override
Get the number of surfaces.
kdtree2< 3, bool > d_inside
virtual ~MeshGeometry()=default
Destructor.
bool operator==(const Geometry &rhs) const override
Check if two geometries are equal.
AMP::Mesh::ElementFinder d_find
Point surfaceNorm(const Point &x) const override
Return the outward normal to a surface.
double volume() const override
Return the volume.
const AMP::Mesh::Mesh & getMesh() const
Get the mesh.
MeshGeometry & operator=(const MeshGeometry &)=delete
Assignment operator.
std::shared_ptr< AMP::Mesh::Mesh > d_mesh
std::unique_ptr< AMP::Geometry::Geometry > clone() const override
Clone the object.
void writeRestart(int64_t) const override
Write restart data to file.
bool inside(const Point &pos) const override
Is the point in the geometry.
bool isConvex() const override
Is the object convex.
std::string getName() const override
Get the name of the geometry.
MeshGeometry(std::shared_ptr< AMP::Mesh::Mesh > mesh)
Default constructor.
A class used to help find the nearest element to a point.
A class used to abstract away mesh from an application.
A class used to to perform kd-tree based operations.