hydr 0.1.0

Hydrology and hydraulic simulation on numr runtimes
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Creates a Cartesian grid and prints its SI geometry.

use hydr::grid::CartesianGrid;

fn main() -> Result<(), hydr::error::GridError> {
    let grid = CartesianGrid::new(100, 50, 2.0, 2.0)?;
    println!("Cells: {}", grid.cell_count());
    println!("Cell area: {} m²", grid.cell_area());
    println!("Domain extent: {:?} m", grid.extent());
    Ok(())
}