Debian Codegraph @

src/atlas/meshgenerator/detail/StructuredMeshGenerator.h

raw
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 "atlas/meshgenerator/MeshGenerator.h"
14 #include "atlas/meshgenerator/detail/MeshGeneratorImpl.h"
15 #include "atlas/util/Config.h"
16 #include "atlas/util/Metadata.h"
17
18 #ifndef DOXYGEN_SHOULD_SKIP_THIS
19 namespace eckit {
20 class Parametrisation;
21 }
22
23 namespace atlas {
24 template <typename T>
25 class vector;
26 class Mesh;
27 } // namespace atlas
28
29 namespace atlas {
30 class StructuredGrid;
31 namespace grid {
32 class Distribution;
33 } // namespace grid
34 } // namespace atlas
35 #endif
36
37 namespace atlas {
38 namespace meshgenerator {
39
40 struct Region;
41
42 //----------------------------------------------------------------------------------------------------------------------
43
44 class StructuredMeshGenerator : public MeshGenerator::Implementation {
45 public:
46 StructuredMeshGenerator(const eckit::Parametrisation& = util::NoConfig());
47
48 virtual void generate(const Grid&, const grid::Distribution&, Mesh&) const override;
49 virtual void generate(const Grid&, Mesh&) const override;
50
51 using MeshGenerator::Implementation::generate;
52
53 std::string type() const override { return "structured"; }
54
55 private:
56 virtual void hash(eckit::Hash&) const override;
57
58
59 void configure_defaults();
60
61 void generate_region(const StructuredGrid&, const grid::Distribution& distribution, int mypart,
62 Region& region) const;
63
64 void generate_mesh_new(const StructuredGrid&, const grid::Distribution& distribution, const Region& region,
65 Mesh& m) const;
66
67 void generate_mesh(const StructuredGrid&, const grid::Distribution& distribution, const Region& region,
68 Mesh& m) const;
69
70 private:
71 util::Config options;
72 };
73
74 //----------------------------------------------------------------------------------------------------------------------
75
76 } // namespace meshgenerator
77 } // namespace atlas