demo/documented/nonmatching-interpolation/cpp/P1.ufl.rst
raw| 1 | UFL input for P1 finite element |
| 2 | =============================== |
| 3 | |
| 4 | We define the finite element in UFL in a separate form file |
| 5 | :download:`P1.ufl`. We define the linear finite element:: |
| 6 | |
| 7 | from ufl_legacy import (FiniteElement, triangle) |
| 8 | element = FiniteElement("Lagrange", triangle, 1) |
| 9 | |
| 10 | Before the form file can be used in the C++ program, it must be |
| 11 | compiled using FFC by running (on the command-line): |
| 12 | |
| 13 | .. code-block:: sh |
| 14 | |
| 15 | ffc -l dolfin P1.ufl |