diff --git a/multigrid/Cargo.toml b/multigrid/Cargo.toml index d12b4fe..8ff0362 100644 --- a/multigrid/Cargo.toml +++ b/multigrid/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] sbp = { path = "../sbp", features = ["serde1"] } euler = { path = "../euler", features = ["serde1"] } -hdf5 = "0.8.0" +hdf5 = "0.8.1" integrate = { path = "../utils/integrate" } rayon = "1.3.0" indicatif = "0.17.0-beta.1" diff --git a/multigrid/src/system.rs b/multigrid/src/system.rs index 9740313..166e6cc 100644 --- a/multigrid/src/system.rs +++ b/multigrid/src/system.rs @@ -592,8 +592,7 @@ impl SingleThreadedSystem { let tds = self.output.0.dataset("t").unwrap(); let tpos = tds.size(); tds.resize((tpos + 1,)).unwrap(); - tds.write_slice(&[ntime], ndarray::s![tpos..tpos + 1]) - .unwrap(); + tds.write_slice(&[ntime], tpos..tpos + 1).unwrap(); for (group, fnow) in self.output.1.iter().zip(&self.fnow) { let (ny, nx) = (fnow.ny(), fnow.nx()); let rhods = group.dataset("rho").unwrap(); @@ -603,16 +602,16 @@ impl SingleThreadedSystem { let (rho, rhou, rhov, e) = fnow.components(); rhods.resize((tpos + 1, ny, nx)).unwrap(); - rhods.write_slice(rho, ndarray::s![tpos, .., ..]).unwrap(); + rhods.write_slice(rho, (tpos, .., ..)).unwrap(); rhouds.resize((tpos + 1, ny, nx)).unwrap(); - rhouds.write_slice(rhou, ndarray::s![tpos, .., ..]).unwrap(); + rhouds.write_slice(rhou, (tpos, .., ..)).unwrap(); rhovds.resize((tpos + 1, ny, nx)).unwrap(); - rhovds.write_slice(rhov, ndarray::s![tpos, .., ..]).unwrap(); + rhovds.write_slice(rhov, (tpos, .., ..)).unwrap(); eds.resize((tpos + 1, ny, nx)).unwrap(); - eds.write_slice(e, ndarray::s![tpos, .., ..]).unwrap(); + eds.write_slice(e, (tpos, .., ..)).unwrap(); } } @@ -658,8 +657,7 @@ impl DistributedSystem { let tds = self.output.dataset("t").unwrap(); let tpos = tds.size(); tds.resize((tpos + 1,)).unwrap(); - tds.write_slice(&[ntime], ndarray::s![tpos..tpos + 1]) - .unwrap(); + tds.write_slice(&[ntime], tpos..tpos + 1).unwrap(); } pub fn attach_progressbar(&mut self, ntime: u64) { let target = indicatif::MultiProgress::new(); @@ -859,16 +857,16 @@ impl DistributedSystemPart { let (rho, rhou, rhov, e) = self.current.components(); let tpos = rhods.size() / (ny * nx); rhods.resize((tpos + 1, ny, nx)).unwrap(); - rhods.write_slice(rho, ndarray::s![tpos, .., ..]).unwrap(); + rhods.write_slice(rho, (tpos, .., ..)).unwrap(); rhouds.resize((tpos + 1, ny, nx)).unwrap(); - rhouds.write_slice(rhou, ndarray::s![tpos, .., ..]).unwrap(); + rhouds.write_slice(rhou, (tpos, .., ..)).unwrap(); rhovds.resize((tpos + 1, ny, nx)).unwrap(); - rhovds.write_slice(rhov, ndarray::s![tpos, .., ..]).unwrap(); + rhovds.write_slice(rhov, (tpos, .., ..)).unwrap(); eds.resize((tpos + 1, ny, nx)).unwrap(); - eds.write_slice(e, ndarray::s![tpos, .., ..]).unwrap(); + eds.write_slice(e, (tpos, .., ..)).unwrap(); } fn advance(&mut self, ntime: u64) {