From 9caf43927708552cdeced1eb9cbee441d71115b0 Mon Sep 17 00:00:00 2001 From: robin Date: Thu, 9 May 2024 08:41:38 +0200 Subject: [PATCH] docs --- .../src/advection/UVGrid.h | 105 +++++++++--------- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/particle-track-and-trace/src/advection/UVGrid.h b/particle-track-and-trace/src/advection/UVGrid.h index ef5a99a..2954d96 100644 --- a/particle-track-and-trace/src/advection/UVGrid.h +++ b/particle-track-and-trace/src/advection/UVGrid.h @@ -6,84 +6,89 @@ class UVGrid { private: - /** - * 1D data vector of all the us and vs - */ - std::vector uvData; + /** + * 1D data vector of all the us and vs + */ + std::vector uvData; public: - UVGrid(std::string path); + /** + * Constructs the UVGrid. + * @param path The data path where the constructor expects to find + * the files hydrodynamic_U.h5, hydrodynamic_V.h5, and grid.h5 + */ + UVGrid(std::string path); - /** - * The matrix has shape (timeSize, latSize, lonSize) - */ - size_t timeSize; - size_t latSize; - size_t lonSize; + /** + * The matrix has shape (timeSize, latSize, lonSize) + */ + size_t timeSize; + size_t latSize; + size_t lonSize; - /** - * Assuming grid is a regular grid, gives the longitudinal spacing of grid. - * @return longitudinal spacing - */ - double lonStep() const; + /** + * Assuming grid is a regular grid, gives the longitudinal spacing of grid. + * @return longitudinal spacing + */ + double lonStep() const; - /** - * Assuming grid is a regular grid, gives the latitudinal spacing of grid. - * @return latitudinal spacing - */ - double latStep() const; + /** + * Assuming grid is a regular grid, gives the latitudinal spacing of grid. + * @return latitudinal spacing + */ + double latStep() const; - /** - * Assuming grid is a regular grid, gives the time spacing of grid. - * @return time spacing - */ - int timeStep() const; + /** + * Assuming grid is a regular grid, gives the time spacing of grid. + * @return time spacing + */ + int timeStep() const; /** * Returns the lowest longitudinal value of grid. * @return minimum longitude */ - double lonMin() const; + double lonMin() const; /** * Returns the highest longitudinal value of grid. * @return maximum longitude */ - double lonMax() const; + double lonMax() const; /** * Returns the lowest latitudinal value of grid. * @return minimum latitude */ - double latMin() const; + double latMin() const; /** * Returns the higehst latitudinal value of grid. * @return maximum latitude */ - double latMax() const; + double latMax() const; - /** - * times, lats, lons are vector of length timeSize, latSize, lonSize respectively. - * The maintain the following invariant: - * grid[timeIndex,latIndex,lonIndex] gives the u,v at the point with latitude at lats[latIndex], - * with longitude at lons[lonIndex], and with time at times[timeIndex]. - */ - std::vector times; - std::vector lats; - std::vector lons; + /** + * times, lats, lons are vector of length timeSize, latSize, lonSize respectively. + * The maintain the following invariant: + * grid[timeIndex,latIndex,lonIndex] gives the u,v at the point with latitude at lats[latIndex], + * with longitude at lons[lonIndex], and with time at times[timeIndex]. + */ + std::vector times; + std::vector lats; + std::vector lons; - /** - * The 3D index into the data. The array is sized by [8761][67][116] - * @return Velocity at that index - */ - const Vel& operator[](size_t timeIndex, size_t latIndex, size_t lonIndex) const; + /** + * The 3D index into the data. The array is sized by [8761][67][116] + * @return Velocity at that index + */ + const Vel &operator[](size_t timeIndex, size_t latIndex, size_t lonIndex) const; - /** - * Streams a slice at timeIndex t of the matrix to the outstream given by os - * @param os outstream - * @param t index with which to slice matrix - */ - void streamSlice(std::ostream &os, size_t t); + /** + * Streams a slice at timeIndex t of the matrix to the outstream given by os + * @param os outstream + * @param t index with which to slice matrix + */ + void streamSlice(std::ostream &os, size_t t); }; #endif //UVGRID_H