| 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/domain/Domain.h" |
| 16 |
#include "atlas/domain/detail/RectangularDomain.h" |
| 17 |
#include "atlas/library/config.h" |
| 18 |
|
| 19 |
namespace atlas { |
| 20 |
class Field; |
| 21 |
} |
| 22 |
|
| 23 |
namespace atlas { |
| 24 |
class Mesh; |
| 25 |
namespace mesh { |
| 26 |
class Nodes; |
| 27 |
} |
| 28 |
} // namespace atlas |
| 29 |
|
| 30 |
namespace atlas { |
| 31 |
namespace mesh { |
| 32 |
namespace actions { |
| 33 |
|
| 34 |
//---------------------------------------------------------------------------------------------------------------------- |
| 35 |
|
| 36 |
/// Creates a XYZ field from the (lon,lat) field |
| 37 |
class BuildTorusXYZField { |
| 38 |
public: |
| 39 |
explicit BuildTorusXYZField(const std::string& name = "xyz"); |
| 40 |
|
| 41 |
Field& operator()(Mesh&, const atlas::Domain&, double r0, double r1, idx_t nx, idx_t ny) const; |
| 42 |
Field& operator()(mesh::Nodes&, const atlas::Domain&, double r0, double r1, idx_t nx, idx_t ny) const; |
| 43 |
|
| 44 |
private: |
| 45 |
std::string name_; |
| 46 |
}; |
| 47 |
|
| 48 |
//---------------------------------------------------------------------------------------------------------------------- |
| 49 |
|
| 50 |
} // namespace actions |
| 51 |
} // namespace mesh |
| 52 |
} // namespace atlas |