fd1d_bvp, a FORTRAN90 code which applies the finite difference method to solve a two point boundary value problem in one spatial dimension.
The boundary value problem (BVP) that is to be solved has the form:
- d/dx ( a(x) * du/dx ) + c(x) * u(x) = f(x)in the interval X(1) < x < X(N). The functions a(x), c(x), and f(x) are given functions, and a formula for a'(x) is also available.
Boundary conditions are applied at the endpoints, and in this case, these are assumed to have the form:
u(X(1)) = 0.0; u(X(N)) = 0.0.
To compute a finite difference approximation, a set of n nodes is defined over the interval, and, at each interior node, a discretized version of the BVP is written, with u''(x) and u'(x) approximated by central differences.
call fd1d_bvp ( n, a, aprime, c, f, x, u )where
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
fd1d_bvp is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.
FD1D_BURGERS_LAX, a FORTRAN90 code which applies the finite difference method and the Lax-Wendroff method to solve the non-viscous time-dependent Burgers equation in one spatial dimension.
FD1D_BURGERS_LEAP, a FORTRAN90 code which applies the finite difference method and the leapfrog approach to solve the non-viscous time-dependent Burgers equation in one spatial dimension.
FD1D_HEAT_EXPLICIT, a FORTRAN90 code which uses the finite difference method and explicit time stepping to solve the time dependent heat equation in 1D.
FD1D_HEAT_IMPLICIT, a FORTRAN90 code which uses the finite difference method and implicit time stepping to solve the time dependent heat equation in 1D.
FD1D_HEAT_STEADY, a FORTRAN90 code which uses the finite difference method to solve the steady (time independent) heat equation in 1D.
FD1D_PREDATOR_PREY, a FORTRAN90 code which implements a finite difference algorithm for predator-prey system with spatial variation in 1D.
FD1D_WAVE, a FORTRAN90 code which applies the finite difference method to solve the time-dependent wave equation utt = c * uxx in one spatial dimension.
FEM1D, a FORTRAN90 code which applies the finite element method to a linear two point boundary value problem in a 1D region.
FEM1D_BVP_LINEAR, a FORTRAN90 code which applies the finite element method, with piecewise linear elements, to a two point boundary value problem in one spatial dimension.