Skeleton 2-1/2D Darwin Python OpenMP Particle-in-Cell (PIC) code
by Viktor K. Decyk, Adam Tableman, and Qiyang Hu
copyright 2015, regents of the university of california

This file contains 2-1/2D Darwin Python OpenMP PIC codes.  They are
based on the 2-1/2D Darwin OpenMP PIC codes contained in the directory
mdpic2 The primary purpose is to illustrate how to replace a Fortran or
C main code with a Python script, in order allow the program to be run
interactively.

Python version 2.7 is recommended, and is available from the web site:
www.python.org.  Numpy (http://www.numpy.org) and SciPy
(http://www.scipy.org) also need to be installed.

The file fdmpic2.py is a line by line translation of mdpic2.f90 in the
directory mdpic2, and cmdpic2.py is a translation of mdpic2.c.  The
procedure libraries mdpush2.f and mdpush2.c are identical to those in
mdpic2.  Interface functions mdpush2_hpy.f90 and cmdpush2_hpy.f90 are
provided to allow the f2py program to automatically wrap the procedures
to make them accessible to Python.  The file mdpush2_hpy.f90 has been
modified from mdpush2_h.f90 in mdpic2 in two ways.  The first
modification was the removal of the module/end module statements, which
fp2y cannot currently handle properly.  The second was the replacement
of explicit-shape array declarations with assumed-size array
declarations so that f2py would not remove the arguments in the array
declarations from the argument list.  The file cmdpush2_hpy.f90 is the
same as mdpush2_hpy.f90, except that the function names have been
changed to the C versions.  This works because the file mdpush2.c
already contained wrappers for Fortran.

No warranty for proper operation of this software is given or implied.
Software or information may be copied, distributed, and used at own
risk; it may not be distributed without this notice included verbatim
with each file.  If use of these codes results in a publication, an
acknowledgement is requested.

The major program files contained here include:
fmdpic2.py       Python main script for Fortran procedure library
cmdpic2.py       Python main script for C procedure library
mdpush2.f        Fortran77 procedure library
mdpush2_hpy.f90  Fortran procedure interface (header) library
mdpush2.c        C procedure library
mdpush2.h        C procedure header library
cmdpush2_hpy.f90 C procedure interface (header) library
dtimer.c         C timer function, used by both C and Fortran
dtimer_hpy.f90   C timer interface (header) library
omplib.f         Fortran77 OpenMP utility library
omplib_hpy.f90   Fortran90 OpenMP utility interface (header) library

Files with the suffix .f90 adhere to the Fortran 90 standard, files with
the suffix .f adhere to the Fortran77 standard, files with the suffix .c
and .h adhere to the C99 standard.

The makefile is setup to use gcc and gfortran with Linux.  Versions for
other compitlers are also in the Makefile but are commented out.

Two dynamic libraries can be created, fmdpush2.so for Fortran and
cmdpush2.so for C.  To create them, execute:

Make program_name

where program_name is either: fmdpic2.py or cmdpic2.py, or execute:

make

to create both libraries.

To execute, type the name of the executable:

python program_name

where program_name is either fmdpic2.py or cmdpic2.py.

The file output contains the results produced for the default parameters.
