C/C++ Programs for Numerical Computations

update 14 February, 2005
Files will be downloaded from the mirror server at Ehime University (comp.cs.ehime-u.ac.jp).

Linear Equation

Gauss elimination method

le_gauss_elim1.c without pivoting, le_gauss_elim2.c with partial pivoting

The method by the LU decomposition

le_ludecomp.tgz, le_ludecomp.lzh (C program),
le_ludecomp_cpp.tgz, le_ludecomp_cpp.lzh (C++ program) 9 June 2004
with partial pivoting and estimating the condition number

(For educational use)
le_ludecomp1.tgz, le_ludecomp1.lzh: without pivoting
le_ludecomp2.tgz, le_ludecomp2.lzh: with partial pivoting
le_ludecomp3.tgz, le_ludecomp3.lzh: with partial pivoting and estimating the condition number
cFor the study of the method, you can print the lower triangular matrices L and the upper triangular matrices in the LU decomposition of the coefficient matrix A (A=LU) and can check the relation A = LU.

Krylov subspace method

Numerical Integrations

Legendre-Gauss quadrature formula

quad_LeGauss.tgz, quad_LeGauss.lzh (C program)
LeGquadrature.tgz, LeGquadrature.lzh (C++ program) (8 June 2004)

DE quadrature formula

DEquadrature1.tgz, DEquadrature1.lzh: integrals over finite intervals (C++ program) (7 June, 2004)

For C or Fortran programs for the DE rule, see Dr. T. Oourafs web site.

Eivenvalues for Symmetric Matrices

Jacobi method

eig_jacobi1.tgz, eig_jacobi1.lzh (14 April 2004)
egv_jacobi.tgz, egv_jacobi.lzh (C++ program) (11 January 2005)
c For the study of the Jacobi method, you can print matrices during the computation.

QR method (by Francis)

egv_francis.tgz, egv_francis.lzh (C++ program) 17 January 2005 revised on 7 February 2005

Ordinary Differential Equations

Runge-Kutta method

ode_rk1.tgz, ode_rk1.lzh: ordinary differential equations for scalar-valued functions (7 April 2004)
ode_rk2.tgz, ode_rk2.lzh: ordinary differential equations for vector-valued functions (8 April 2004)

Special Functions

Orthogonal Polynomials

  1. pLegendre.tgz, pLegendre.lzh: associated Legendre polynomials (14 December 2004)
  2. pHermite.cpp: Hermite polynomial (C++ program) (14 February 2005)

Numerical Conformal Mappings

The method based on the charge simulation method

ncmi.tgz, ncmi.lzh: numerical conformal mapping of an interior simply-connected domain onto the unit disk (19 April 2004)
ncme.tgz, ncme.lzh: numerical conformal mapping of an exterior simply-connected domain onto the exterior of the unit disk (19 April 2004)
ncmps.tgz, ncmps.lzh: numerical conformal mapping of an exterior multiply-connected domain onto the complex plane including parallel rectilinear slits (21 April 2004)
c For the references of this method, see this web page (partially in Japanese) in Prof. Amanofs web site.

Computations of Complex Numbers

cmplx.tgz, cmplx.lzh: arithmetic and elementary functions of complex numbers (16 April 2004)

Graphics (by gnuplot)

Drawing a two-dimensional vector field

draw_vf.tgz, draw_vf.lzh (8 April 2004)

Links

Oourafs Mathematical Software Packages
Software packages in C and Fortran for numerical computations such as numerical integrations, FFT and computing special functions.

HOME