1D Finite Element Code Using Lagrange Basis Polynomials

**FEM1D_LAGRANGE**
is a MATLAB library which
sets up the matrices and vectors associated with the finite element
method (FEM) solution of a boundary value problem (BVP) -u''+u=f(x),
using Lagrange basis polynomials.

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

**FEM1D_LAGRANGE** is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.

FEM1D, a MATLAB program which applies the finite element method (FEM) to a 1D linear two point boundary value problem (BVP).

FEM1D_SPECTRAL_NUMERIC, a MATLAB program which applies the spectral finite element method (FEM) to solve the two point boundary value problem (BVP_ u'' = - pi^2 sin(x) over [-1,+1] with zero boundary conditions, using as basis elements the functions x^n*(x-1)*(x+1), and carrying out the integration numerically, using MATLAB's quad() function, by Miro Stoyanov.

LAGRANGE_INTERP_1D, a MATLAB library which defines and evaluates the Lagrange polynomial p(x) which interpolates a set of data, so that p(x(i)) = y(i).

- fem1d_lagrange_stiffness.m computes the stiffness matrix, mass matrix, and right hand side for a finite element problem that uses Lagrange basis polynomials.
- lagrange_derivative.m, evaluates the derivative of Lagrange basis polynomials.
- lagrange_value.m, evaluates the Lagrange basis polynomials.
- legendre_set.m, sets the points and weights of a Legendre quadrature rule.
- r8vec_print.m, prints an R8VEC.
- timestamp.m, prints the current YMDHMS date as a timestamp;

- fem1d_lagrange_test.m, runs all the tests;
- fem1d_lagrange_test_output.txt, the output file;
- fem1d_lagrange_stiffness_test.m
- lagrange_derivative_test.m
- lagrange_value_test.m
- legendre_set_test.m

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