Debian Codegraph @

src/atlas/grid/Tiles.cc

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 * 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 #include "atlas/grid/Tiles.h"
12 #include "atlas/grid/detail/tiles/FV3Tiles.h"
13 #include "atlas/grid/detail/tiles/LFRicTiles.h"
14 #include "atlas/grid/detail/tiles/Tiles.h"
15 #include "atlas/projection/Jacobian.h"
16
17
18 namespace atlas {
19 namespace grid {
20
21 CubedSphereTiles::CubedSphereTiles(const eckit::Parametrisation& p):
22 Handle(atlas::grid::detail::CubedSphereTiles::create(p)) {}
23
24 CubedSphereTiles::CubedSphereTiles(const std::string& s): Handle(atlas::grid::detail::CubedSphereTiles::create(s)) {}
25
26
27 std::string CubedSphereTiles::type() const {
28 return get()->type();
29 }
30
31 std::array<std::array<double, 6>, 2> CubedSphereTiles::xy2abOffsets() const {
32 return get()->xy2abOffsets();
33 }
34
35 std::array<std::array<double, 6>, 2> CubedSphereTiles::ab2xyOffsets() const {
36 return get()->ab2xyOffsets();
37 }
38
39 void CubedSphereTiles::rotate(idx_t t, double xyz[]) const {
40 return get()->rotate(t, xyz);
41 }
42
43 void CubedSphereTiles::unrotate(idx_t t, double xyz[]) const {
44 return get()->unrotate(t, xyz);
45 }
46
47 idx_t CubedSphereTiles::indexFromXY(const double xy[]) const {
48 return get()->indexFromXY(xy);
49 }
50
51 idx_t CubedSphereTiles::indexFromXY(const PointXY& xy) const {
52 return get()->indexFromXY(xy);
53 }
54
55 idx_t CubedSphereTiles::indexFromLonLat(const double lonlat[]) const {
56 return get()->indexFromLonLat(lonlat);
57 }
58
59 idx_t CubedSphereTiles::indexFromLonLat(const PointLonLat& lonlat) const {
60 return get()->indexFromLonLat(lonlat.data());
61 }
62
63 idx_t CubedSphereTiles::size() const {
64 return get()->size();
65 }
66
67 void CubedSphereTiles::enforceXYdomain(double xy[]) const {
68 return get()->enforceXYdomain(xy);
69 }
70
71 atlas::PointXY CubedSphereTiles::tileCubePeriodicity(const atlas::PointXY& xyExtended, const atlas::idx_t tile) const {
72 return get()->tileCubePeriodicity(xyExtended, tile);
73 }
74
75 void CubedSphereTiles::print(std::ostream& os) const {
76 get()->print(os);
77 }
78
79 std::ostream& operator<<(std::ostream& os, const CubedSphereTiles& t) {
80 t.print(os);
81 return os;
82 }
83
84 const PointXY& CubedSphereTiles::tileCentre(size_t t) const {
85 return get()->tileCentre(t);
86 }
87
88 const projection::Jacobian& CubedSphereTiles::tileJacobian(size_t t) const {
89 return get()->tileJacobian(t);
90 }
91
92 } // namespace grid
93 } // namespace atlas