atlas
MeshGenerator.h
1 /*
2  * (C) Copyright 2013 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation
8  * nor does it submit to any jurisdiction.
9  */
10 
11 #pragma once
12 
13 #include <string>
14 
15 #include "atlas/library/config.h"
16 #include "atlas/util/Config.h"
17 #include "atlas/util/ObjectHandle.h"
18 
19 namespace eckit {
20 class Hash;
21 class Parametrisation;
22 } // namespace eckit
23 
24 namespace atlas {
25 class Mesh;
26 class Grid;
27 class Projection;
28 } // namespace atlas
29 
30 namespace atlas {
31 namespace grid {
32 class Distribution;
33 class Partitioner;
34 } // namespace grid
35 } // namespace atlas
36 
37 namespace atlas {
38 namespace meshgenerator {
39 class MeshGeneratorImpl;
40 }
41 
42 //----------------------------------------------------------------------------------------------------------------------
43 
44 class MeshGenerator : DOXYGEN_HIDE( public util::ObjectHandle<meshgenerator::MeshGeneratorImpl> ) {
45 public:
47 
48 public:
49  using Handle::Handle;
50  MeshGenerator( const std::string&, const eckit::Parametrisation& = util::NoConfig() );
51  MeshGenerator( const eckit::Parametrisation& );
52 
53  void hash( eckit::Hash& ) const;
54 
55  Mesh generate( const Grid&, const grid::Distribution& ) const;
56  Mesh generate( const Grid&, const grid::Partitioner& ) const;
57  Mesh generate( const Grid& ) const;
58 
59  Mesh operator()( const Grid&, const grid::Distribution& ) const;
60  Mesh operator()( const Grid&, const grid::Partitioner& ) const;
61  Mesh operator()( const Grid& ) const;
62 
63  std::string type() const;
64 };
65 
66 //----------------------------------------------------------------------------------------------------------------------
67 
68 // Shorthands
70 public:
71  StructuredMeshGenerator( const eckit::Parametrisation& config = util::NoConfig() ) :
72  MeshGenerator( "structured", config ) {}
73 };
74 
75 //----------------------------------------------------------------------------------------------------------------------
76 
77 } // namespace atlas
Definition: Distribution.h:31
Definition: Mesh.h:55
Definition: Domain.h:19
Most general grid container.
Definition: Grid.h:64
Definition: MeshGenerator.h:44
Definition: MeshGenerator.h:69
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33
Definition: Config.h:148
Definition: Partitioner.h:68
Configuration class used to construct various atlas components.
Definition: Config.h:27