Summary of Installation Steps

  1. Install Python and Numerical Python on your system.
  2. Set the proper environment by editing the file 'numpy_script' then 'source numpy_script'
  3. Set the compiler to use in geom/Makefile and mv/Makefile solver/Makefile if different from gcc. Then type 'make compile' to compile the C modules.
  4. type 'make' in the pfem directory to see all the targets.

Detailed Steps

  1. You need to install Python (preferrably > 1.5) and the latest of Numerical Python (Numpy), all from
  2. The proper environemt for Python (PYTHONPATH) is set up using 'numpy_script'. The environmental variables to set are:
An example of the variables set on my machine using the tcsh shell:

setenv PYTHON_INCLUDE /usr/include/python1.5
setenv NUMPY_INCLUDE /usr/include/python1.5/Numeric
setenv NUMPY /usr/lib/python1.5/site-packages/Numeric
setenv PFEMHOME /home/jonah/cvs/cvs_pfem/pfem
****IMPORTANT STEP****: Once these variables are set, use

source numpy_script
to make them effective in the current shell.

Optional diagnostic script

The script 'diag_script' can be used optionally to see whether the needed environemntal variables exist. If the script reports error, then you should fix the variables, and 'source numpy_script' again to make the environment effective. To run the script, just type 'diag_script' (without the single quotes).

Compile the C modules

In the home directory of pfem, type 'make compile' to compile the C modules into shared libraries. The default compiler is gcc. If you use a different compiler, you need to modify that in the Makefiles of geom, mv and solver subdirectories.

How To Run the Code

You could run the code in any directory which contains the data file (with .inp extension). In addition, as an option (recommended for production run), you should
       cp ~/pfem/config/ is a text file that has additional customizations for the code. See the comments in this file for usage.

Examples of codes that can be run are usually in the test subdirctories of most modules by

For production runs, you should use

python -O
which will turn off the assertion (debug) statements and improve efficiency.

This is a redesigned version which may render certain test cases not to work. The ABAQUS data files, with extensions in .inp, in ~pfem/struct/heat/test do seem to work. Type, for example,

            python -O heat1.inp > tmp1.out
to run the code and generate output in tmp1.out.

Simple tutorials on (a small set of) ABAQUS input data format are in ~pfem/preproc/abaqus/doc/resources.


As the structure of pfem is still evolving, I have not used the package feature of Python. The advantage of this approach is that different modules and subdirectories can be moved around. The disadvantage is that PYTHONPATH becomes long. It is hoped that when the structure of pfem becomes more stable, package will be used in the future.