Codes

You are welcome to look though these codes. Some codes might be downright trivial since they are only examples and demonstrations. Please consider sending me an email if you find something useful.

Fortran Pixmap Image File

Fortran Pixmap Module: PPM.f90 is a simple Fortran module to convert a 2D matrix to an image file. This module supports 3 types of ASCII pixmap files: black and white (pdm), grayscale (pgm), color (ppm).

Richardson Residual Minimization

Fortran Richardson Residual Minimization: RichardsonResMin.f90 is a simple Fortran module for the iterative solution of r=b-Ax.

Fortran Unsigned Integers

Fortran Unsigned Integers: UnsignedIntegers.f90 is a Fortran unsigned integer module.

Fortran Unit Testing and Verification

Fortran Unit Testing and Verification: ForUTV.f90 is a simple Fortran unit testing and verification module. It tracks and reports the number and name of failures. For complex programs, this pure Fortran inline method has some advantages (and disadvantages!) over an external method such as fUnit. Regardless, untested code is by definition broken, so use something.

Morse Code

Morse Code: morse.py is a simple morse code message generator. You supply a string and it outputs the encoded string to the soundcard. Example dit and dah .wav files given in morse.

RK

Runge-Kutta Iterative Implicit Time Integration: Rkiteration.f90 is a simple (non-optimized) module to demonstrate an iterative RK2 solver. The difference between iteration convergence and solution convergence is easy to demonstrate with this simple system.

Clock Timing

Fortran Timing module: Timing.f90 provides timing and predicted completion time.

Sparse Matrix

Sparse matrix Fortran module: Sparse.f90 provides a super-simple and non-optimized sparse matrix storage method.

Spline

Fortran code for equally spaced spline: Spline.f90 The documentation is included in the Fortran file as LaTeX.

Plot Generalized Motions and Forces

Python plotting routine for Euler3d's xn.dat files: plotxn.py

Fortran NaN Detection

Trivial Fortran module to simulate IEEE 754 NaN detection (for Intel Fortran): IEEEsimulate.f90 Please check the latest ifort documenation, any update could render this module obsolete.

Paraview

Paraview plugin rough-draft for a netcdf tetrahedra reader: nc3dplugin. This is just a basic reader with no essentials such as timesteps and domain motion. Paraview and Vtk can intimidate a beginner. You should also take a look at C++ FAQ Lite.

CMake

CMake script for a Fortran and C project: CMakeLists.txt I strongly encourage the use of CMake or an equivalent project makefile.

Heading

Matlab script to reconstruct heading from wrapped heading angles: heading.m

Precisions

Trivial Fortran module for precisions: Precisions.f90

Return