Advanced Multi-Physics (AMP)
On-Line Documentation
LogicalGeometry.h
Go to the documentation of this file.
1#ifndef included_AMP_LogicalGeometry
2#define included_AMP_LogicalGeometry
3
4#include "AMP/geometry/Geometry.h"
5#include "AMP/utils/ArraySize.h"
6
7
8namespace AMP::Geometry {
9
10
17{
18public:
20 virtual ~LogicalGeometry() = default;
21
28 virtual Point logical( const Point &x ) const = 0;
29
36 virtual Point physical( const Point &x ) const = 0;
37
44 inline uint8_t getLogicalDim() const { return d_logicalDim; }
45
53 virtual ArraySize getLogicalGridSize( const ArraySize &x ) const = 0;
54
62 virtual ArraySize getLogicalGridSize( const std::vector<double> &res ) const = 0;
63
71 std::array<bool, 3> getPeriodicDim() const;
72
83 inline const auto &getLogicalSurfaceIds() const { return d_ids; }
84
90 AMP::Mesh::GeomType getGeomType() const override final;
91
92
93public: // Restart functions
94 void writeRestart( int64_t fid ) const override;
95 LogicalGeometry( int64_t fid );
96
97
98protected:
101 int logical,
102 const std::array<int, 6> &ids = { 1, 2, 3, 4, 5, 6 } );
103
104 // Delete copy constructors
106 LogicalGeometry( const LogicalGeometry & ) = default;
109
110
111protected: // Internal data
112 const uint8_t d_logicalDim; // Logical dimension
113 const std::array<int, 6> d_ids; // Logical surface ids
114};
115
116
117} // namespace AMP::Geometry
118
119#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.
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.
uint8_t getLogicalDim() const
Return the number of logical dimensions.
virtual ~LogicalGeometry()=default
Destructor.
const std::array< int, 6 > d_ids
LogicalGeometry & operator=(LogicalGeometry &&)=delete
virtual ArraySize getLogicalGridSize(const ArraySize &x) const =0
Return the logical grid size.
virtual Point logical(const Point &x) const =0
Return the logical position.
AMP::Mesh::GeomType getGeomType() const override final
Get the geometric type for the geometry.
LogicalGeometry(LogicalGeometry &&)=delete
LogicalGeometry & operator=(const LogicalGeometry &)=delete
std::array< bool, 3 > getPeriodicDim() const
Return the logical grid periodic dimensions.
virtual Point physical(const Point &x) const =0
Return the physical position.
void writeRestart(int64_t fid) const override
Write restart data to file.
LogicalGeometry(const LogicalGeometry &)=default
GeomType
Enumeration for basic mesh-based quantities.
Definition MeshID.h:12



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