1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pub mod basis;
pub mod utils;
pub mod diffusion_solver;
pub mod stokes_solver;
pub use diffusion_solver::{DiffussionParamsTimeDependent, DiffussionSolverTimeDependent, DiffussionSolverTimeIndependent, DiffussionParamsTimeIndependent};
pub use stokes_solver::{StokesParams1D, StokesParams2D, StaticPressureSolver};
use super::solver_trait::DiffEquationSolver;
#[derive(Debug)]
pub enum Solver {
DiffussionSolverTimeIndependent(DiffussionParamsTimeIndependent),
DiffussionSolverTimeDependent(DiffussionParamsTimeDependent),
Stokes1DSolver(StokesParams1D),
Stokes2DSolver(StokesParams2D),
None
}
#[derive(Debug)]
pub struct NoSolver();
impl DiffEquationSolver for NoSolver {
fn solve(&mut self, _time_step: f64) -> Result<Vec<f64>, crate::Error> {
Ok(vec![])
}
}