Skip to content

Commit

Permalink
Minor adjustments to formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mhovd committed Mar 21, 2024
1 parent 8ef4c7d commit a815637
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
32 changes: 17 additions & 15 deletions src/ode_solver/test_models/robertson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,27 @@ pub fn robertson<M: DenseMatrix + 'static>() -> (
1.0e-6.into(),
]));
let mut soln = OdeSolverSolution::default();
#[rustfmt::skip]
let data = vec![
(vec![1.0.into(), 0.0.into(), 0.0.into()], 0.0.into()),
(vec![9.8517e-01.into(), 3.3864e-05.into(), 1.4794e-02.into()], 0.4.into()),
(vec![9.0553e-01.into(), 2.2406e-05.into(), 9.4452e-02.into()], 4.0.into()),
(vec![7.1579e-01.into(), 9.1838e-06.into(), 2.8420e-01.into()], 40.0.into()),
(vec![4.5044e-01.into(), 3.2218e-06.into(), 5.4956e-01.into()], 400.0.into()),
(vec![1.8320e-01.into(), 8.9444e-07.into(), 8.1680e-01.into()], 4000.0.into()),
(vec![3.8992e-02.into(), 1.6221e-07.into(), 9.6101e-01.into()], 40000.0.into()),
(vec![4.9369e-03.into(), 1.9842e-08.into(), 9.9506e-01.into()], 400000.0.into()),
(vec![5.1674e-04.into(), 2.0684e-09.into(), 9.9948e-01.into()], 4000000.0.into()),
(vec![5.2009e-05.into(), 2.0805e-10.into(), 9.9995e-01.into()], 4.0000e+07.into()),
(vec![5.2012e-06.into(), 2.0805e-11.into(), 9.9999e-01.into()], 4.0000e+08.into()),
(vec![5.1850e-07.into(), 2.0740e-12.into(), 1.0000e+00.into()], 4.0000e+09.into()),
(vec![4.8641e-08.into(), 1.9456e-13.into(), 1.0000e+00.into()], 4.0000e+10.into()),
(vec![1.0, 0.0, 0.0], 0.0),
(vec![9.8517e-01, 3.3864e-05, 1.4794e-02], 0.4),
(vec![9.0553e-01, 2.2406e-05, 9.4452e-02], 4.0),
(vec![7.1579e-01, 9.1838e-06, 2.8420e-01], 40.0),
(vec![4.5044e-01, 3.2218e-06, 5.4956e-01], 400.0),
(vec![1.8320e-01, 8.9444e-07, 8.1680e-01], 4000.0),
(vec![3.8992e-02, 1.6221e-07, 9.6101e-01], 40000.0),
(vec![4.9369e-03, 1.9842e-08, 9.9506e-01], 400000.0),
(vec![5.1674e-04, 2.0684e-09, 9.9948e-01], 4000000.0),
(vec![5.2009e-05, 2.0805e-10, 9.9995e-01], 4.0000e+07),
(vec![5.2012e-06, 2.0805e-11, 9.9999e-01], 4.0000e+08),
(vec![5.1850e-07, 2.0740e-12, 1.0000e+00], 4.0000e+09),
(vec![4.8641e-08, 1.9456e-13, 1.0000e+00], 4.0000e+10),
];

for (values, time) in data {
soln.push(M::V::from_vec(values), time);
soln.push(
M::V::from_vec(values.into_iter().map(|v| v.into()).collect()),
time.into(),
);
}

(problem, soln)
Expand Down
1 change: 0 additions & 1 deletion src/ode_solver/test_models/robertson_ode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pub fn robertson_ode<M: DenseMatrix + 'static>() -> (
1.0e-6.into(),
]));
let mut soln = OdeSolverSolution::default();
#[rustfmt::skip]
let data = vec![
(vec![1.0, 0.0, 0.0], 0.0),
(vec![9.851641e-01, 3.386242e-05, 1.480205e-02], 0.4),
Expand Down

0 comments on commit a815637

Please sign in to comment.