Debian Codegraph @

src/atlas/mesh/actions/Build2DCellCentres.h

raw
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 <string>
11
12 #include "atlas/util/Config.h"
13
14 namespace atlas {
15
16 class Mesh;
17 class Field;
18
19 namespace mesh {
20 namespace actions {
21
22 /// Generates the cell centres on each cell
23 class Build2DCellCentres {
24 public:
25 Build2DCellCentres(const std::string& field_name = "centre", bool force_recompute = false);
26 Build2DCellCentres(eckit::Configuration&);
27
28 /// @note Correct only for Linear Triangles and Quadrilaterals
29 Field& operator()(Mesh&) const;
30
31 private:
32 std::string field_name_;
33 bool force_recompute_;
34 bool flatten_virtual_elements_;
35 };
36
37 } // namespace actions
38 } // namespace mesh
39 } // namespace atlas