Advanced Multi-Physics (AMP)
On-Line Documentation
MultiGeometry.h
Go to the documentation of this file.
1#ifndef included_AMP_MultiGeometry
2#define included_AMP_MultiGeometry
3
4#include "AMP/geometry/LogicalGeometry.h"
5
6
7namespace AMP::Geometry {
8
9
17class MultiGeometry : public Geometry
18{
19public:
26 explicit MultiGeometry( const std::vector<std::shared_ptr<Geometry>> &geom );
27
28
30 virtual ~MultiGeometry() = default;
31
32
34 inline const auto &getGeometries() const { return d_geom; }
35
36public: // Functions inherited from Geometry
37 std::string getName() const override final { return "MultiGeometry"; }
38 bool isConvex() const override final { return false; }
39 Point nearest( const Point &pos ) const override final;
40 double distance( const Point &pos, const Point &dir ) const override final;
41 bool inside( const Point &pos ) const override final;
42 int NSurface() const override final;
43 int surface( const Point &x ) const override final;
44 Point surfaceNorm( const Point &x ) const override final;
45 Point centroid() const override final;
46 std::pair<Point, Point> box() const override final;
47 double volume() const override final;
48 void displace( const double *x ) override final;
49 std::unique_ptr<AMP::Geometry::Geometry> clone() const override final;
50 bool operator==( const Geometry &rhs ) const override final;
51
52public: // Restart functions
53 void registerChildObjects( AMP::IO::RestartManager *manager ) const override;
54 void writeRestart( int64_t fid ) const override;
55 MultiGeometry( int64_t fid, AMP::IO::RestartManager *manager );
56
57private:
59 MultiGeometry() = delete;
60
61 std::vector<std::shared_ptr<Geometry>> d_geom;
62};
63
64} // namespace AMP::Geometry
65
66#endif
A class used to abstract away geometry information from an application or mesh.
Definition Geometry.h:29
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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:40.
Comments on this page