Programs (Fortran)

Roots of a single variable function f(x)=0
# Bisectional method: single root (program root_bs.f and driver)
# Bisectional method: multiple roots (program root_ml.f and driver)
# Modified Brent procedure (program zeroin.f and driver)

Integration of a single variable function f(x)
# Trapezoid approximation (int_trap.f)
# Simpson rule (int_simp.f)
# Newton-Cotes quadrature (program quanc8.f)
# Driver program for int_trap.f, int_simp.f, quanc8.f

Interpolation (single variable)
# Polinomial interpolation (fintr.f)
# Spline interpolation (spline.f and seval.f)
# Driver program for fintr.f and spline.f/seval.f with input file

Initial value problem in ordinary differential equations
First-order ODE:

# Simple Euler (euler1d.f)
# Mofified Euler: predictor-corrector (euler1m.f)
# Runge-Kutta 4th order (rk4_1d.f)
# Driver program for euler1d.f, euler1m.f and rk4_1d.f

Initial value problem in ordinary differential equations
Single second-order ODE:

# Simple Euler (euler2d.f)
# Mofified Euler: predictor-corrector (euler2m.f)
# Runge-Kutta 4th order (rk4_2d.f)
# Driver for euler2d.f, euler2m.f and rk4_2d.f: application to a simple harmonic oscillator)
# Fehlberg fourth-fifth order Runge-Kutta method (rkf45.f with an example: planetary motion)
# Driver for rkf45.f (application to a simple harmonic oscillator)

Initial value problem in ordinary differential equations
System with two second-order ODEs:

# Mofified Euler: predictor-corrector (euler22m.f)
# Runge-Kutta 4th order(rk4_d22.f)

Random numbers
# Random number generator based on Linear Congruent Method (random1.f)
# Driver program (random2.f) for two random number generator, i.e. rand and urand.f
# Integration using Monte-Carlo method (int_rand.f) (should be compiled with urand.f)
# N-dimension integration: example of 5-dimension integration (int_rand2.f)

Minimum of a single variable function f(x)
# Golden section search with parabolic interpolation (fmin.f)
# Driver program for fmin.f

Eigenvalue problem
# Geigen


Physics programs:

Projectile motion with air resustance (proj02a.f). The program can run calculations in one of the following methods: modified Euler, Runge-Kutta 4th order, and Fehlberg fourth-fifth order Runge-Kutta method. To run the code following programs should be included: euler22m.f, rk4_d22.f, rkf45.f. All initial data are in the file cannon.ini.

Random walk in 2D: The program (rwalk1.f) calculates the average distance R to be from the origin point after N steps

Random walk in a 2D city: A random walker is randomly placed on a two-dimension lattice of L sites in a row (like a city with L+1 blocks in a row). The program (rwalk2.f) calculates the average distance D (or the average number of blocks) to go to be out of the city limits.

Synchronized random walks: (see the description of the problem in project 3, problem 3)
The program rwalk5.f calculates the mean time when both walkers are at the same site)

2D Polymer simulation: random walk models that corresponds to the self-avoiding walk (SAW). This model consists of the set of all N-step walks starting from the origin subject to the global constrain that no lattice site can be visited more than once in each walk: rwalk4.f

The gambler's ruin problem: gamble.f

Motion of a planet around a star: planet1.for with initial data planet1.ini