FEM_50 is a MATLAB program which applies the finite element method to solving Laplace's equation in an arbitrary region, using about 50 lines of MATLAB code.
FEM_50 is partly a demonstration, to show how little it takes to implement the finite element method (at least using every possible MATLAB shortcut.) The user supplies datafiles that specify the geometry of the region and its arrangement into triangular and quadrilateral elements, and the location and type of the boundary conditions, which can be any mixture of Neumann and Dirichlet.
The unknown state variable U(x,y) is assumed to satisfy Laplace's equation:
-Uxx(x,y) - Uyy(x,y) = F(x,y) in Omegawith Dirichlet boundary conditions
U(x,y) = U_D(x,y) on GammaDand Neumann boundary conditions on the outward normal derivative:
Un(x,y) = G(x,y) on GammaNIf Gamma designates the boundary of the region Omega, then we presume that
Gamma = GammaD + GammaNbut the user is free to determine which boundary conditions to apply. Note, however, that the problem will generally be singular unless at least one Dirichlet boundary condition is specified.
The code uses piecewise linear basis functions for triangular elements, and piecewise isoparametric bilinear basis functions for quadrilateral elements.
The user is required to supply a number of data files and MATLAB functions that specify the location of nodes, the grouping of nodes into elements, the location and value of boundary conditions, and the right hand side function in Laplace's equation. Note that the fact that the geometry is completely up to the user means that just about any two dimensional region can be handled, with arbitrary shape, including holes and islands.
Jochen Alberty,
Carsten Carstensen,
Stefan Funken.
FEM_50_HEAT is a MATLAB program which 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 MATLAB library which reads or writes the node, element and data files that define a finite element model.
FEM_TO_TEC is a MATLAB program which converts 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 which 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 which applies the finite element method to a nonlinear two point boundary value problem in a 1D region.
FEM1D_PMETHOD is a MATLAB program which 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 which solves the time dependent heat equation in the unit square.
FEM2D_POISSON is a MATLAB program which solves Poisson's equation on a square, using the finite element method.
FEM2D_SAMPLE is a MATLAB library which evaluates a finite element function defined on an order 3 or order 6 triangulation.
FEMPACK is a MATLAB library which can be useful for finite element calculations.
FFP_SPARSE is a MATLAB program which solves the Poisson equation in an arbitrary triangulated 2D region, using MATLAB's sparse matrix storage format and solver.
FREE_FEM_HEAT is a MATLAB program which solves the heat equation on an arbitrary triangulated region, using the finite element method.
FREE_FEM_NAVIER_STOKES is a MATLAB program which solves the steady incompressible Navier Stokes equations on an arbitrary triangulated region, using the finite element method.
FREE_FEM_POISSON is a MATLAB program which solves Poisson's equation on a triangulated region, using the finite element method.
FREE_FEM_STOKES is a MATLAB program which solves the Stokes equations on a triangulated region, using the finite element method.
HOT_PIPE is a MATLAB program which is sample problem for FEM_50_HEAT.
HOT_POINT is a MATLAB program which is a sample problem for FEM_50_HEAT.
TRIANGULATION_ORDER3 is a directory which contains a description of the format for the files describing an order 3 triangulation.
You can go up one level to the MATLAB source codes.