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