Commit cc06dea1 authored by Luís de Sousa's avatar Luís de Sousa
Browse files

Added area() method to Grid classes.

parent d9f7b949
......@@ -118,6 +118,10 @@ namespace CA {
Real distance() const;
//! Returns the area of a cell.
Real area() const;
//! Return the x coordinate of the bottom-left corner.
Real xCoo() const;
......@@ -356,6 +360,11 @@ namespace CA {
return _cagrid.distance;
}
inline Real Grid::area() const
{
return _cagrid.area;
}
inline Real Grid::xCoo() const
{
return _cagrid.x_coo;
......
......@@ -141,8 +141,7 @@ struct _caGrid
//! The distance between the centroid of the main cell (number 0)
//! and the centroid of the given cell in the vertical and
//! horizontal plane.
//! and the centroid of an adjacent cell.
_caReal distance;
//! The x coordinate of the bottom-left corner
......
......@@ -141,6 +141,10 @@ namespace CA {
Real length() const;
//! Returns the area of a cell.
Real area() const;
//! Return the x coordinate of the bottom-left corner.
Real xCoo() const;
......@@ -749,6 +753,11 @@ namespace CA {
return _cagrid.length;
}
inline Real Grid::area() const
{
return _cagrid.area;
}
inline Real Grid::xCoo() const
{
......
......@@ -107,6 +107,10 @@ namespace CA {
Real length() const;
//! Returns the area of a cell.
Real area() const;
//! Return the x coordinate of the bottom-left corner.
Real xCoo() const;
......@@ -364,6 +368,11 @@ namespace CA {
return _cagrid.length;
}
inline Real Grid::area() const
{
return _cagrid.area;
}
inline Real Grid::xCoo() const
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment