Solving large systems of equations is not conceptually distinct from optimisation. But, er, there are differences in emphasis between

finding an optimal vector solution to an equation whose dimension is presumably smaller than your data, and

finite element methods and PDE wrangling, where the solution might be much larger than your data.

Here I concentrate on the latter.

There are many iterative methods for this kind of system.

Keywords: Geometric multigrid, algebraic multigrid. Stochastic methodsâ€¦

## Software

## Firedrake

Firedrake seems popular for Python projects that do not need GPU?

Firedrake is an automated system for the solution of partial differential equations using the finite element method (FEM). Firedrake uses sophisticated code generation to provide mathematicians, scientists, and engineers with a very high productivity way to create sophisticated high performance simulations.

- Expressive specification of any PDE using the Unified Form Language from the FEniCS Project.
- Sophisticated, programmable solvers through seamless coupling with PETSc.â€¦
- Sophisticated automatic optimisation, including sum factorisation for high order elements, and vectorisation.

### fipy

fipy is original school:

FiPy is an object oriented, partial differential equation (PDE) solver, written in Python, based on a standard finite volume (FV) approach. â€¦ The FiPy framework includes terms for transient diffusion, convection and standard sources, enabling the solution of arbitrary combinations of coupled elliptic, hyperbolic and parabolic PDEs. Currently implemented models include phase field treatments of polycrystalline, dendritic, and electrochemical phase transformations as well as a level set treatment of the electrodeposition process.

## PyAMG

pyamg is an algebraic multigrid solver, which is to say, multi-resolution method:

AMG is a multilevel technique for solving large-scale linear systems with optimal or near-optimal efficiency. Unlike geometric multigrid, AMG requires little or no geometric information about the underlying problem and develops a sequence of coarser grids directly from the input matrix. This feature is especially important for problems discretised on unstructured meshes and irregular grids:

```
A = poisson((500,500), format='csr') # 2D Poisson problem on 500x500 grid
ml = ruge_stuben_solver(A) # construct the multigrid hierarchy
print ml # print hierarchy information
b = rand(A.shape[0]) # pick a random right hand side
x = ml.solve(b, tol=1e-10) # solve Ax=b to a tolerance of 1e-8
print("residual norm is", norm(b - A*x)) # compute norm of residual vector
```

See Yousef Saadâ€™s textbooks on algebraic multigrid methods. (free online)