upgrade ndarray
This commit is contained in:
parent
1718053508
commit
6fe4e1460f
|
@ -5,7 +5,7 @@ authors = ["Magnus Ulimoen <flymagnus@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ndarray = { version = "0.13.0", features = ["approx"] }
|
ndarray = { version = "0.13.1", features = ["approx"] }
|
||||||
approx = "0.3.2"
|
approx = "0.3.2"
|
||||||
packed_simd = "0.3.3"
|
packed_simd = "0.3.3"
|
||||||
rayon = { version = "1.3.0", optional = true }
|
rayon = { version = "1.3.0", optional = true }
|
||||||
|
|
|
@ -261,15 +261,8 @@ impl Field {
|
||||||
ArrayViewMut2<Float>,
|
ArrayViewMut2<Float>,
|
||||||
ArrayViewMut2<Float>,
|
ArrayViewMut2<Float>,
|
||||||
) {
|
) {
|
||||||
let mut iter = self.0.outer_iter_mut();
|
self.0
|
||||||
|
.multi_slice_mut((s![0, .., ..], s![1, .., ..], s![2, .., ..], s![3, .., ..]))
|
||||||
let rho = iter.next().unwrap();
|
|
||||||
let rhou = iter.next().unwrap();
|
|
||||||
let rhov = iter.next().unwrap();
|
|
||||||
let e = iter.next().unwrap();
|
|
||||||
assert_eq!(iter.next(), None);
|
|
||||||
|
|
||||||
(rho, rhou, rhov, e)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn north(&self) -> ArrayView2<Float> {
|
pub fn north(&self) -> ArrayView2<Float> {
|
||||||
|
|
|
@ -73,14 +73,8 @@ impl Field {
|
||||||
ArrayViewMut2<Float>,
|
ArrayViewMut2<Float>,
|
||||||
ArrayViewMut2<Float>,
|
ArrayViewMut2<Float>,
|
||||||
) {
|
) {
|
||||||
let mut iter = self.0.outer_iter_mut();
|
self.0
|
||||||
|
.multi_slice_mut((s![0, .., ..], s![1, .., ..], s![2, .., ..]))
|
||||||
let ex = iter.next().unwrap();
|
|
||||||
let hz = iter.next().unwrap();
|
|
||||||
let ey = iter.next().unwrap();
|
|
||||||
assert_eq!(iter.next(), None);
|
|
||||||
|
|
||||||
(ex, hz, ey)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue