FEM and Boundary Conditions II

A week ago we discussed two different types of boundary conditions - Dirichlet and Neumann boundary conditions - and presented different ways how to implement the first ones. Today's post will show how to implement the latter one. Just to remember:

Neumann boundary conditions, where the value of the normal derivative is known


For most applications in quantitative finance the h can be chosen equal to zero.

The inclusion of boundary condition of the Neumann type is accomplished by using the surface integral (see the beginning of the FEM blog post series).


This integral is added to the element load vector f .
It can be evaluated once the element shape functions are known. Here, we demonstrate the calculation for the linear triangular. Depending on the side of the triangle where the Neumann boundary condition is specified we obtain the results


for sides ij, jk, ik respectively.

The post excerpts a chapter of the book A Workout in Computational Finance.