When changing a library routine, try to avoid changing an interface. This could lead to unforeseen problems in a program.

The following libraries are employed by the MCTDH program:

lapack: Contains all the LAPACK routines that MCTDH uses. This is the reference implementation from NETLIB.

blas: Contains all the BLAS routines that MCTDH uses. Again, this is the reference implementation from NETLIB.

la: Contains all other linear algebra calculations, such as matrix multiplication or determination of eigenvalues.

ode: Contains all integrators, e.g. Bulirsch-Stoer and Lanczos.

num: Contains all numerical operations (e.g. FFT, special functions, ...).

sys: Contains routines concerning the machine and the operating system and the input of data.

compile lib

will compile all the library archives. A single archive can also be compiled, e.g.

compile libnum

will compile the NUM library.

One useful feature of the compilation procedure is that it is possible to generate debug code for a program with optimised libraries, e.g.

compile -d mctdh

compiles a debug version (mctdh<ver>d) of the MCTDH program with optimised libraries. This is useful as the library routines need a large percentage of the computer time, and this speeds up the process of debugging. To compile a program with debug information also for the library, use the -D option.

For more details on the $MCTDH_DIR/bin/compile script, see Compiling the programs.

This is not the complete LAPACK library, but only those selected routines from NETLIB's reference implementation which are needed by MCTDH.

Like above, this is not the complete BLAS library, but only those selected routines from NETLIB's reference implementation which are needed by MCTDH.

The library `la`

contains routines for linear
algebra calculations. The code is contained in various files:

- eigchess.f: Routine to obtain eigenvalues and -vectors of a complex upper Hessenberg matrix.
- eigcs.f: Routine to obtain eigenvalues and -vectors of a complex symmetric matrix.
- lanczos.f: Lanczos diagonalisation routine.
- svd.f: Routines for performing a singular value decomposition.
- svdz.f: Routines for performing a singular value decomposition of complex symmetric matrices.
- lineq.f: Routines for solving linear equations, inverting matrices, etc.
- mmlib.f: Matrix*Matrix routines.
- mtlib.f: Matrix*Tensor routines.
- op1lib.f: Routines operating on one object.
- op2lib.f: Routines operating on two objects of the same type.
- rmlib.f: Routines to form "density" matrices.
- schmidtortho.f: Routines for orthogonalising orbitals.
- ttlib.f: Routines involving multiplication of two tensors of third order.
- xvlib.f: Routines involving scalars and vectors.
- d1tens.f: Additional subroutines for matrices and tensors.
- d2tens.f: Additional subroutines for matrices and tensors.
- lalib.f: Other routines.

`ode`

contains various
integrators for ordinary differential equations. The following
files and routines exist:
- abmlib.f: Adams-Bashforth-Moulton predictor-corrector integrator.
- bslib.f: Bulirsch-Stoer extrapolation method.
- sodlib.f: Second order differencing scheme.
- sillib.f: Short iterative Lanczos algorithm.
- csillib.f: Lanczos-Arnoldi (complex Lanczos) integrator.
- odedp5.f: Runge-Kutta integrator of order 5.
- oded85.f: Runge-Kutta integrator of order 8.
- odeuti.f: Various utility routines for the Runge-Kutta integrators.

`num`

contains routines for
various numerical operations. The following files and routines
exist:
- cmdvr.f: Calculates Hamiltonian matrix in Colbert/Miller DVR basis. (see J. Chem. Phys. 96, 1982 (1992) for more details) Kinetic energy elements are that of Eqs. A6 of Appendix A.
- fft.f: Calculates the FFT-transform of a complex tensor of third order in the middle index. No normalisation is done.
- func.f: Calculates various functions.
- legendre.f: Legendre and associated Legendre functions, spherical harmonics.
- numeric.f: Various numerical routines.
- splinenm.f: Routines to compute cubic-splines for an array of data and to evaluate the spline.

`sys`

contains routines
concerning the machine and the operating system. The following
files and routines exist:
- einglib.f: Contains routines to control the input of data.
- keyunits.f: Contains routines for converting units.
- myflush.f: Contains a self-written routine for enforcing a file buffer to be written to disk.
- myflush_lib.f:
Calls the
`flush`routine provided by some compilers. - myflush_no.f: Contains a routine that ignores the flush-command.
- showtime.c: Contains routines to determine the system time, host name, etc.
- strutil.f: Contains routines for processing character strings.
- syslib.f: Contains various routines, e. g. for determining the machine precision.
- dvrweights.f: Routine for computing the DVR weights.
- platform.F: Contains various wrappers for platform-dependent routines.
- fileutil.f: Contains utility routines for common file operations.