atlas
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
atlas::grid::detail::grid::Structured Class Reference

Structured Grid. More...

#include <Structured.h>

Inheritance diagram for atlas::grid::detail::grid::Structured:
Inheritance graph
[legend]
Collaboration diagram for atlas::grid::detail::grid::Structured:
Collaboration graph
[legend]

Classes

class  XSpace
 

Public Types

using IteratorXY = StructuredIterator< Grid::IteratorXY, ComputePointXY >
 
using IteratorLonLat = StructuredIterator< Grid::IteratorLonLat, ComputePointLonLat >
 
using YSpace = Spacing
 
- Public Types inherited from atlas::grid::detail::grid::Grid
using Projection = atlas::Projection
 
using Domain = atlas::Domain
 
using Config = atlas::util::Config
 
using Spec = atlas::util::Config
 
using uid_t = std::string
 
using hash_t = std::string
 

Public Member Functions

 Structured (const std::string &, XSpace, YSpace, Projection, Domain)
 
 Structured (XSpace, YSpace, Projection, Domain)
 
 Structured (const Structured &, Domain)
 
virtual idx_t size () const override
 
virtual Spec spec () const override
 
virtual std::string name () const override
 Human readable name Either the name is the one given at construction as a canonical named grid, or the name "structured".
 
virtual std::string type () const override
 
idx_t ny () const
 
idx_t nx (idx_t j) const
 
idx_t nxmax () const
 
idx_t nxmin () const
 
const std::vector< idx_t > & nx () const
 
const std::vector< double > & y () const
 
double dx (idx_t j) const
 
double xmin (idx_t j) const
 
double x (idx_t i, idx_t j) const
 
double y (idx_t j) const
 
void xy (idx_t i, idx_t j, double crd[]) const
 
PointXY xy (idx_t i, idx_t j) const
 
PointLonLat lonlat (idx_t i, idx_t j) const
 
void lonlat (idx_t i, idx_t j, double crd[]) const
 
bool reduced () const
 
bool periodic () const
 
const XSpacexspace () const
 
const YSpaceyspace () const
 
virtual std::unique_ptr< Grid::IteratorXY > xy_begin () const override
 
virtual std::unique_ptr< Grid::IteratorXY > xy_end () const override
 
virtual std::unique_ptr< Grid::IteratorLonLat > lonlat_begin () const override
 
virtual std::unique_ptr< Grid::IteratorLonLat > lonlat_end () const override
 
gidx_t index (idx_t i, idx_t j) const
 
void index2ij (gidx_t gidx, idx_t &i, idx_t &j) const
 
Config meshgenerator () const override
 
Config partitioner () const override
 
- Public Member Functions inherited from atlas::grid::detail::grid::Grid
 Grid ()
 ctor (default)
 
virtual ~Grid ()
 dtor
 
virtual uid_t uid () const
 Unique grid id Computed from the hash. More...
 
std::string hash () const
 
const Domaindomain () const
 
virtual size_t footprint () const
 
const Projectionprojection () const
 
void attachObserver (GridObserver &) const
 
void detachObserver (GridObserver &) const
 

Static Public Member Functions

static std::string static_type ()
 
- Static Public Member Functions inherited from atlas::grid::detail::grid::Grid
static const Gridcreate (const Config &)
 
static const Gridcreate (const std::string &name)
 
static const Gridcreate (const std::string &name, const Config &)
 
static const Gridcreate (const Grid &, const Domain &)
 

Protected Member Functions

virtual void print (std::ostream &) const override
 Fill provided me.
 
virtual void hash (eckit::Hash &) const override
 Adds to the hash the information that makes this Grid unique.
 
virtual RectangularLonLatDomain lonlatBoundingBox () const override
 
void computeTruePeriodicity ()
 
Domain computeDomain () const
 
void crop (const Domain &)
 

Protected Attributes

idx_t nxmin_
 
idx_t nxmax_
 
idx_t npts_
 Total number of unique points in the grid.
 
std::vector< double > y_
 Latitude values.
 
std::vector< idx_tnx_
 Number of points per latitude.
 
std::vector< double > xmin_
 Value of minimum longitude per latitude [default=0].
 
std::vector< double > xmax_
 Value of maximum longitude per latitude [default=0].
 
std::vector< double > dx_
 Value of longitude increment.
 
bool periodic_x_
 Periodicity in x-direction.
 
std::vector< gidx_tjglooff_
 Per-row offset.
 
- Protected Attributes inherited from atlas::grid::detail::grid::Grid
Projection projection_
 
Domain domain_
 
std::vector< GridObserver * > grid_observers_
 

Detailed Description

Structured Grid.

This class is a base class for all grids that can be described by constant latitudes with a uniform distribution of points per latitude in zonal direction. This means any full grid and reduced grid, both regular, gaussian or other such distribution can be represented with this class

Member Function Documentation

◆ lonlatBoundingBox()

RectangularLonLatDomain atlas::grid::detail::grid::Structured::lonlatBoundingBox ( ) const
overrideprotectedvirtual
Returns
parallel/meridian limits containing the grid

Implements atlas::grid::detail::grid::Grid.

◆ size()

virtual idx_t atlas::grid::detail::grid::Structured::size ( ) const
inlineoverridevirtual
Returns
number of grid points
Note
This methods should have constant access time, if necessary derived

Implements atlas::grid::detail::grid::Grid.


The documentation for this class was generated from the following files: