Some of the source files are additional material, most represent complete programs described in the book. All examples are presented here as is.
Note: (30 september 2012) The set of examples should be complete. Please report missing files or mistakes. The examples are also contained in this zip-file.
histogram_f77.f | Histogram example, FORTRAN 77 style |
histogram_f90.f90 | Histogram example, Fortran 90 style |
histogram.data | Input data for the histogram examples |
performance_arrays.f90 | Measure the performance of array-valued functions versus do-loops |
nneighbours.f90 | Illustrate a number-theoretical problem concerning irrational numbers |
qsort_reals.f90 | Compact implementation of the QuickSort algorithm |
automdiff.f90 | Module for automatic differentiation |
derivative_near_singular.f90 | Compute the derivative near a singular point |
newton_automatic.f90 | TODO: Use automatic differentiation for root finding |
integer_set.f90 | Manipulate sets of integers defined by a mathematical equation |
integer_set_alloc.f90 | (TODO) Manipulate sets of integers defined by a mathematical equation (version with allocatables) |
integer_programming.f90 | Solve an integer programming problem (optimisation) |
integer_programming_alloc.f90 | (TODO) Solve an integer programming problem (version with allocatables) |
enum_set.f90 | Enumerate the member of a set of integers (Pell's equation) |
pde_types.f90 | (Extra) Solve a partial differential equation using user-defined operations |
pde_types_implicit.f90 | (Extra) Solve an (ordinary) differential equation using a hidden implicit method |
readline.f90 | Read a file line by line |
timealloc.f90 | Time the cost of allocation and deallocation |
timearrays.f90 | Measure the performance of various types of arrays |
timearrays_exp.f90 | Measure the performance of various types of arrays (expanded version) |
integrate_plain.f90 | Straightforward implementation of an integration routine |
integrate_openmp.f90 | Integration via OpenMP |
integrate_reverse.f90 | Integration via reverse communication |
integrate_class_v1.f90 | Integration via Fortran 2003 classes, version 1 |
integrate_class_v2.f90 | Integration via Fortran 2003 classes, version 2 |
integrate_class_v3.f90 | Integration via Fortran 2003 classes, version 3 |
integrate_class_v4.f90 | Integration via Fortran 2003 classes, version 4 |
integrate_class_v5.f90 | (TODO) Integration via Fortran 2003 classes, abstract interface |
test_kinds.f90 | Show how to use interfaces and modules for generic kinds |
csvtable.f90 | Using SQLite from Fortran |
somedata.csv | Sample CSV data file for use with cvstable.f90 |
test_iso_c.f90 | Illustrate the use of the iso_c_binding module |
sqlite3_iso_c.c | Dummy C routine for illustration of iso_c_binding module |
mkisoc.bat | Batch file (Windows) to create iso_c_binding example |
plotgraph.f90 | Plot a simple graph, using PLplot |
plotgui.tcl | Plot a simple graph, GUI in Tcl/Tk (uses runprogram.f90) |
plotgui_ext.tcl | Plot a simple graph, GUI in Tcl/Tk (uses extension via Ftcl) |
runprogram.f90 | Plot a simple graph, provide the graph data |
compfunction.f90 | Compute the function (extension via Ftcl) |
XGraph.zip | Example using Xeffort for GUI (from www.xeffort.com) |
cgi_example.f90 | Simple CGI example, providing a table |
cgi_start.html | Simple CGI example, HTML file to start the example |
cgi_example.cfg | Configuration file, belonging to the simple CGI example |
mkcgi.bat | Batch file (Windows) to make CGI example |
cgiserver.tcl | Basic CGI server |
runserver.bat | Windows batch file to run the basic CGI server |
bibliography.xml | Description of bibliography XML files |
example_bib.xml | Short example of a bibliography XML file |
example_bib.xml | Short example of a bibliography XML file |
select_bib.f90 | Select entries from a bibliography XML file (SAX style) |
print_bib.f90 | Print the entries in a bibliography XML file (DOM style) |
mkbib.sh | Shell script to build the XML examples |
mkbib.bat | Batch file (Windows) to build the XML examples |
test_tridiag.f90 | Example of the use of the ftnunit unit testing framework |
interp.f90 | Straightforward implementation of interpolation |
basic_stat.f90 | Straightforward implementation of basic statistics |
newton.f90 | Straightforward implementation of Newton's method for finding roots |
robust_interp.f90 | Robust implementation of interpolation |
robust_stat.f90 | Robust implementation of basic statistics |
robust_newton.f90 | Robust implementation of Newton's method for finding roots |
points2d3d.f90 | Module for points in two and three dimensions |
random_walk.f90 | Random walk in two and three dimensions |
particles.f90 | Simplified modelling of oil particles in a (uniform) flow field |
abstract_point.f90 | Using an abstract type and concrete types derived from it |
abstract_sort.f90 | Generic sortable and printable types |
classes_geom.f90 | Simple hierarchy of geometrical types |
prototypes_geom.f90 | Use a prototype approach to exploit specific properties of geometrical types |
fishes.f90 | Age-dependent behaviour of fishes |
changing_points2d3d.f90 | Change the behaviour of the point2d type |
mkplugin.bat | Batch file (Windows) to create the plugin example |
prng_class.f90 | Base type for random-number generators (plugin example) |
prng_exponential_plugin.f90 | PRNG for exponentially distributed numbers (plugin example) |
prng_uniform_plugin.f90 | PRNG for uniformly distributed numbers (plugin example) |
prng_factory_plugin.f90 | Implementation of the PRNG factory (plugin example) |
prng_use_plugin.f90 | Main program using the PRNG factory (plugin example) |
dynlib.f90 | Generic code for dealing with dynamic libraries (plugin example) |
win_gnu_dynlib.f90 | Gfortran-specific code for dynamic libraries (plugin example) |
win_ifort_dynlib.f90 | Intel Fortran-specific code for dynamic libraries (plugin example) |
linux_dynlib.f90 | Linux-specific code for dynamic libraries (plugin example) |
primes_plain.f90 | Straightforward implementation of finding 1000 primes |
primes_chunks.f90 | Finding 1000 primes by searching in "chunks" of integers |
primes_openmp.f90 | Finding 1000 primes with OpenMP |
primes_mpi.f90 | Finding 1000 primes with MPI |
primes_coarrays.f90 | Finding 1000 primes with coarrays |
primes_coarrays_nolock.f90 | Finding 1000 primes with coarrays (no critical section or locks) |
dd_openmp.f90 | Domain-decomposition with OpenMP |
dd_mpi.f90 | Domain-decomposition with MPI |
dd_coarrays.f90 | Domain-decomposition with coarrays |
autotools.zip | Zip-file with autotools example (all files included) |
autotools.tgz | Compressed tar-file with autotools example (all files included) |
cmake.zip | Zip-file with CMake example (all files included) |
cmake.tgz | Compressed tar-file with CMake example (all files included) |
test_valgrind.f90 | Small demonstration of valgrind's capabilities |
sort_doxygen.f90 | Source code documentation using Doxygen |
sort_robodoc.f90 | Source code documentation using ROBODoc |
doxyfile_src | Configuration file for Doxygen (rename to "doxygen_src") |
coverage_example.f90 | Example showing test coverage with gfortran and gcov |
coverage_example_2.f90 | Variant on the first example |
coverage_example_3.f90 | Static analysis with Intel Fortran |
explicit_vs_assumed.f90 | Interface problem with explicit-shape |
check_stack.f90 | Problems with ever increasing automatic arrays |