Skip to content

Commit

Permalink
smaller number of points for 3d tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jlogan03 committed Nov 15, 2023
1 parent b2f90b0 commit 4d78c36
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions interpn/src/multilinear_rectilinear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ mod test {

#[test]
fn test_interp_3d() {
let nx = 3;
let ny = 4;
let nz = 5;
let nx = 2;
let ny = 3;
let nz = 4;

let x = linspace(0.0, 10.0, nx);
let y = linspace(-5.0, 5.0, ny);
Expand Down Expand Up @@ -657,9 +657,9 @@ mod test {

#[test]
fn test_interp_extrap_3d() {
let nx = 3;
let ny = 4;
let nz = 5;
let nx = 2;
let ny = 3;
let nz = 4;

let x = linspace(0.0, 10.0, nx);
let y = linspace(-5.0, 5.0, ny);
Expand All @@ -674,9 +674,9 @@ mod test {
// For this one, use a function that is linear in every direction,
// z = x + y,
// so that it will be extrapolated correctly in the corner regions
let xw = linspace(-1.0, 11.0, 10);
let yw = linspace(-7.0, 6.0, 10);
let zw = linspace(-25.0, -5.0, 10);
let xw = linspace(-1.0, 11.0, nx + 1);
let yw = linspace(-7.0, 6.0, ny + 1);
let zw = linspace(-25.0, -5.0, nz + 1);
let gridw = meshgrid(vec![&xw, &yw, &zw]);

let xobs: Vec<f64> = gridw.iter().map(|xyi| xyi[0]).collect();
Expand Down
18 changes: 9 additions & 9 deletions interpn/src/multilinear_regular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ mod test {

#[test]
fn test_interp_3d() {
let nx = 3;
let ny = 4;
let nz = 5;
let nx = 2;
let ny = 3;
let nz = 4;

let x = linspace(0.0, 10.0, nx);
let y = linspace(-5.0, 5.0, ny);
Expand Down Expand Up @@ -569,9 +569,9 @@ mod test {

#[test]
fn test_interp_extrap_3d() {
let nx = 3;
let ny = 4;
let nz = 5;
let nx = 2;
let ny = 3;
let nz = 4;

let x = linspace(0.0, 10.0, nx);
let y = linspace(-5.0, 5.0, ny);
Expand All @@ -585,9 +585,9 @@ mod test {
// For this one, use a function that is linear in every direction,
// z = x + y,
// so that it will be extrapolated correctly in the corner regions
let xw = linspace(-1.0, 11.0, 10);
let yw = linspace(-7.0, 6.0, 10);
let zw = linspace(-25.0, -5.0, 10);
let xw = linspace(-1.0, 11.0, nx + 1);
let yw = linspace(-7.0, 6.0, ny + 1);
let zw = linspace(-25.0, -5.0, nz + 1);
let gridw: Vec<f64> = meshgrid(vec![&xw, &yw, &zw])
.iter()
.flatten()
Expand Down

0 comments on commit 4d78c36

Please sign in to comment.