Skip to main content

Module ldu_matrix

Module ldu_matrix 

Source
Expand description

Layer 2 — sparse LDU (lower/diagonal/upper) matrices, the assembled FvMatrix, and iterative linear solvers (CG, Gauss–Seidel, GAMG). Sparse LDU (lower-diagonal-upper) linear algebra for implicit FV solves.

Holds the face-addressed sparse matrix representation used by the finite-volume implicit operators and the iterative solvers that invert it:

  • ldu_matrix::LduMatrix — the raw sparse coefficients (diagonal + per-face lower/upper off-diagonals) and matrix–vector / residual kernels.
  • FvMatrix — a scalar equation A·φ = b for a VolScalarField, assembled by the Layer-3 fvm:: operators.
  • FvVectorMatrix — the vector counterpart A·U = b with scalar LDU coefficients and a Field<Vector3> source.
  • parallel — the same sparse product and the per-iteration vector operations on the hybrid execution backend (HybridLdu, LduTopology): one entry point per operation taking a ComputeBackend, serial or multi-CPU, bit-for-bit identical either way.
  • solvers — Gauss-Seidel, DIC-preconditioned conjugate gradient, GAMG (algebraic multigrid), and the krylov_solve adapter onto the asymmetric BiCGStab / GMRES kernels in crate::krylov.

Belongs here: the sparse-matrix storage, its arithmetic, and the linear solvers. Field types, meshes, and the differential operators that build these matrices live in their own modules.

Re-exports§

pub use fv_matrix::FvMatrix;
pub use fv_matrix::SolverPerformance;
pub use fv_matrix::SolverSettings;
pub use fv_vector_matrix::FvVectorMatrix;
pub use ldu_matrix::LduMatrix;
pub use parallel::HybridLdu;
pub use parallel::LduTopology;
pub use solvers::conjugate_gradient;
pub use solvers::conjugate_gradient;
pub use solvers::gamg;
pub use solvers::gamg;
pub use solvers::gauss_seidel;
pub use solvers::gauss_seidel;
pub use solvers::krylov_solve::krylov_solve;
pub use solvers::krylov_solve::krylov_solve_prepared;
pub use solvers::krylov_solve::KrylovMethod;
pub use solvers::krylov_solve::KrylovOptions;
pub use solvers::krylov_solve::PreconditionerKind;

Modules§

fv_matrix
fv_vector_matrix
ldu_matrix
parallel
The sparse LDU matrix-vector product and its companion vector operations, on the hybrid execution backend — the hot path of every implicit finite-volume solve.
solvers
Iterative linear solvers for the sparse LDU systems A·x = b.