Demo documentation¶
Under development
Using the Python interface¶
Introductory DOLFIN demos¶
These demos illustrate core DOLFIN/FEniCS usage and are a good way to begin learning FEniCS. We recommend that you go through these examples in the given order.
- Getting started: Solving the Poisson equation.
- Solving nonlinear PDEs: Solving a nonlinear Poisson equation
- Using mixed elements: Solving the Stokes equations
- Using iterative linear solvers: Solving the Stokes equations more efficiently
More advanced DOLFIN demos¶
These examples typically demonstrate how to solve a certain PDE using more advanced techniques. We recommend that you take a look at these demos for tips and tricks on how to use more advanced or lower-level functionality and optimizations.
- Implementing a nonlinear hyperelasticity equation
- Implementing a splitting method for solving the incompressible Navier-Stokes equations
- Using a mixed formulation to solve the time-dependent, nonlinear Cahn-Hilliard equation
- Computing eigenvalues of the Maxwell eigenvalue problem
Demos illustrating specific features¶
How to
- work with built-in meshes
- define and store subdomains
- integrate over subdomains
- set boundary conditions on non-trivial geometries
- solve a basic eigenvalue problem
- set periodic boundary conditions
- de-singularize a pure Neumann problem by specifying the nullspace
- de-singularize a pure Neumann problem by adding a constraint
- use automated goal-oriented error control
- specify a Discontinuous Galerkin formulation
- work with c++ expressions in Python programs
- specify various finite element spaces
- Brezzi-Douglas-Marini elements for mixed Poisson
- the Mini element for Stokes equations
Working list of Python demos¶
- Poisson equation
- A simple eigenvalue solver
- Built-in meshes
- Mixed formulation for Poisson equation
- Biharmonic equation
- Auto adaptive Poisson equation
- Cahn-Hilliard equation
- Stable and unstable finite elements for the Maxwell eigenvalue problem
- Built-in meshes
- Hyperelasticity
- Nonlinear Poisson equation
- Interpolation from a non-matching mesh