FREE_FEM_POISSON
Finite Element Solution of Poisson's Equation
on a Triangulated Region


FREE_FEM_POISSON is a FORTRAN90 program which applies the finite element method to solve a form of Poisson's equation over an arbitrary triangulated region.

The computational region is unknown by the program. The user specifies it by preparing a file containing the coordinates of the nodes, and a file containing the indices of nodes that make up triangles that form a triangulation of the region.

Normally, the user does not type in this information by hand, but has a program fill in the nodes, and perhaps another program that constructs the triangulation. However, in the simplest case, the user might construct a very crude triangulation by hand, and have TRIANGULATION_REFINE refine it to something more reasonable.

For the following ridiculously small example:

        4----5
        |\   |\
        | \  | \
        |  \ |  \
        |   \|   \
        1----2----3
      
the node file would be:
         0.0 0.0
         1.0 0.0
         2.0 0.0
         0.0 1.0
         1.0 1.0
      
and the triangle file would be
        1 2 4
        5 4 2
        2 3 5
      

The program is set up to handle the linear Poisson equation with a right hand side function, and nonhomogeneous Dirichlet boundary conditions. The state variable U(X,Y) is then constrained by:

        - ( Uxx + Uyy ) + K(x,y) * U(x,y) = F(x,y)  in the region
                 U(x,y) = G(x,y)  on the boundary
      

An improved version of the program would handle a more interesting nonlinear PDE, and include optional Neumann boundary conditions.

To specify the boundary condition function G(x,y), the linear coefficient K(x,y) and the right hand side function F(x,y), the user has to modify a file containing three subroutines,

To run the program, the user compiles the user routines, links them with FREE_FEM_POISSON, and runs the executable.

The program writes out a file containing an Encapsulated PostScript image of the nodes and elements, with numbers. If there are too many nodes, the plot may be too cluttered to read. For lower values, however, it is a valuable map of what is going on in the geometry.

The program is also able to write out a file containing the solution value at every node. This file may be used to create contour plots of the solution.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Programs:

BETIS is an executable FORTRAN77 program which solves Laplace's equation in a 2D region using the boundary element method.

CVT_TRIANGULATION is a FORTRAN90 program which constructs a CVT triangulation for certain regions.

FEM is a data directory which contains a description of the data files that can be used to describe a finite element model.

FEM_50 is a MATLAB finite element program in just 50 lines of code.

FEM_50_HEAT is a modified version of FEM_50 suitable for solving the heat equation.

FEM_BASIS_T3_DISPLAY is a MATLAB program which displays a basis function associated with a linear triangle ("T3") mesh.

FEM_BASIS_T6_DISPLAY is a MATLAB program which displays a basis function associated with a quadratic triangle ("T6") mesh.

FEM_IO is a FORTRAN90 library of routines for reading or writing the node, element and data files that define a finite element model.

FEM_SAMPLE is a FORTRAN90 library of routines for evaluating a finite element function defined on an order 3 or order 6 triangulation.

FEM_TO_TEC is a MATLAB program that can convert an FEM model into a TEC graphics file.

FEM1D, is an executable FORTRAN90 program which applies the finite element method, with piecewise linear basis functions, to a linear two point boundary value problem;

FEM1D_ADAPTIVE is a FORTRAN90 program that applies the finite element method to a linear two point boundary value problem in a 1D region, using adaptive refinement to improve the solution.

FEM1D_NONLINEAR is a FORTRAN90 program that applies the finite element method to a nonlinear two point boundary value problem in a 1D region.

FEM1D_PMETHOD is a FORTRAN90 program that applies the p-method version of the finite element method to a linear two point boundary value problem in a 1D region.

FEM2D_POISSON is an executable FORTRAN90 program for solving Poisson's equation on a square, using the finite element method.

FEMPACK is a FORTRAN90 library of routines for finite element calculations.

FISHPACK is a FORTRAN77 library which solves Poisson, Laplace or Helmholtz equations in a variety of 2D and 3D geometries, using the finite difference method.

FREE_FEM_HEAT is a FORTRAN90 program which uses the finite element method and the backward Euler method to solve the time-dependent heat equation on an arbitrary triangulated region in 2D. (The user supplies some information in some problem-dependent subroutines.)

FREE_FEM_NAVIER_STOKES is a FORTRAN90 program which solves the 2D incompressible Navier Stokes equations in an arbitrary triangulated region.

FREE_FEM_POISSON is available in a C++ version and a FORTRAN90 version and a MATLAB version.

FREE_FEM_STOKES is a FORTRAN90 program that solves the steady Stokes flow equations on a triangulated 2D region.

HOT_PIPE is a sample problem that can be run with FEM_50_HEAT.

HOT_POINT is a sample problem that can be run with FEM_50_HEAT.

PLTMG_SINGLE is a FORTRAN77 library of routines for solving elliptic partial differential equations using the finite element method with piecewise linear triangles and the multigrid approach.

PLOT_POINTS is an executable FORTRAN90 program that can make a plot of the nodes that define the region.

SERBA is an executable FORTRAN77 program which solves problems in planar elasticity using the boundary element method.

TABLE is a format which is used to store the input and output files used by the program.

TABLE_DELAUNAY is an executable FORTRAN90 program which constructs a Delaunay triangulation of a region which is described by a set of points.

TABLE_IO is a FORTRAN90 library of routines which supplies the routines used to read the data files.

TRIANGULATION_ORDER3 contains a description of the format for the two files needed to describe an order 3 triangulation.

TRIANGULATION_ORDER3_CONTOUR is a MATLAB script which can make contour plots of the computed solution.

TRIANGULATION_PLOT is an executable FORTRAN90 program which can display an image of the triangulation used by the program.

TRIANGULATION_REFINE is an executable FORTRAN90 program which can refine a triangulation.

Reference:

  1. Hans Rudolf Schwarz,
    Methode der Finiten Elemente,
    Teubner Studienbuecher, 1980,
    ISBN: 3-519-02349-0.
  2. Gilbert Strang, George Fix,
    An Analysis of the Finite Element Method,
    Cambridge, 1973,
    ISBN: 096140888X,
    LC: TA335.S77.
  3. Olgierd Zienkiewicz,
    The Finite Element Method,
    Sixth Edition,
    Butterworth-Heinemann, 2005,
    ISBN: 0750663200.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 10 July 2008.