SummationByParts/multigrid/src/eval.rs

27 lines
614 B
Rust
Raw Normal View History

2021-07-01 16:37:22 +00:00
use ndarray::{ArrayView, ArrayViewMut, Dimension};
use sbp::Float;
2021-07-01 16:37:22 +00:00
pub mod evalexpr;
#[derive(Clone, Debug)]
pub enum Evaluator {
2021-07-01 16:37:22 +00:00
EvalExpr(evalexpr::Evaluator),
}
2021-07-01 16:37:22 +00:00
impl<D: Dimension> euler::eval::Evaluator<D> for Evaluator {
fn evaluate(
&self,
t: Float,
x: ArrayView<Float, D>,
y: ArrayView<Float, D>,
rho: ArrayViewMut<Float, D>,
rhou: ArrayViewMut<Float, D>,
rhov: ArrayViewMut<Float, D>,
e: ArrayViewMut<Float, D>,
) {
match self {
2021-07-01 16:37:22 +00:00
Self::EvalExpr(c) => c.evaluate(t, x, y, rho, rhou, rhov, e),
}
}
}