Advanced Multi-Physics (AMP)
On-Line Documentation
Tube.h
Go to the documentation of this file.
1#ifndef included_AMP_Geometry_Tube
2#define included_AMP_Geometry_Tube
3
4#include "AMP/geometry/LogicalGeometry.h"
5
6#include <array>
7#include <vector>
8
9
10namespace AMP::Geometry {
11
12
18class Tube final : public LogicalGeometry
19{
20public:
25 explicit Tube( std::shared_ptr<const AMP::Database> db );
26
34 explicit Tube( double r_min, double r_max, double z_min, double z_max );
35
37 Tube( int64_t );
38
39public: // Functions inherited from Geometry
40 std::string getName() const override final { return "Tube"; }
41 bool isConvex() const override final { return false; }
42 Point nearest( const Point &pos ) const override final;
43 double distance( const Point &pos, const Point &dir ) const override final;
44 bool inside( const Point &pos ) const override final;
45 int surface( const Point &x ) const override final;
46 int NSurface() const override final { return 4; }
47 Point surfaceNorm( const Point &x ) const override final;
48 Point logical( const Point &x ) const override final;
49 Point physical( const Point &x ) const override final;
50 Point centroid() const override final;
51 std::pair<Point, Point> box() const override final;
52 double volume() const override final;
53 void displace( const double *x ) override final;
54 ArraySize getLogicalGridSize( const ArraySize &x ) const override final;
55 ArraySize getLogicalGridSize( const std::vector<double> &res ) const override final;
56 std::unique_ptr<AMP::Geometry::Geometry> clone() const override final;
57 bool operator==( const Geometry &rhs ) const override final;
58 void writeRestart( int64_t ) const override;
59
60protected:
61 // Internal data
63 std::array<double, 3> d_offset;
64
65private:
66 // Private constructor
68};
69
70
71} // namespace AMP::Geometry
72
73#endif
Simple class to store the array dimensions.
Definition ArraySize.h:138
A class used to abstract away geometry information from an application or mesh.
Definition Geometry.h:29
A class used to abstract away logical geometry based operations.
int NSurface() const override final
Get the number of surfaces.
Definition Tube.h:46
std::array< double, 3 > d_offset
Definition Tube.h:63
double distance(const Point &pos, const Point &dir) const override final
Calculate the distance to the object given a ray.
Tube(double r_min, double r_max, double z_min, double z_max)
Construct a Tube geometry.
double d_z_max
Definition Tube.h:62
void displace(const double *x) override final
Displace the entire geometry.
double d_r_max
Definition Tube.h:62
Tube(std::shared_ptr< const AMP::Database > db)
Construct a Tube geometry.
std::pair< Point, Point > box() const override final
Return the bounding box.
bool inside(const Point &pos) const override final
Is the point in the geometry.
double volume() const override final
Return the volume.
Point centroid() const override final
Return the centroid.
Point physical(const Point &x) const override final
Return the physical position.
Tube(int64_t)
Construct from restart.
std::unique_ptr< AMP::Geometry::Geometry > clone() const override final
Clone the object.
std::string getName() const override final
Get the name of the geometry.
Definition Tube.h:40
double d_r_min
Definition Tube.h:62
double d_z_min
Definition Tube.h:62
void writeRestart(int64_t) const override
Write restart data to file.
int surface(const Point &x) const override final
Get the surface id.
Point logical(const Point &x) const override final
Return the logical position.
Point surfaceNorm(const Point &x) const override final
Return the outward normal to a surface.
ArraySize getLogicalGridSize(const ArraySize &x) const override final
Return the logical grid size.
Point nearest(const Point &pos) const override final
Calculate the nearest point on the surface.
bool isConvex() const override final
Is the object convex.
Definition Tube.h:41



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