Debian Codegraph @

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