|
4 | 4 | #include "atlas/runtime/Exception.h" |
5 | 5 | #include "atlas/util/Config.h" |
6 | 6 | #include "atlas/util/Point.h" |
7 | | -#if eckit_HAVE_EIGEN |
8 | | -#include "eckit/maths/Eigen.h" |
9 | | -#else |
10 | | -#include "eckit/maths/Matrix.h" |
11 | | -#endif |
12 | 7 |
|
13 | 8 | namespace atlas { |
14 | 9 | namespace grid { |
@@ -164,31 +159,25 @@ class CubedSphere2 : public Grid { |
164 | 159 | private: |
165 | 160 | std::string type_ = {"cubedsphere2"}; |
166 | 161 |
|
167 | | -#if eckit_HAVE_EIGEN |
168 | | - using Matrix = Eigen::Matrix3d; |
169 | | - using Vector = Eigen::Vector3d; |
170 | | -#else |
171 | | - using Matrix = eckit::maths::Matrix<double>; |
172 | | - using Vector = eckit::maths::ColVector<double>; |
173 | | -#endif |
174 | | - |
175 | | - std::array<Matrix, 6> lfric_rotations_ = { |
176 | | - Matrix({{0, 1, 0}, {0, 0, -1}, {1, 0, 0}}), |
177 | | - Matrix({{-1, 0, 0}, {0, 0, -1}, {0, 1, 0}}), |
178 | | - Matrix({{0, -1, 0}, {0, 0, -1}, {-1, 0, 0}}), |
179 | | - Matrix({{1, 0, 0}, {0, 0, -1}, {0, -1, 0}}), |
180 | | - Matrix({{-1, 0, 0}, {0, 1, 0}, {0, 0, 1}}), |
181 | | - Matrix({{-1, 0, 0}, {0, -1, 0}, {0, 0, -1}}) |
182 | | - }; |
183 | | - |
184 | | - std::array<Matrix, 6> lfric_rotations_transposed_ = { |
185 | | - Matrix({{0, 0, 1}, {1, 0, 0}, {0, -1, 0}}), |
186 | | - Matrix({{-1, 0, 0}, {0, 0, 1}, {0, -1, 0}}), |
187 | | - Matrix({{0, 0, -1}, {-1, 0, 0}, {0, -1, 0}}), |
188 | | - Matrix({{1, 0, 0}, {0, 0, -1}, {0, -1, 0}}), |
189 | | - Matrix({{-1, 0, 0}, {0, 1, 0}, {0, 0, 1}}), |
190 | | - Matrix({{-1, 0, 0}, {0, -1, 0}, {0, 0, -1}}) |
191 | | - }; |
| 162 | + using Matrix = std::array<std::array<double, 3>, 3>; |
| 163 | + |
| 164 | + std::array<Matrix, 6> lfric_rotations_ = {{ |
| 165 | + {{ {0, 1, 0}, {0, 0, -1}, {1, 0, 0} }}, |
| 166 | + {{ {-1, 0, 0}, {0, 0, -1}, {0, 1, 0} }}, |
| 167 | + {{ {0, -1, 0}, {0, 0, -1}, {-1, 0, 0} }}, |
| 168 | + {{ {1, 0, 0}, {0, 0, -1}, {0, -1, 0} }}, |
| 169 | + {{ {-1, 0, 0}, {0, 1, 0}, {0, 0, 1} }}, |
| 170 | + {{ {-1, 0, 0}, {0, -1, 0}, {0, 0, -1} }} |
| 171 | + }}; |
| 172 | + |
| 173 | + std::array<Matrix, 6> lfric_rotations_transposed_ = {{ |
| 174 | + {{ {0, 0, 1}, {1, 0, 0}, {0, -1, 0} }}, |
| 175 | + {{ {-1, 0, 0}, {0, 0, 1}, {0, -1, 0} }}, |
| 176 | + {{ {0, 0, -1}, {-1, 0, 0}, {0, -1, 0} }}, |
| 177 | + {{ {1, 0, 0}, {0, 0, -1}, {0, -1, 0} }}, |
| 178 | + {{ {-1, 0, 0}, {0, 1, 0}, {0, 0, 1} }}, |
| 179 | + {{ {-1, 0, 0}, {0, -1, 0}, {0, 0, -1} }} |
| 180 | + }}; |
192 | 181 |
|
193 | 182 | }; |
194 | 183 |
|
|
0 commit comments