FEM_SAMPLE
Evaluate a Finite Element Function


FEM_SAMPLE is a FORTRAN90 program, using double precision arithmetic, which evaluates a finite element function based on a triangulation.

A triangular finite element decomposition of a region decomposes the region into a set of order 3 or order 6 triangles. This geometric decomposition is used to define a family of functions, which are either piecewise linear (if order 3 triangles are used) or piecewise quadratic (if order 6 triangles are used). The function is well defined over the region once values ("finite element coefficients") are chosen for every node.

It is a common mistake for people who use finite element functions to regard the coefficient vector c simply as the value of the finite element function at each node (which it is), but to forget that this vector is the key to a perfectly well defined function f(x,y) that can be evaluated, integrated, or differentiated (away from the triangle boundaries).

One reason that people avoid using the functional formulation is that the process of evaluating the function at a point (x,y) is a little involved.

Because the process is regarded as cumbersome, it is not unusual for people to take shortcuts. MATLAB, for instance, includes a function called griddata, which can take simply the coordinates of the nodes, and the values there, and construct some kind of interpolating function which can be easily evaluated. However, the user has no guarantee that this function is close to the original finite element function, and it is certain that the two functions must differ to some extent. Perhaps this doesn't matter if you are simply making a plot of the data, but if you are trying to do correct error analysis, or if you need to have assured accuracy, you must not take such shortcuts!

The FEM_SAMPLE library provides an automatic procedure for carrying out the correct evaluation of a finite element function.

Related Data and Programs:

FEKETE is a FORTRAN90 library which defines Fekete rules for interpolation or quadrature on a triangle.

FEM is a data directory which contains a description and examples of files that describe a finite element model.

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

FEM_50_HEAT is a MATLAB program which implements a finite element calculation specifically for 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 which reads or writes node, element and data files defining a finite element model.

FEM_SAMPLE is also available in a C++ version and a MATLAB version.

FEM_TO_TEC is a MATLAB program which converts FEM models into TEC graphics files.

FEM1D is a FORTRAN90 program which applies the finite element method to a 1D linear two point boundary value problem.

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

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

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

FEM2D_HEAT is a FORTRAN90 program which solves the 2D time dependent heat equation on the unit square.

FEM2D_POISSON is a FORTRAN90 program which solves the 2D Poisson equation on a square, using the finite element method.

FEMPACK is a FORTRAN90 library which contains utilities for finite element calculations.

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_POISSON is a FORTRAN90 program for solving Poisson's equation on a triangulated region, using the finite element method.

FREE_FEM_STOKES is a FORTRAN90 program for solving the Stokes equations on a triangulated region, using the finite element method.

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.

MESH_BANDWIDTH is an executable FORTRAN90 program which returns the geometric bandwidth associated with a mesh of elements of any order and in a space of arbitrary dimension.

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.

TABLE is the format used for the input and output files used by the program.

TABLE_IO is a FORTRAN90 library of routines for reading and writing TABLE files.

TRIANGULATION_ORDER3 is a data directory which contains a description and examples of how an order 3 (linear) triangulation is defined by a node and element file.

TRIANGULATION_ORDER6 is a data directory which contains a description and examples of how an order 6 (quadratic) triangulation is defined by a node and element file.

TRIANGULATION_ORDER6_CONTOUR is a MATLAB script which can make contours of a scalar quantity defined on the nodes of an order 6 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:

To run the sample problem, a set of data files defining a finite element function are needed:

List of Routines:

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


Last revised on 13 October 2006.