15 #include "atlas/library/config.h" 16 #include "atlas/mesh/detail/MeshImpl.h" 17 #include "atlas/util/ObjectHandle.h" 30 class PartitionPolygons;
38 typedef HybridElements Edges;
39 typedef HybridElements Cells;
44 namespace meshgenerator {
45 class MeshGeneratorImpl;
55 class Mesh : DOXYGEN_HIDE( public util::ObjectHandle<mesh::detail::MeshImpl> ) {
73 explicit Mesh( eckit::Stream& );
76 void encode( eckit::Stream& s )
const {
return get()->
encode( s ); }
78 const util::Metadata& metadata()
const {
return get()->metadata(); }
81 const Nodes& nodes()
const {
return get()->nodes(); }
82 Nodes& nodes() {
return get()->nodes(); }
84 const Cells& cells()
const {
return get()->cells(); }
85 Cells& cells() {
return get()->cells(); }
87 const Edges& edges()
const {
return get()->edges(); }
88 Edges& edges() {
return get()->edges(); }
99 bool generated()
const {
return get()->generated(); }
104 idx_t partition()
const {
return get()->partition(); }
106 idx_t nb_partitions()
const {
return get()->nb_partitions(); }
108 void updateDevice()
const {
get()->updateDevice(); }
110 void updateHost()
const {
get()->updateHost(); }
112 void syncHostDevice()
const {
get()->syncHostDevice(); }
114 const Projection& projection()
const {
return get()->projection(); }
116 const PartitionGraph& partitionGraph()
const {
return get()->partitionGraph(); }
118 PartitionGraph::Neighbours nearestNeighbourPartitions()
const {
return get()->nearestNeighbourPartitions(); }
120 const Polygon& polygon(
idx_t halo = 0 )
const {
return get()->polygon( halo ); }
121 const Polygons& polygons()
const {
return get()->polygons(); }
123 const Grid grid()
const {
return get()->grid(); }
126 void print( std::ostream& out )
const {
get()->print( out ); }
128 friend std::ostream& operator<<( std::ostream& s,
const Mesh& p ) {
134 void setProjection(
const Projection& p ) {
get()->setProjection( p ); }
135 void setGrid(
const Grid& p ) {
get()->setGrid( p ); }
Definition: MeshGeneratorImpl.h:38
void encode(eckit::Stream &s) const
Serialization to Stream.
Definition: Mesh.h:76
Definition: Polygon.h:155
Definition: Projection.h:49
Definition: PartitionGraph.h:29
Most general grid container.
Definition: Grid.h:64
size_t footprint() const
Return the memory footprint of the mesh.
Definition: Mesh.h:102
Nodes class that owns a collection of fields defined in nodes of the mesh.
Definition: Nodes.h:43
HybridElements class that describes elements of different types.
Definition: HybridElements.h:64
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33
long idx_t
Integer type for indices in connectivity tables.
Definition: config.h:42
Polygon class that holds the boundary of a mesh partition.
Definition: PartitionPolygon.h:41