Debian Codegraph @

src/atlas/interpolation/method/knn/KNearestNeighboursBase.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 <memory>
14
15 #include "atlas/interpolation/method/Method.h"
16 #include "atlas/mesh/Halo.h"
17 #include "atlas/mesh/Mesh.h"
18 #include "atlas/util/KDTree.h"
19
20 namespace atlas {
21 namespace interpolation {
22 namespace method {
23
24 class KNearestNeighboursBase : public Method {
25 public:
26 KNearestNeighboursBase(const Config& config): Method(config) {}
27 virtual ~KNearestNeighboursBase() override {}
28
29 protected:
30 void buildPointSearchTree(Mesh& meshSource) { buildPointSearchTree(meshSource, mesh::Halo(meshSource)); }
31 void buildPointSearchTree(Mesh& meshSource, const mesh::Halo&);
32 void buildPointSearchTree(const FunctionSpace&);
33 bool extractTreeFromCache(const Cache&);
34
35 util::IndexKDTree pTree_;
36 };
37
38 } // namespace method
39 } // namespace interpolation
40 } // namespace atlas