program main
!*****************************************************************************80
!
!! MAIN is the main program for FEM1D.
!
! Discussion:
!
! FEM1D solves a one dimensional ODE using the finite element method.
!
! The differential equation solved is
!
! - d/dX (P dU/dX) + Q U = F
!
! The finite-element method uses piecewise linear basis functions.
!
! Here U is an unknown scalar function of X defined on the
! interval [XL,XR], and P, Q and F are given functions of X.
!
! The values of U or U' at XL and XR are also specified.
!
!
! The interval [XL,XR] is "meshed" with NSUB+1 points,
!
! XN(0) = XL, XN(1)=XL+H, XN(2)=XL+2*H, ..., XN(NSUB)=XR.
!
! This creates NSUB subintervals, with interval number 1
! having endpoints XN(0) and XN(1), and so on up to interval
! NSUB, which has endpoints XN(NSUB-1) and XN(NSUB).
!
! Licensing:
!
! This code is distributed under the GNU LGPL license.
!
! Modified:
!
! 01 November 2006
!
! Author:
!
! John Burkardt
!
! Parameters:
!
! real ( kind = 8 ) ADIAG(NU), the "diagonal" coefficients.
! That is, ADIAG(I) is the coefficient of the I-th unknown in
! the I-th equation.
!
! real ( kind = 8 ) ALEFT(NU), the "left hand" coefficients. That is,
! ALEFT(I) is the coefficient of the (I-1)-th unknown in the I-th equation.
! There is no value in ALEFT(1), since the first equation
! does not refer to a "0-th" unknown.
!
! real ( kind = 8 ) ARITE(NU).
! ARITE(I) is the "right hand" coefficient of the I-th
! equation in the linear system. ARITE(I) is the coefficient
! of the (I+1)-th unknown in the I-th equation. There is
! no value in ARITE(NU) because the NU-th equation does not
! refer to an "NU+1"-th unknown.
!