Skip to main content

diffsol_c/
linear_solver_type.rs

1// Solver type Python enum. This refers to the internal solver mechanism, either
2// LU or KLU in diffsol, with default selecting whichever is most appropriate
3// given the matrix type.
4
5/// Enumerates the possible linear solver types for diffsol
6///
7/// :attr default: use the solver's default linear solver choice, typically LU
8/// :attr lu: use LU decomposition linear solver (dense or sparse as appropriate)
9/// :attr klu: use KLU sparse linear solver
10use schemars::JsonSchema;
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
14#[serde(rename_all = "snake_case")]
15pub enum LinearSolverType {
16    Default,
17    Lu,
18    Klu,
19}