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

Public Member Functions | |
| std::pair< Point, Point > | box () const override |
| Return the bounding box. | |
| Point | centroid () const override |
| Return the centroid. | |
| std::unique_ptr< AMP::Geometry::Geometry > | clone () const override |
| Clone the object. | |
| void | displace (const double *x) override |
| Displace the entire geometry. | |
| double | distance (const Point &pos, const Point &dir) const override |
| 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. | |
| const AMP::Mesh::Mesh & | getMesh () const |
| Get the mesh. | |
| std::string | getName () const override |
| Get the name of the geometry. | |
| bool | inside (const Point &pos) const override |
| Is the point in the geometry. | |
| bool | isConvex () const override |
| Is the object convex. | |
| MeshGeometry (const MeshGeometry &)=delete | |
| Copy constructor. | |
| MeshGeometry (int64_t) | |
| MeshGeometry (std::shared_ptr< AMP::Mesh::Mesh > mesh) | |
| Default constructor. | |
| Point | nearest (const Point &pos) const override |
| Calculate the nearest point on the surface. | |
| int | NSurface () const override |
| Get the number of surfaces. | |
| bool | operator!= (const Geometry &rhs) const |
| Check if two geometries are not equal. | |
| MeshGeometry & | operator= (const MeshGeometry &)=delete |
| Assignment operator. | |
| bool | operator== (const Geometry &rhs) const override |
| Check if two geometries are equal. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| Register child objects. | |
| int | surface (const Point &x) const override |
| Get the surface id. | |
| Point | surfaceNorm (const Point &x) const override |
| Return the outward normal to a surface. | |
| double | volume () const override |
| Return the volume. | |
| virtual | ~MeshGeometry ()=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 | |
| void | writeRestart (int64_t) const override |
| Write restart data to file. | |
Protected Attributes | |
| const uint8_t | d_physicalDim |
Private Member Functions | |
| void | updateCache () const |
Private Attributes | |
| Point | d_centroid |
| AMP::Mesh::ElementFinder | d_find |
| kdtree2< 3, bool > | d_inside |
| bool | d_isConvex |
| std::shared_ptr< AMP::Mesh::Mesh > | d_mesh |
| uint64_t | d_pos_hash |
| std::vector< int > | d_surfaceIds |
| double | d_volume |
A class used to abstract away geometry information from an application or mesh.
This class provides a geometry implementation based on a surface mesh
Definition at line 20 of file MeshGeometry.h.
| AMP::Geometry::MeshGeometry::MeshGeometry | ( | std::shared_ptr< AMP::Mesh::Mesh > | mesh | ) |
Default constructor.
|
virtualdefault |
Destructor.
|
delete |
Copy constructor.
| AMP::Geometry::MeshGeometry::MeshGeometry | ( | int64_t | ) |
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 |
|
overridevirtual |
Return the centroid.
This function will return centroid of the object
Implements AMP::Geometry::Geometry.
|
overridevirtual |
Clone the object.
Implements AMP::Geometry::Geometry.
|
overridevirtual |
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.
|
overridevirtual |
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.
|
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.
|
virtualinherited |
Get the geometric type for the geometry.
This function returns the largest geometric type supported by the geometry
Reimplemented in AMP::Geometry::LogicalGeometry.
|
virtualinherited |
Return a unique hash id.
|
inline |
|
inlineoverridevirtual |
Get the name of the geometry.
Implements AMP::Geometry::Geometry.
Definition at line 36 of file MeshGeometry.h.
|
overridevirtual |
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.
|
overridevirtual |
Is the object convex.
Check if the geometric object is convex
Implements AMP::Geometry::Geometry.
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.
|
overridevirtual |
Get the number of surfaces.
This function will return the number of unique surfaces
Implements AMP::Geometry::Geometry.
|
inlineinherited |
Check if two geometries are not equal.
Definition at line 151 of file Geometry.h.
References AMP::Geometry::Geometry::operator==().
|
delete |
Assignment operator.
|
overridevirtual |
Check if two geometries are equal.
Implements AMP::Geometry::Geometry.
|
virtualinherited |
Register child objects.
This function register child objects if necessary
| manager | Restart manager |
Reimplemented in AMP::Geometry::MultiGeometry.
|
overridevirtual |
Get the surface id.
This function will return the surface id closest to the point
| [in] | x | Current position |
Implements AMP::Geometry::Geometry.
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.
|
private |
|
overridevirtual |
Return the volume.
This function will return the interior volume of the object
Implements AMP::Geometry::Geometry.
|
overrideprotectedvirtual |
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.
|
mutableprivate |
Definition at line 151 of file MeshGeometry.h.
|
private |
Definition at line 152 of file MeshGeometry.h.
|
mutableprivate |
Definition at line 153 of file MeshGeometry.h.
|
mutableprivate |
Definition at line 149 of file MeshGeometry.h.
|
private |
Definition at line 146 of file MeshGeometry.h.
Referenced by getMesh().
|
protectedinherited |
Definition at line 200 of file Geometry.h.
Referenced by AMP::Geometry::Geometry::getDim().
|
mutableprivate |
Definition at line 148 of file MeshGeometry.h.
|
private |
Definition at line 147 of file MeshGeometry.h.
|
mutableprivate |
Definition at line 150 of file MeshGeometry.h.
|
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 |