Debian Codegraph @

src/atlas/grid/detail/partitioner/MatchingMeshPartitionerLonLatPolygon.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/grid/detail/partitioner/MatchingMeshPartitioner.h"
14
15 namespace atlas {
16 namespace grid {
17 namespace detail {
18 namespace partitioner {
19
20 class MatchingMeshPartitionerLonLatPolygon : public MatchingMeshPartitioner {
21 public:
22 static std::string static_type() { return "lonlat-polygon"; }
23
24 public:
25 MatchingMeshPartitionerLonLatPolygon(const Mesh& mesh, const eckit::Parametrisation& config);
26
27
28 MatchingMeshPartitionerLonLatPolygon(): MatchingMeshPartitioner() {}
29 MatchingMeshPartitionerLonLatPolygon(const eckit::Parametrisation&): MatchingMeshPartitioner() {}
30 MatchingMeshPartitionerLonLatPolygon(const size_t nb_partitions): MatchingMeshPartitioner() {}
31 MatchingMeshPartitionerLonLatPolygon(const size_t nb_partitions, const eckit::Parametrisation& config):
32 MatchingMeshPartitioner() {}
33
34 using Partitioner::partition;
35
36 /**
37 * @brief Partition a grid, using the same partitions from a pre-partitioned
38 * mesh.
39 * The method constructs a partition edges polygon to test every target grid
40 * node with.
41 * @param[in] grid grid to be partitioned
42 * @param[out] partitioning partitioning result
43 */
44 void partition(const Grid& grid, int partitioning[]) const;
45
46 virtual std::string type() const { return static_type(); }
47
48 private:
49 bool fallback_nearest_{false};
50 };
51
52 } // namespace partitioner
53 } // namespace detail
54 } // namespace grid
55 } // namespace atlas