PETSc
PETSc (Portable, Extensible Toolkit for Scientific Computation), maintained by Argonne National Laboratory, provides the core algorithms and parallel infrastructure for large-scale linear/nonlinear systems. Nearly all mainstream open-source CFD codes (OpenFOAM, FEniCS, deal.II) rely on PETSc underneath - the "engine" of high-end scientific computing.
Core components
- Linear solvers: Krylov methods (CG, GMRES, BiCGStab) + preconditioners (Jacobi, ILU, AMG)
- Nonlinear solvers: Newton-Krylov (SNES), quasi-Newton
- Time integration: explicit/implicit ODE/DAE solvers (TS)
- Parallel data: DMDA (structured), DMPlex (unstructured)
Use cases: Large multiphysics coupling (fluid-thermal-structural); high-end CFD solver development; replacing commercial solvers (ANSYS, COMSOL) for in-house research; efficient ML-physics hybrid methods.
Note: BSD-2-Clause, commercial-friendly. Steep learning curve; start with the official Tutorial. C/Fortran core with petsc4py bindings; pairs with SUNDIALS and PyAMG.
Tags: SolverLinear AlgebraSparse MatrixHPCParallel