12 #include "atlas/grid/Grid.h" 13 #include "atlas/grid/Tiles.h" 14 #include "atlas/grid/detail/grid/CubedSphere.h" 19 class CubedSphereGrid;
202 namespace temporary {
205 using implementation_t = grid::detail::grid::CubedSphere::IteratorTIJ;
208 using difference_type = implementation_t::difference_type;
209 using iterator_category = implementation_t::iterator_category;
210 using value_type = implementation_t::value_type;
211 using pointer = implementation_t::pointer;
212 using reference = implementation_t::reference;
215 IteratorTIJ( std::unique_ptr<implementation_t> iterator ) : iterator_( std::move( iterator ) ) {}
217 bool next( value_type& xy ) {
return iterator_->next( xy ); }
219 reference operator*()
const {
return iterator_->operator*(); }
222 iterator_->operator++();
226 const IteratorTIJ& operator+=( difference_type distance ) {
227 iterator_->operator+=( distance );
232 return first.iterator_->distance( *last.iterator_ );
235 bool operator==(
const IteratorTIJ& other )
const {
return iterator_->operator==( *other.iterator_ ); }
236 bool operator!=(
const IteratorTIJ& other )
const {
return iterator_->operator!=( *other.iterator_ ); }
239 difference_type distance(
const IteratorTIJ& other )
const {
return iterator_->distance( *other.iterator_ ); }
242 std::unique_ptr<implementation_t> iterator_;
253 iterator begin()
const {
return grid_.tij_begin(); }
254 iterator end()
const {
return grid_.tij_end(); }
276 operator bool()
const {
return valid(); }
278 bool valid()
const {
return grid_; }
281 void xyt(
idx_t i,
idx_t j,
idx_t t,
double xyt[] )
const { grid_->xyt( i, j, t, xyt ); }
285 void xy(
idx_t i,
idx_t j,
idx_t t,
double xy[] )
const { grid_->xy( i, j, t, xy ); }
290 void lonlat(
idx_t i,
idx_t j,
idx_t t,
double lonlat[] )
const { grid_->lonlat( i, j, t, lonlat ); }
296 inline int N()
const {
return grid_->N(); }
303 const std::string& stagger()
const {
return grid_->stagger(); }
Point in longitude-latitude coordinate system.
Definition: Point.h:103
Definition: Projection.h:49
Definition: CubedSphereGrid.h:245
Most general grid container.
Definition: Grid.h:64
Definition: CubedSphere.h:49
Point in arbitrary XY-coordinate system.
Definition: Point.h:40
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33
long idx_t
Integer type for indices in connectivity tables.
Definition: config.h:42
Definition: CubedSphereGrid.h:204
Specialization of Grid, where the grid is a cubed sphere.
Definition: CubedSphereGrid.h:264
Configuration class used to construct various atlas components.
Definition: Config.h:27