Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
imrn99 committed Oct 25, 2024
1 parent 618d434 commit a436820
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/examples/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
// - b = 0.5 m
// - q = 1.0e-6 C

// --- IMPORTS

use integraal::{ComputeMethod, DomainDescriptor, FunctionDescriptor, Integraal};

// --- CONTENT

const E0: f64 = 100.0;
const Q: f64 = 1.0e-6;
const EXPECTED: f64 = 1.6094379124341003e-4;
Expand Down
10 changes: 10 additions & 0 deletions examples/examples/measurements.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
// we compute the superficial velocity of a fluid at a pipe section, using sampled data
//
// see `README.md` for more details.

// --- IMPORTS

use csv::ReaderBuilder;
use integraal::{ComputeMethod, DomainDescriptor, FunctionDescriptor, Integraal};
use std::path::Path;

// --- CONTENT

const RMAX: f64 = 41.;

#[rustfmt::skip]
Expand Down Expand Up @@ -29,6 +37,8 @@ fn main() {
println!(" superficial velocity: {:7.3} m/s" , volume_velocity / area);
}

// file parsing using the `csv` crate; retrieve radius & velocity samples

fn parse_csv(path: impl AsRef<Path>) -> (Vec<f64>, Vec<f64>) {
let mut builder = ReaderBuilder::new();
builder.has_headers(true).delimiter(b';');
Expand Down

0 comments on commit a436820

Please sign in to comment.