This page contains some Fortran modules and programs that I wrote. They may (but most probably will not) be usefull to you.
Unless otherwise stated, the software is distrubuted under a 3-clause BSD license, which means that it can be used freely by any and all users; redistributed in source and/or binary form; provided that the copyright notices are never removed.
If you have any comments or improvements that you would like to share, you can reach me here: wim IACHAR(46) van IACHAR(46) hoydonck IACHAR(64) gmail IACHAR(46) com.
-
Command line option parser module
This is a command line option parser for Fortran 90/95 programs. It can handle integer, real (single and double precision), complex (single and double precision) and character options. To set options and get their values, the module uses generic interfaces (set_option & get_option_value). It also contains a subroutine to print a help message that displays all valid options (print_help_message).
-
Sudoku solver
A sudoku solver that uses some logical algorithms (and in case no solution is found recursive backtracking). In the first place, it was written to learn the whole-array intrinsics (such as ALL, ANY, WHERE, COUNT, MAXLOC, MAXVAL) that were introduced in Fortran 95. And off course, to see what it would take to solve a sudoku puzzle by computer.
-
Binary netpbm output
The Fortran 2003 standard defines a new access mode (STREAM) for reading and writing files. This makes it possible to output image data in binary format, readable by other applications (such as display, GIMP or Krita). From the four formats defined in netpbm, the monochrome (pbm), grayscale (pgm) and full colour (ppm) are implemented as images and movies.
-
Fractal generator
A module and a test program to generate Mandelbrot and Julia fractals (or parts thereof). As these algorithms lend themselves to parallel execution, I used it as an exercise to learn something about multithreading with OpenMP. The test program uses the netpbm module to write the resulting image to disk.
-
Expression evaluator
A module and test program to evaluate mathematical expressions such as "sin(pi)" or "3+5*4^(2.1)" at execution time with Fortran, using Dijkstra's shunting yard algorithm. This was created as an exercise to use pointers and linked lists.
-
Unit conversions
A module and test program to convert units between the US and SI system of units. In itself this module not extremely useful, but one obvious usage is when parsing quantities in an XML-file.