Skip to content

Commit

Permalink
[sparse] Improve tool to solve with a matrix-market file
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmech committed Sep 5, 2023
1 parent e36848d commit d53c15d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion russell_sparse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The data directory contains an example of Matrix Market file named `bfwb62.mtx`
Run the command:

```bash
cargo run --release --bin solve_mm_build -- data/matrix_market/bfwb62.mtx
cargo run --release --bin solve_mm_build -- ~/Downloads/matrix-market/bfwb62.mtx
```

Or
Expand Down
4 changes: 2 additions & 2 deletions russell_sparse/src/bin/solve_mm_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ fn main() -> Result<(), StrError> {

// check
if path.ends_with("bfwb62.mtx") {
let tolerance = if opt.mmp { 1e-10 } else { 1e-15 };
let tolerance = if opt.mmp { 1e-10 } else { 1e-11 };
let correct_x = get_bfwb62_correct_x();
for i in 0..neq {
let diff = f64::abs(x.get(i) - correct_x.get(i));
if diff > tolerance {
println!("ERROR: diff({}) = {}", i, diff);
println!("ERROR: diff({}) = {:.2e}", i, diff);
}
}
}
Expand Down

0 comments on commit d53c15d

Please sign in to comment.