###############################################################################
Coyright
###############################################################################
This package is copy-righted software and provided as is.
It can be used free of charge for non-commercial purpose.
You run this program on your own risk.

Copyright is retained by
Horst Eckardt, Munich, Germany (2006)

The program requires some other publically available software packages to run.

###############################################################################
Description
###############################################################################
This program package solves the equations described in the article
    "Numerical models for the resonance behaviour of the Coulomb potential
    in ECE theory".
Program coul-1.for computes Phi(x) for a 1D grid of Phi values.
Output for graphics is
1. rho(x)
2. Phi(x) and rho(x)
3. omega(x) and omega'(x)
4. generalized Q factors (experimental)

Program coul-2.for computes Phimax(kappa) for a 1D grid of kappa values.
Phimax is the maximum amplitude of Phi(x) for a given kappa.
Phimax is extracted according to a certain (unsecure) algorithm.
Output for graphics is
1. Phimax(kappa)

Required environment in Windows:
- Cygwin with gcc, g77 and make installed
- Gnuplot
These packages can be downloaded from sourceforge.net.

Required environment in Linux:
- software development packages with g77 compiler or another fortran compiler
- gnuplot

###############################################################################
Installation
###############################################################################
1. copy the zip archive to a suitable directory
2. exract zip file
3. edit the Makefile,
   define parameters suitable for your system
4. edit the files plot1, plot1a, plot2,
   set the terminal type according to Windows or Linux
3. in a shell type "make"

###############################################################################
Usage
###############################################################################
Running the programs without graphics:
In a shell type
   coul-1
and
   coul-2

Running the programs with graphics:
In a shell type
   make graph-1
and
   make graph-2

###############################################################################
Distributed files
###############################################################################

Makefile          Makefile for building the software
Readme.txt        This file
coul-1.for		Program for computing solution Phi(x)
coul-2.for		Program for computing resonance curves Phimax(kappa)
input1.txt		Input file for coul-1.for
input2.txt		Input file for coul-2.for
output1.txt		Output file of coul-1.for for plotting
output1a.txt 	Output file of coul-1.for for plotting, additional data
output2.txt		Output file of coul-2.for for plotting
plot1			Input file for gnuplot
plot1a		Input file for gnuplot
plot2			Input file for gnuplot

In directory bin-Cygwin:
executable versions of the programs including a Cygwin library.
By copying these files to the main directory, you should be able to run the
programs without compilation and without Cygwin environment on Windos.
You have to call the graphics then by
   wgnuplot plot1
etc.
###############################################################################
Description of parameters of the input files
###############################################################################

The input parameters have the following meaning:

###### file input1.txt

1. text
      one line of descriptive text
2. iout
      parameter for output control
      0: no output
      1: output to file
      2: output to file and terminal
3. nmax
      maximum index number of points for x coordinate grid (<5000)
   xmax
      Phi is calculated for coordinate values between 0 and xmax.
      xmax is measured in arbitrary units.
      If xmax<0, then the value is adjusted from kappa so that
      xmax has the length of three wavelengths.
4. r_type
      type of predefined rho
      1: oscillating:              cos(kappa*x)
      2: Gaussian and oscillating: exp(-(.1*kappa*x)**2)*cos(kappa*x)
   o_type
      type of predefined omega and omega'
      1: constant values:     omega=0.1,   omega'=2
      2: linear:              omega=0.1*x, omega'=0.1
      3: oscillating:         sin(kappa*x)
      4: proportional to rho: omega=rho
      5: nonlinear equation:  omega=f*Phi(x)
5. Phi0
      initial value of Phi at x=0
   Phi0
      derivative of initial value of Phi at x=0
6. kappa
      wave number in arbitrary units
7. (only for o_type=5)
   f
      factor of proportionality for omega=f*Phi(x)
   fmix
      mixing factor between iterations. This is required to accelerate
      convergence (or to ensure convergence at all).
      Phi[new] := (1-fmix)*Phi[old] + fmix*Phi[new]

###### file input2.txt

For lines 1-5, input parameters are the same as for input1.txt.

6. nkmax
      maximum index number of points for kappa grid (<5000)
7. kappamin, kappamax
      range of kappa in which the resonance curve will be computed

###############################################################################