FEM2D_POISSON_LINEAR is a C++ program which solves the 2D Poisson equation using the finite element method with piecewise linear triangular elements.
The computational region is a rectangle, with Dirichlet boundary conditions applied along the boundary. The state variable U(X,Y) is then constrained by:
- ( Uxx + Uyy ) = F(x,y) in the region
U(x,y) = G(x,y) on the region boundary
The computational region is first covered with an NX by NY rectangular array of points, creating (NX-1)*(NY-1) subrectangles. Each subrectangle is divided into two triangles, creating a total of 2*(NX-1)*(NY-1) geometric "elements".
We now assume that the unknown function U(x,y) can be represented as a linear combination of the basis functions associated with each node. For each node I, we determine a basis function PHI(I)(x,y), and evaluate the following finite element integral:
Integral ( Ux(x,y) * PHIx(I)(x,y) + Uy(x,y) * PHIy(I)(x,y) ) =
Integral ( F(x,y) * PHI(I)(x,y)
The set of all such equations yields a linear system for the
coefficients of the representation of U.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
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 C++ library which reads or writes the node, element and data files that define a finite element model.
FEM_TO_TEC is a FORTRAN90 program which can convert an FEM model into a TEC graphics file.
FEM1D, is a C++ program which applies the finite element method, with piecewise linear basis functions, to a linear two point boundary value problem;
FEM1D_ADAPTIVE is a C++ 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 C++ program which applies the finite element method to a nonlinear two point boundary value problem in a 1D region.
FEM1D_PMETHOD is a C++ 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_POISSON is a C++ program which solves the 2D Poisson equation on a rectangle, using the finite element method, and piecewise quadratic triangular elements.
FEM2D_POISSON_LINEAR is available in a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.
FEM2D_PROJECT is a C++ program which projects a function F(X,Y) into a given finite element space of piecewise linear triangular elements.
FEM2D_SAMPLE is a C++ library which evaluates a finite element function defined on an order 3 or order 6 triangulation.
FEMPACK is a C++ library which contains utilities for finite element calculations.
FREE_FEM_HEAT is a C++ program which uses the finite element method and the backward Euler method to solve the 2D time-dependent heat equation on an arbitrary triangulated region.
FREE_FEM_NAVIER_STOKES is a C++ program which solves the 2D incompressible Navier Stokes equations in an arbitrary triangulated region.
FREE_FEM_POISSON is a C++ program which solves Poisson's equation on a triangulated region, using the finite element method.
FREE_FEM_STOKES is a C++ program which solves the 2D incompressible Stokes equations in an arbitrary triangulated region.
HOT_PIPE is a MATLAB program which uses FEM_50_HEAT to solve the heat equation for a pipe model.
HOT_POINT is a MATLAB program which uses FEM_50_HEAT to solve the heat equation for a 2D region with a hot point.
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_ORDER3_CONTOUR is a MATLAB program which makes contour plot of data defined on an order 3 triangulation.
You can go up one level to the C++ source codes.