A geometry to rotate a geometry object about the centroid. More...
#include <RotationalGeometry.h>

Public Member Functions | |
| std::pair< Point, Point > | box () const override final |
| Return the bounding box. | |
| Point | centroid () const override final |
| Return the centroid. | |
| std::unique_ptr< AMP::Geometry::Geometry > | clone () const override final |
| Clone the object. | |
| void | displace (const double *x) override final |
| Displace the entire geometry. | |
| double | distance (const Point &x, const Point &dir) const |
| 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 std::vector< int > | getLogicalGridSize (const std::vector< double > &res) const override final |
| Return the logical grid size. | |
| std::vector< int > | getLogicalGridSize (const std::vector< int > &x) const override final |
| const auto & | getLogicalSurfaceIds () const |
| Return the surface ids for the logical boundaries. | |
| std::string | getName () const |
| Get the name of the geometry. | |
| std::array< bool, 3 > | getPeriodicDim () const |
| Return the logical grid periodic dimensions. | |
| bool | inside (const Point &x) const |
| Is the point in the geometry. | |
| bool | isConvex () const |
| Is the object convex. | |
| Point | logical (const Point &x) const final |
| Return the logical position. | |
| Point | nearest (const Point &x) const |
| Calculate the nearest point on the surface. | |
| int | NSurface () const |
| 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. | |
| Point | physical (const Point &x) const override final |
| Return the physical position. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| Register child objects. | |
| RotationalGeometry (std::shared_ptr< LogicalGeometry > geom) | |
| Construct a RotationalGeometry geometry. | |
| int | surface (const Point &x) const |
| Get the surface id. | |
| Point | surfaceNorm (const Point &x) const |
| Return the outward normal to a surface. | |
| double | volume () const override final |
| Return the volume. | |
| void | writeRestart (int64_t fid) const override |
| Write restart data to file. | |
Static Public Member Functions | |
| static std::shared_ptr< AMP::Geometry::Geometry > | buildGeometry (std::shared_ptr< const AMP::Database > db) |
| Create a geometry. | |
Protected Attributes | |
| const std::array< int, 6 > | d_ids |
| const uint8_t | d_logicalDim |
| const uint8_t | d_physicalDim |
Private Member Functions | |
| Point | in (const Point &x) |
| Point | out (const Point &x) |
| Point | rotateDir (const Point &dir) |
| RotationalGeometry () | |
Private Attributes | |
| std::shared_ptr< LogicalGeometry > | d_geom |
A geometry to rotate a geometry object about the centroid.
This class provides routines for reading, accessing and writing geometries.
Definition at line 15 of file RotationalGeometry.h.
|
inlineexplicit |
Construct a RotationalGeometry geometry.
| geom | Input geometry object |
Definition at line 22 of file RotationalGeometry.h.
References AMP::Geometry::LogicalGeometry::d_ids, and AMP::Geometry::LogicalGeometry::d_logicalDim.
|
private |
Return the bounding box.
This function will return the bounding box of the object
Implements AMP::Geometry::Geometry.
|
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 |
|
inlinefinaloverridevirtual |
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.
Implements AMP::Geometry::Geometry.
Definition at line 45 of file RotationalGeometry.h.
|
inlinefinaloverridevirtual |
Clone the object.
Implements AMP::Geometry::Geometry.
Definition at line 55 of file RotationalGeometry.h.
References d_geom.
|
finaloverridevirtual |
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 |
Implements AMP::Geometry::Geometry.
|
inlinevirtual |
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) |
Implements AMP::Geometry::Geometry.
Definition at line 33 of file RotationalGeometry.h.
References d_geom, and rotateDir().
|
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.
|
finaloverridevirtualinherited |
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.
|
inlineinherited |
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 AMP::Geometry::LogicalGeometry::d_logicalDim.
|
pure virtualinherited |
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.
|
inlinefinaloverridevirtual |
Return the logical grid size.
This function will return the dimensions of a logical grid given a desired resolution
| [in] | res | Desired resolution |
Implements AMP::Geometry::LogicalGeometry.
Definition at line 51 of file RotationalGeometry.h.
References d_geom.
|
finaloverride |
|
inlineinherited |
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 AMP::Geometry::LogicalGeometry::d_ids.
|
inlinevirtual |
Get the name of the geometry.
Implements AMP::Geometry::Geometry.
Definition at line 30 of file RotationalGeometry.h.
References d_geom.
|
inherited |
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
|
inlinevirtual |
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 |
Implements AMP::Geometry::Geometry.
Definition at line 37 of file RotationalGeometry.h.
References d_geom.
|
inlinevirtual |
Is the object convex.
Check if the geometric object is convex
Implements AMP::Geometry::Geometry.
Definition at line 31 of file RotationalGeometry.h.
References d_geom.
Return the logical position.
This function will return logical coordinate given the physical coordinates
| [in] | x | Physical coordinate of the point |
Implements AMP::Geometry::LogicalGeometry.
Definition at line 41 of file RotationalGeometry.h.
Calculate the nearest point on the surface.
This function computes the nearest point on the surface
| [in] | pos | Current position of ray |
Implements AMP::Geometry::Geometry.
Definition at line 32 of file RotationalGeometry.h.
|
inlinevirtual |
Get the number of surfaces.
This function will return the number of unique surfaces
Implements AMP::Geometry::Geometry.
Definition at line 38 of file RotationalGeometry.h.
References d_geom.
|
inlineinherited |
Check if two geometries are not equal.
Definition at line 151 of file Geometry.h.
References AMP::Geometry::Geometry::operator==().
|
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!=().
Referenced by centroid(), logical(), nearest(), physical(), and surfaceNorm().
|
inlinefinaloverridevirtual |
Return the physical position.
This function will return physical coordinate given the logical coordinates
| [in] | x | Logical coordinate of the point |
Implements AMP::Geometry::LogicalGeometry.
Definition at line 42 of file RotationalGeometry.h.
|
virtualinherited |
Register child objects.
This function register child objects if necessary
| manager | Restart manager |
Reimplemented in AMP::Geometry::MultiGeometry.
Referenced by distance().
|
inlinevirtual |
Get the surface id.
This function will return the surface id closest to the point
| [in] | x | Current position |
Implements AMP::Geometry::Geometry.
Definition at line 39 of file RotationalGeometry.h.
References d_geom.
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 |
Implements AMP::Geometry::Geometry.
Definition at line 40 of file RotationalGeometry.h.
|
inlinefinaloverridevirtual |
Return the volume.
This function will return the interior volume of the object
Implements AMP::Geometry::Geometry.
Definition at line 47 of file RotationalGeometry.h.
References d_geom.
|
overridevirtualinherited |
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.
|
private |
Definition at line 61 of file RotationalGeometry.h.
Referenced by centroid(), clone(), distance(), getLogicalGridSize(), getName(), inside(), isConvex(), logical(), nearest(), NSurface(), physical(), surface(), surfaceNorm(), and volume().
|
protectedinherited |
Definition at line 113 of file LogicalGeometry.h.
Referenced by AMP::Geometry::LogicalGeometry::getLogicalSurfaceIds(), and RotationalGeometry().
|
protectedinherited |
Definition at line 112 of file LogicalGeometry.h.
Referenced by AMP::Geometry::LogicalGeometry::getLogicalDim(), and 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 |