FEM_SAMPLE is a MATLAB program, using double precision arithmetic, which evaluates a finite element function that is 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.
FEKETE is a MATLAB library of routines for defining a Fekete rule for quadrature or interpolation over a triangle.
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 reads a quadratic triangle mesh and displays any associated basis function.
FEM_IO is a set of MATLAB routines for reading or writing the node, element and data files that define a finite element model.
FEM_SAMPLE is also available in a C++ version and a FORTRAN90 version.
FEM_TO_TEC is a MATLAB program that can convert an FEM model into a TEC graphics file.
FEM1D, is a MATLAB program which applies the finite element method, with piecewise linear basis functions, to a linear two point boundary value problem;
FEM1D_ADAPTIVE is a MATLAB 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 MATLAB program that applies the finite element method to a nonlinear two point boundary value problem in a 1D region.
FEM1D_PMETHOD is a MATLAB 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_HEAT is a MATLAB program that solves the time dependent heat equation in the unit square.
FEM2D_POISSON is an executable MATLAB program for solving Poisson's equation on a square, using the finite element method.
FEMPACK is a MATLAB library of routines for finite element calculations.
FREE_FEM_HEAT is a MATLAB 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 MATLAB program for solving the Navier Stokes equations on a triangulated region, using the finite element method.
FREE_FEM_POISSON is a MATLAB program for solving Poisson's equation on a triangulated region, using the finite element method.
FREE_FEM_STOKES is a MATLAB 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 interactive 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 a file format which is used for the input and output files used by the program.
TABLE_IO is a MATLAB 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.
To run the sample problem, a set of data files defining a finite element function are needed:
You can go up one level to the MATLAB source codes.