# DUNE PDELab (2.8)

Here we show how to solve a linear system of equations originating from a PDE using PDELab.

First, we set up a GridOperator as in Assembling a linear system from a PDE

Next, we set up our degree of freedom vector

and ensure it matches the Dirichlet boundary conditions at constrained degrees of freedom. In addition to specifying Dirichlet constrained degrees of freedom, it also serves as initial guess at unconstrained ones.

**Definition:**convectiondiffusionparameter.hh:325

**Definition:**interpolate.hh:177

Now we choose the preconditioner and solver we want to use

**Definition:**seqistlsolverbackend.hh:856

and plug it into a StationaryLinearProblemSolver. This takes care of assembling as well as solving the system.

**Definition:**linearproblem.hh:61

Finally, let's print the result to console via

**Definition:**io.hh:86

There is a number of alternative solvers and preconditioners available we could use instead, for example this one:

**Definition:**seqistlsolverbackend.hh:453

Full example code: recipe-linear-system-solution-pdelab.cc