Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
noplot
README.md
ascalarbar.py
awefem.py
calc_surface_area.py
collisions.py
curl2d.py
demo_cahn-hilliard.ipynb
demo_cahn-hilliard.py
demo_submesh.ipynb
demo_submesh.py
elasticbeam.ipynb
elasticbeam.py
elastodynamics.py
ex01_show-mesh.py
ex02_tetralize-mesh.py
ex03_poisson.ipynb
ex03_poisson.py
ex04_mixed-poisson.ipynb
ex04_mixed-poisson.py
ex05_non-matching-meshes.py
ex06_elasticity1.py
ex06_elasticity2.ipynb
ex06_elasticity2.py
ex07_stokes-iterative.ipynb
ex07_stokes-iterative.py
ft02_poisson_membrane.ipynb
ft02_poisson_membrane.py
ft04_heat_gaussian.py
ft07_navier_stokes_channel.py
ft08_navier_stokes_cylinder.py
ft09_reaction_system.py
heatconv.py
magnetostatics.ipynb
magnetostatics.py
markmesh.ipynb
markmesh.py
navier-stokes_lshape.py
pi_estimate.py
run_all.sh
scalemesh.py
stokes.ipynb
stokes.py
stokes2.py
submesh_boundary.ipynb
submesh_boundary.py
turing_2d.py
turing_3d.py
turing_pattern.py
wavy_1d.py

README.md

FEniCS/Dolfin examples

In this directory you will find a bunch of examples of to visualize meshes in conjunction with FEniCS/Dolfin package. It emulates the functionality of the plot() command of matplotlib. To gain more control on the property of the shown objects see the analogous examples in noplot.

To run the examples:

git clone https://github.com/marcomusy/vtkplotter.git
cd vtkplotter/examples/other/dolfin
python example.py  # on mac OSX try 'pythonw' instead

(click thumbnail image to get to the python script)

showmesh
ex01_show-mesh.py
Show dolfin meshes in different ways.
submesh
demo_submesh.py
How to extract matching sub meshes from a common mesh.
scalemesh
scalemesh.py
Scale a 2D mesh asymmetrically in one coordinate and elevate it along the z-axis with the solution.
pi_estimate
pi_estimate.py
Estimate pi by integrating a circle surface. Latex formulas can be added to the renderer directly.
tet_mesh
ex02_tetralize-mesh.py
Tetrahedral meshes generation with package mshr.
poisson
ex03_poisson.py
Solving Poisson equation with Dirichlet conditions.
mixpoisson
ex04_mixed-poisson.py
Solving Poisson equation using a mixed (two-field) formulation.
nonmatching
ex05_non-matching-meshes.py
Interpolate functions between finite element spaces on non-matching meshes.
elasticity1
ex06_elasticity1.py
Solving an elasticity problem. Show mesh displacements with arrows.
elasticity2
ex06_elasticity2.py
Solving an elasticity problem. Use scalars and vectors to colorize mesh displacements with different color maps.
magnetostatics
magnetostatics.py
Compute the magnetic field B in an iron cylinder, the copper wires, and the surrounding vacuum. Isolines of Az are also shown.
stokes
ex07_stokes-iterative.py
Stokes equations with an iterative solver.
elastodyn
elastodynamics.py
Perform time integration of transient elastodynamics using the generalized-alpha method.
stokes
stokes.py
Solve 2D navier-stokes equations with boundary conditions.
ft02
ft02_poisson_membrane.py
Deflection of a membrane by a gaussian load.
ft04
ft04_heat_gaussian.py
Diffusion of a Gaussian hill on a square domain.
cahn
demo_cahn-hilliard.py
Solution of a particular nonlinear time-dependent fourth-order equation, known as the Cahn-Hilliard equation.
navier-stokes_lshape
navier-stokes_lshape.py
Solve the incompressible Navier-Stokes equations on an L-shaped domain using Chorin's splitting method.
turing_pattern
turing_pattern.py
Solve a reaction-diffusion problem on a 2D domain.
elasticbeam
elasticbeam.py
A clamped beam deformed under its own weight. The whole 3D scene is exported and visualized on a web page.
heatconv
heatconv.py
Heat equation in moving media. (by J. Blechta).
wavy
wavy_1d.py
1-dimensional time integration of the wave equation with the Crank-Nicolson method.
wavy
awefem.py
Solve the constant velocity scalar wave equation in arbitrary number of dimensions.
Original script by C. da Costa.
You can’t perform that action at this time.