A class used to abstract away geometry information from an application or mesh. More...
#include <Geometry.h>

Public Member Functions | |
| virtual std::pair< Point, Point > | box () const =0 |
| Return the bounding box. | |
| virtual Point | centroid () const =0 |
| Return the centroid. | |
| virtual std::unique_ptr< AMP::Geometry::Geometry > | clone () const =0 |
| Clone the object. | |
| virtual void | displace (const double *x)=0 |
| Displace the entire geometry. | |
| virtual double | distance (const Point &pos, const Point &dir) const =0 |
| Calculate the distance to the object given a ray. | |
| uint8_t | getDim () const |
| Get the number of dimensions for the object. | |
| virtual AMP::Mesh::GeomType | getGeomType () const |
| Get the geometric type for the geometry. | |
| virtual uint64_t | getID () const |
| Return a unique hash id. | |
| virtual std::string | getName () const =0 |
| Get the name of the geometry. | |
| virtual bool | inside (const Point &pos) const =0 |
| Is the point in the geometry. | |
| virtual bool | isConvex () const =0 |
| Is the object convex. | |
| virtual Point | nearest (const Point &pos) const =0 |
| Calculate the nearest point on the surface. | |
| virtual int | NSurface () const =0 |
| Get the number of surfaces. | |
| bool | operator!= (const Geometry &rhs) const |
| Check if two geometries are not equal. | |
| virtual bool | operator== (const Geometry &rhs) const =0 |
| Check if two geometries are equal. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| Register child objects. | |
| virtual int | surface (const Point &x) const =0 |
| Get the surface id. | |
| virtual Point | surfaceNorm (const Point &x) const =0 |
| Return the outward normal to a surface. | |
| virtual double | volume () const =0 |
| Return the volume. | |
| virtual void | writeRestart (int64_t fid) const |
| Write restart data to file. | |
| virtual | ~Geometry ()=default |
| Destructor. | |
Static Public Member Functions | |
| static std::shared_ptr< AMP::Geometry::Geometry > | buildGeometry (std::shared_ptr< const AMP::Database > db) |
| Create a geometry. | |
Protected Member Functions | |
| Geometry (const Geometry &)=default | |
| Geometry (Geometry &&)=delete | |
| Geometry (int ndim) | |
| Empty constructor for the base class. | |
| Geometry (int64_t fid) | |
| Initialize the base class from file. | |
| Geometry & | operator= (const Geometry &)=delete |
| Geometry & | operator= (Geometry &&)=delete |
Protected Attributes | |
| const uint8_t | d_physicalDim |
A class used to abstract away geometry information from an application or mesh.
This class provides routines for reading, accessing and writing geometries.
Definition at line 28 of file Geometry.h.
|
virtualdefault |
Destructor.
|
protected |
Initialize the base class from file.
|
inlineprotected |
Empty constructor for the base class.
Definition at line 190 of file Geometry.h.
|
protecteddelete |
|
protecteddefault |
Return the bounding box.
This function will return the bounding box of the object
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::RotationalGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
static |
Create a geometry.
This function will create a geometry based on the input database.
| [in] | db | Parameters for constructing a geometry from an input database |
|
pure virtual |
Return the centroid.
This function will return the centroid of the object. The centroid is equivalent to the center of mass of object of uniform density.
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::RotationalGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
pure virtual |
Clone the object.
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::MultiGeometry, AMP::Geometry::RotationalGeometry, AMP::Geometry::Grid< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
pure virtual |
Displace the entire geometry.
This function will displace the entire geometry by a scalar value. The displacement vector should be the size of the physical dimension.
| [in] | x | Displacement vector |
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::MultiGeometry, AMP::Geometry::RotationalGeometry, AMP::Geometry::Grid< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
pure virtual |
Calculate the distance to the object given a ray.
This function computes the distance to the object given a ray. If the ray is inside the object, this distance is negitive. If the ray will never intersect the object, this distance is inf.
| [in] | pos | Current position of ray |
| [in] | dir | Direction of ray (should be normalized for most uses) |
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, AMP::Geometry::Tube, and AMP::Geometry::RotationalGeometry.
|
inline |
Get the number of dimensions for the object.
This function returns the number of physical dimensions for the geometry
Definition at line 42 of file Geometry.h.
References d_physicalDim.
|
virtual |
Get the geometric type for the geometry.
This function returns the largest geometric type supported by the geometry
Reimplemented in AMP::Geometry::LogicalGeometry.
|
virtual |
Return a unique hash id.
|
pure virtual |
Get the name of the geometry.
Implemented in AMP::Geometry::RotationalGeometry, AMP::Geometry::MeshGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Grid< NDIM >, AMP::Geometry::RegularPolygon, AMP::Geometry::MultiGeometry, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
pure virtual |
Is the point in the geometry.
This function checks if the ray is in the geometry. If it is on the surface, it will return true.
| [in] | pos | Current position |
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, AMP::Geometry::Tube, and AMP::Geometry::RotationalGeometry.
|
pure virtual |
Is the object convex.
Check if the geometric object is convex
Implemented in AMP::Geometry::RotationalGeometry, AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
Calculate the nearest point on the surface.
This function computes the nearest point on the surface
| [in] | pos | Current position of ray |
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, AMP::Geometry::Tube, and AMP::Geometry::RotationalGeometry.
|
pure virtual |
Get the number of surfaces.
This function will return the number of unique surfaces
Implemented in AMP::Geometry::RotationalGeometry, AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
inline |
Check if two geometries are not equal.
Definition at line 151 of file Geometry.h.
References operator==().
|
pure virtual |
Check if two geometries are equal.
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::MultiGeometry, AMP::Geometry::Grid< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
Referenced by operator!=().
|
virtual |
Register child objects.
This function register child objects if necessary
| manager | Restart manager |
Reimplemented in AMP::Geometry::MultiGeometry.
|
pure virtual |
Get the surface id.
This function will return the surface id closest to the point
| [in] | x | Current position |
Implemented in AMP::Geometry::Circle, AMP::Geometry::CircleSurface, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::RotationalGeometry, AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::CircleFrustum, AMP::Geometry::Cylinder, AMP::Geometry::Shell, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
Return the outward normal to a surface.
This function will return the surface id and outward normal to the surface at the given point
| [in] | x | Current position |
Implemented in AMP::Geometry::Parallelepiped, AMP::Geometry::Sphere, AMP::Geometry::RotationalGeometry, AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
pure virtual |
Return the volume.
This function will return the interior volume of the object
Implemented in AMP::Geometry::MeshGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::RotationalGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
virtual |
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented in AMP::Geometry::LogicalGeometry, AMP::Geometry::MultiGeometry, AMP::Geometry::MeshGeometry, AMP::Geometry::Box< NDIM >, AMP::Geometry::Grid< NDIM >, AMP::Geometry::Circle, AMP::Geometry::CircleFrustum, AMP::Geometry::CircleSurface, AMP::Geometry::Cylinder, AMP::Geometry::Parallelepiped, AMP::Geometry::RegularPolygon, AMP::Geometry::Shell, AMP::Geometry::Sphere, AMP::Geometry::SphereSurface, AMP::Geometry::SquareFrustum, and AMP::Geometry::Tube.
|
protected |
Definition at line 200 of file Geometry.h.
Referenced by getDim().
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |