use explicit integration routine

This commit is contained in:
Magnus Ulimoen 2020-04-11 19:56:44 +02:00
parent 596605a8b7
commit 9bf2a1513c
3 changed files with 4 additions and 22 deletions

View File

@ -43,7 +43,7 @@ impl<SBP: SbpOperator> System<SBP> {
let boundaries = boundary_extractor(y, grid, &bc);
RHS_trad(k, y, metrics, &boundaries, wb)
};
integrate::rk4(
integrate::integrate::<integrate::Rk4, _, _, _, _>(
rhs_trad,
&self.sys.0,
&mut self.sys.1,
@ -103,7 +103,7 @@ impl<UO: UpwindOperator> System<UO> {
let boundaries = boundary_extractor(y, grid, &bc);
RHS_upwind(k, y, metrics, &boundaries, wb)
};
integrate::rk4(
integrate::integrate::<integrate::Rk4, _, _, _, _>(
rhs_upwind,
&self.sys.0,
&mut self.sys.1,

View File

@ -140,21 +140,3 @@ pub fn integrate<'a, BTableau, F: 'a, RHS, MT, C>(
rhs(&mut k[i], &fut, simtime, constants, &mut mutables);
}
}
pub(crate) fn rk4<'a, F: 'a, RHS, MT, C>(
rhs: RHS,
prev: &F,
fut: &mut F,
time: &mut Float,
dt: Float,
k: &mut [F; 4],
constants: C,
mutables: &mut MT,
) where
C: Copy,
F: std::ops::Deref<Target = Array3<Float>> + std::ops::DerefMut<Target = Array3<Float>>,
RHS: Fn(&mut F, &F, Float, C, &mut MT),
{
integrate::<Rk6, F, RHS, MT, C>(rhs, prev, fut, time, dt, k, constants, mutables)
}

View File

@ -126,7 +126,7 @@ impl<SBP: SbpOperator> System<SBP> {
RHS(fut, prev, grid, metrics, m);
}
let mut _time = 0.0;
integrate::rk4(
integrate::integrate::<integrate::Rk4, _, _, _, _>(
rhs_adaptor,
&self.sys.0,
&mut self.sys.1,
@ -154,7 +154,7 @@ impl<UO: UpwindOperator> System<UO> {
RHS_upwind(fut, prev, grid, metrics, m);
}
let mut _time = 0.0;
integrate::rk4(
integrate::integrate::<integrate::Rk4, _, _, _, _>(
rhs_adaptor,
&self.sys.0,
&mut self.sys.1,