fd1d_bvp, a C code which applies the finite difference method (FDM) 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[0] < x < X[N-1]. 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[0]) = 0.0; u(X[N-1]) = 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.
fd1d_bvp ( n, a, aprime, c, f, x, u )where
The information on this web page is distributed under the MIT license.
fd1d_bvp is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
fd1d_burgers_lax, a C 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 C 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_display, a MATLAB program which reads a pair of files defining a 1D finite difference model, and plots the data.
fd1d_heat_explicit, a C code which uses the finite difference method and explicit time stepping to solve the time dependent heat equation in 1D.
fd1d_heat_implicit, a C code which uses the finite difference method and implicit time stepping to solve the time dependent heat equation in 1D.
fd1d_heat_steady, a C code which uses the finite difference method to solve the steady (time independent) heat equation in 1D.
fd1d_wave, a C code which applies the finite difference method to solve the time-dependent wave equation utt = c * uxx in one spatial dimension.
fem1d, a C code which applies the finite element method to a linear two point boundary value problem in a 1D region.