A class used to abstract away logical geometry based operations. More...
#include <LogicalGeometry.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. | |
| AMP::Mesh::GeomType | getGeomType () const override final |
| Get the geometric type for the geometry. | |
| virtual uint64_t | getID () const |
| Return a unique hash id. | |
| uint8_t | getLogicalDim () const |
| Return the number of logical dimensions. | |
| virtual ArraySize | getLogicalGridSize (const ArraySize &x) const =0 |
| Return the logical grid size. | |
| virtual ArraySize | getLogicalGridSize (const std::vector< double > &res) const =0 |
| Return the logical grid size. | |
| const auto & | getLogicalSurfaceIds () const |
| Return the surface ids for the logical boundaries. | |
| virtual std::string | getName () const =0 |
| Get the name of the geometry. | |
| std::array< bool, 3 > | getPeriodicDim () const |
| Return the logical grid periodic dimensions. | |
| 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 | logical (const Point &x) const =0 |
| Return the logical position. | |
| LogicalGeometry (int64_t fid) | |
| 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 Point | physical (const Point &x) const =0 |
| Return the physical position. | |
| 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. | |
| void | writeRestart (int64_t fid) const override |
| Write restart data to file. | |
| virtual | ~LogicalGeometry ()=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 | |
| LogicalGeometry (const LogicalGeometry &)=default | |
| LogicalGeometry (int physical, int logical, const std::array< int, 6 > &ids={ 1, 2, 3, 4, 5, 6 }) | |
| Default constructor for the base class. | |
| LogicalGeometry (LogicalGeometry &&)=delete | |
| LogicalGeometry & | operator= (const LogicalGeometry &)=delete |
| LogicalGeometry & | operator= (LogicalGeometry &&)=delete |
Protected Attributes | |
| const std::array< int, 6 > | d_ids |
| const uint8_t | d_logicalDim |
| const uint8_t | d_physicalDim |
A class used to abstract away logical geometry based operations.
This class provides routines for reading, accessing and writing logical geometries.
Definition at line 16 of file LogicalGeometry.h.
|
virtualdefault |
Destructor.
| AMP::Geometry::LogicalGeometry::LogicalGeometry | ( | int64_t | fid | ) |
|
protected |
Default constructor for the base class.
|
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.
|
staticinherited |
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 virtualinherited |
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 virtualinherited |
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 virtualinherited |
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 virtualinherited |
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.
|
inlineinherited |
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 AMP::Geometry::Geometry::d_physicalDim.
|
finaloverridevirtual |
Get the geometric type for the geometry.
This function returns the largest geometric type supported by the geometry
Reimplemented from AMP::Geometry::Geometry.
|
virtualinherited |
Return a unique hash id.
|
inline |
Return the number of logical dimensions.
This function will return the number of logical dimensions of the underlying geometry. If the geometry is not logically rectangular this function should return 0.
Definition at line 44 of file LogicalGeometry.h.
References d_logicalDim.
|
pure virtual |
Return the logical grid size.
This function will return the dimensions of a logical grid given a size that makes sense for the object.
| [in] | x | Input size |
Implemented in 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 |
Return the logical grid size.
This function will return the dimensions of a logical grid given a desired resolution
| [in] | res | Desired resolution |
Implemented in 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.
|
inline |
Return the surface ids for the logical boundaries.
This function will return the surface ids for each logical boundary. If a logical boundary is periodic, it will return -1. If a logical boundary maps to another point on the boundary, it will return -2. If a logical boundary is not periodic, is not physical, and does not map to another point on the boundary (i.e. unused dimensions), it will return -3. Note: The returned array may be larger than the number of dimensions
Definition at line 83 of file LogicalGeometry.h.
References d_ids.
|
pure virtualinherited |
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.
| std::array< bool, 3 > AMP::Geometry::LogicalGeometry::getPeriodicDim | ( | ) | const |
Return the logical grid periodic dimensions.
This function will return a vector indicating which logical grid dimensions are periodic. Note: The returned array may be larger than the number of dimensions
|
pure virtualinherited |
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 virtualinherited |
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.
Return the logical position.
This function will return logical coordinate given the physical coordinates
| [in] | x | Physical coordinate of the point |
Implemented in AMP::Geometry::RotationalGeometry, 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.
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 virtualinherited |
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.
|
inlineinherited |
Check if two geometries are not equal.
Definition at line 151 of file Geometry.h.
References AMP::Geometry::Geometry::operator==().
|
protecteddelete |
|
protecteddelete |
|
pure virtualinherited |
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 AMP::Geometry::Geometry::operator!=().
Return the physical position.
This function will return physical coordinate given the logical coordinates
| [in] | x | Logical coordinate of the point |
Implemented in AMP::Geometry::Box< NDIM >, 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.
|
virtualinherited |
Register child objects.
This function register child objects if necessary
| manager | Restart manager |
Reimplemented in AMP::Geometry::MultiGeometry.
|
pure virtualinherited |
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 virtualinherited |
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.
|
overridevirtual |
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented from AMP::Geometry::Geometry.
Reimplemented in 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 113 of file LogicalGeometry.h.
Referenced by getLogicalSurfaceIds(), and AMP::Geometry::RotationalGeometry::RotationalGeometry().
|
protected |
Definition at line 112 of file LogicalGeometry.h.
Referenced by getLogicalDim(), and AMP::Geometry::RotationalGeometry::RotationalGeometry().
|
protectedinherited |
Definition at line 200 of file Geometry.h.
Referenced by AMP::Geometry::Geometry::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 |