Rodin::Solver namespace

Module for solving linear and nonlinear systems arising from finite element discretizations.

The Solver module provides a comprehensive set of direct and iterative linear solvers:

Direct solvers** (exact up to floating-point precision):

  • SparseLU — General-purpose sparse LU factorization
  • UMFPack — SuiteSparse UMFPACK solver
  • CHOLMOD — SuiteSparse Cholesky for SPD systems
  • SimplicialLLT — Simplicial $ LL^T $
  • SimplicialLDLT — Simplicial $ LDL^T $
  • SparseQR — Sparse QR factorization
  • SPQR — SuiteSparse sparse QR
  • HouseholderQR — Dense Householder QR
  • LDLT — Dense $ LDL^T $

    Iterative solvers** (for large systems):

  • CG — Conjugate Gradient (SPD systems)
  • BiCGSTAB — Bi-conjugate gradient stabilized
  • GMRES — Generalized Minimum Residual
  • DGMRES — Deflated GMRES
  • MINRES — Minimum Residual (symmetric systems)
  • IDRS — Induced Dimension Reduction
  • IDRSTABL — IDR(s) with stabilization
  • LeastSquaresCG — Least-squares CG

Usage:

// Inline iterative solver — most common pattern
Solver::CG(problem).solve();

// Configured iterative solver
Solver::CG solver(problem);
solver.setMaxIterations(1000);
solver.setTolerance(1e-10);
solver.solve();

// Direct solver
Solver::SparseLU(problem).solve();

Nonlinear solvers** (for hyperelastic or other nonlinear problems):

  • Solver::NewtonSolver<LinearSolver> — Newton-Raphson iteration for nonlinear variational problems. At each iterate $ u^k $ , assembles the tangent system $ J(u^k)\,\delta u^k = -F(u^k) $ and updates $ u^{k+1} = u^k + \delta u^k $ . Configurable via setMaxIterations(), setAbsoluteTolerance(), and setRelativeTolerance().

Classes

template<class LinearSystem>
class BiCGSTAB
Bi-conjugate gradient stabilized iterative solver.
template<class Scalar>
class BiCGSTAB<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
Bi-conjugate gradient stabilized solver for non-symmetric sparse systems.
template<class LinearSystem>
class CG
Conjugate gradient solver for symmetric positive definite systems.
template<class Scalar>
class CG<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
Conjugate gradient solver for symmetric positive definite dense systems.
template<class Scalar>
class CG<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
Conjugate gradient solver for symmetric positive definite sparse systems.
template<>
class CG<PETSc::Math::LinearSystem>
Conjugate gradient solver for PETSc linear systems.
template<class LinearSystem>
class DGMRES
Deflated generalized minimal residual iterative solver.
template<class Scalar>
class DGMRES<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
DGMRES solver for dense systems.
template<class Scalar>
class DGMRES<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
DGMRES solver for sparse systems.
template<class EigenSolverType, class OperatorType, class VectorType>
class EigenSolver
Wrapper class for any Eigen sparse solver.
template<class LinearSystem>
class GMRES
Generalized minimal residual iterative solver.
template<class Scalar>
class GMRES<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
GMRES solver for dense systems.
template<class Scalar>
class GMRES<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
GMRES solver for sparse systems.
template<>
class GMRES<PETSc::Math::LinearSystem>
Generalized minimal residual (GMRES) solver for PETSc linear systems.
template<class LinearSystem>
class HouseholderQR
Householder QR decomposition for dense matrices.
template<class Scalar>
class HouseholderQR<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
A direct sparse HouseholderQR Cholesky factorizations without square root for use with Math::SparseMatrix and Math::Vector.
template<class Scalar>
class IDRS<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
IDRS(s) solver for dense systems.
template<class Scalar>
class IDRS<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
IDRS(s) solver for sparse systems.
template<class LinearSystem>
class IDRSTABL
IDR(s)STABL iterative solver.
template<class Scalar>
class IDRSTABL<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
IDRstab(l) solver for dense systems.
template<class Scalar>
class IDRSTABL<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
IDRstab(l) solver for sparse systems.
class KSP
PETSc KSP (Krylov subspace) linear solver wrapper.
template<class LinearSystem>
class LDLT
Robust LDLT Cholesky decomposition for dense matrices.
template<class Scalar>
class LDLT<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
Robust LDLT Cholesky factorization with pivoting for dense matrices.
template<class LinearSystem>
class LeastSquaresCG
Least-squares conjugate gradient solver.
template<class Scalar>
class LeastSquaresCG<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
Least-squares conjugate gradient solver for dense systems.
template<class Scalar>
class LeastSquaresCG<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
Least-squares conjugate gradient solver for sparse systems.
template<class LinearSystem>
class LinearSolverBase
Abstract base class for linear system solvers.
template<class Scalar>
class MINRES<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
MINRES solver for symmetric dense systems.
template<class Scalar>
class MINRES<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
MINRES solver for symmetric sparse systems.
template<class LinearSolver>
class NewtonSolver
Newton solver for state-dependent tangential problems.
template<class LinearSolver>
class NewtonSolverBase
Abstract base class for Newton-type nonlinear solvers.
template<class LinearSystem>
class PartialPivLU
Dense LU factorization with partial pivoting for general matrices.
template<class Scalar>
class PartialPivLU<Math::LinearSystem<Math::Matrix<Scalar>, Math::Vector<Scalar>>>
Dense LU factorization solver with partial pivoting for general matrices.
template<class LinearSystem>
class SimplicialLDLT
Direct sparse LDLT Cholesky factorization solver.
template<class Scalar>
class SimplicialLDLT<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
Simplicial LDLT Cholesky factorization without square root.
template<class LinearSystem>
class SimplicialLLT
Direct sparse LLT Cholesky factorization solver.
template<class Scalar>
class SimplicialLLT<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
Simplicial LLT Cholesky factorization for sparse SPD matrices.
class SNES
PETSc SNES (Scalable Nonlinear Equations Solvers) wrapper.
template<class LinearSystem>
class SparseLU
Sparse supernodal LU factorization for general matrices.
template<class Scalar>
class SparseLU<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
Sparse supernodal LU factorization solver for general sparse matrices.
template<class LinearSystem>
class SparseQR
Sparse QR factorization with column pivoting.
template<class Scalar>
class SparseQR<Math::LinearSystem<Math::SparseMatrix<Scalar>, Math::Vector<Scalar>>>
Sparse QR factorization with numerical column pivoting.