atlas
CubedSphereMeshGenerator.h
1 /*
2  * (C) Crown Copyright 2021 Met Office
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  */
7 
8 #pragma once
9 
10 #include "atlas/array.h"
11 #include "atlas/meshgenerator/MeshGenerator.h"
12 #include "atlas/meshgenerator/detail/MeshGeneratorImpl.h"
13 #include "atlas/util/Config.h"
14 #include "atlas/util/Metadata.h"
15 
16 #ifndef DOXYGEN_SHOULD_SKIP_THIS
17 namespace eckit {
18 class Parametrisation;
19 }
20 
21 namespace atlas {
22 class CubedSphereGrid;
23 class Mesh;
24 template <typename T>
25 class vector;
26 } // namespace atlas
27 
28 namespace atlas {
29 namespace grid {
30 class Distribution;
31 } // namespace grid
32 } // namespace atlas
33 #endif
34 
35 namespace atlas {
36 namespace meshgenerator {
37 
38 //--------------------------------------------------------------------------------------------------
39 
40 class CubedSphereMeshGenerator : public MeshGenerator::Implementation {
41 public:
42  CubedSphereMeshGenerator( const eckit::Parametrisation& = util::NoConfig() );
43 
44  virtual void generate( const Grid&, const grid::Distribution&, Mesh& ) const override;
45  virtual void generate( const Grid&, Mesh& ) const override;
46 
47  using MeshGenerator::Implementation::generate;
48 
49  static std::string static_type() { return "cubedsphere"; }
50  std::string type() const override { return static_type(); }
51 
52 private:
53  virtual void hash( eckit::Hash& ) const override;
54 
55  void configure_defaults();
56 
57  void generate_mesh( const CubedSphereGrid&, const grid::Distribution&, Mesh& ) const;
58 
59 private:
60  util::Metadata options;
61 };
62 
63 //--------------------------------------------------------------------------------------------------
64 
65 } // namespace meshgenerator
66 } // namespace atlas
Definition: CubedSphereMeshGenerator.h:40
Definition: Distribution.h:31
Definition: Mesh.h:55
Definition: CubedSphereMeshGenerator.h:25
Definition: Domain.h:19
Most general grid container.
Definition: Grid.h:64
Definition: Metadata.h:23
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33
Definition: Config.h:148
Specialization of Grid, where the grid is a cubed sphere.
Definition: CubedSphereGrid.h:264