1#ifndef included_AMP_MultiGeometry
2#define included_AMP_MultiGeometry
4#include "AMP/geometry/LogicalGeometry.h"
26 explicit MultiGeometry(
const std::vector<std::shared_ptr<Geometry>> &geom );
37 std::string
getName() const override final {
return "MultiGeometry"; }
38 bool isConvex() const override final {
return false; }
47 double volume() const override final;
48 void displace( const
double *x ) override final;
50 bool operator==( const
Geometry &rhs ) const override final;
A class used to abstract away geometry information from an application or mesh.
A concrete geometry class for a multi-mesh.
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.
std::pair< Point, Point > box() const override final
Return the bounding box.
Point centroid() const override final
Return the centroid.
Point surfaceNorm(const Point &x) const override final
Return the outward normal to a surface.
int surface(const Point &x) const override final
Get the surface id.
bool inside(const Point &pos) const override final
Is the point in the geometry.
std::unique_ptr< AMP::Geometry::Geometry > clone() const override final
Clone the object.
void registerChildObjects(AMP::IO::RestartManager *manager) const override
Register child objects.
virtual ~MultiGeometry()=default
Destructor.
void writeRestart(int64_t fid) const override
Write restart data to file.
Point nearest(const Point &pos) const override final
Calculate the nearest point on the surface.
MultiGeometry(const std::vector< std::shared_ptr< Geometry > > &geom)
Constructor to create a MultiMesh from existing meshes.
void displace(const double *x) override final
Displace the entire geometry.
int NSurface() const override final
Get the number of surfaces.
bool isConvex() const override final
Is the object convex.
const auto & getGeometries() const
Access the geometries.
std::vector< std::shared_ptr< Geometry > > d_geom