interpolant
Define a Function with a Mesh and Values


interpolant, a FENICS code which shows how to define a function in FENICS by supplying a mesh and the function values at the nodes of that mesh, so that FENICS works with the finite element interpolant of that data.

Note that I have installed FENICS using Docker, and so to run this script I issue the commands:

  1. cd $HOME/fenicsproject/interpolant
  2. fenicsproject run
  3. python3 interpolant.py
  4. exit

Licensing:

The GNU LGPL license.

Reference:

  1. Hans Petter Langtangen, Anders Logg,
    Solving PDEs in Python - The FEniCS Tutorial Volume 1.

Source Code:


Last revised on 20 October 2018.