A Little Bit of Theory

We will introduce fundamental Nutils concepts based on the 1D homogeneous Laplace problem,

with boundary conditions and . Even though the solution is trivially found to be , the example serves to introduce many key concepts in the Nutils paradigm, concepts that can then be applied to solve a wide class of physics problems.

Weak Form

A key step to solving a problem using the Finite Element Method is to cast it into weak form.

Let be the unit line with boundaries and , and let be a suitable function space such that any satisfies in . The Laplace problem is solved uniquely by the element for which for all test functions , with the bilinear functional

Discrete Solution

The final step before turning to code is to make the problem discrete.

To restrict ourselves to a finite dimensional subspace we adopt a set of Finite Element basis functions . In this space, the Finite Element solution is established by solving the linear system of equations , with residual vector , and discrete solution

Note that discretization inevitably implies approximation, i.e. in general. In this case, however, we choose to be the space of piecewise linears, which contains the exact solution. We therefore expect our Finite Element solution to be exact.