.. _WINDOWS-INSTALLATION:

===========================
Simple Windows Installation
===========================

These instructions are for the `Windows XP`_ and `Windows 2000`_
platforms. Please see the more general :ref:`INSTALLATION` for detailed
installation instructions.  These instructions are not the only way to
set up :term:`FiPy` on a Windows_ OS but represent the most expedient way from
our experience to have a usable installation up and running.

.. _Windows: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.microsoft.com/windows/
.. _Windows XP: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.microsoft.com/windowsxp/
.. _Windows 2000: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.microsoft.com/windows2000/


Required Packages
=================

Python
------

http://www.pythonxy.com

http://www.enthought.com

We recommend the use of either `Enthought Python Distribution`_ or
`Python(x,y)`_. These versions of Python_ have some of the prerequisite
packages for :term:`FiPy` already included. Download and install the latest
version.

.. _Python(x,y): http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.pythonxy.com
.. _Python: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.python.org/
.. _Enthought Python Distribution: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.enthought.com/products/epd.php

PySparse
--------

http://sourceforge.net/project/showfiles.php?group_id=101403

Download and install the latest version of PySparse for Windows_
(:file:`pysparse-{x.y.z}.win32-py2.{X}.exe`). Be sure to select the version compiled
with the correct version of Python_ to match the `Python`_ installation.


FiPy
----

http://www.ctcms.nist.gov/fipy/download/

Download and unpack the zip file (:file:`FiPy-{x.y}.win32.zip`).  Run the
:term:`FiPy` installer :file:`FiPy-{x.y}.win32.exe`, which is in the base
:file:`FiPy-{x.y}` directory.

Optional Packages
=================

Gmsh
----

http://www.geuz.org/gmsh

If you wish to run examples that have unstructured meshes, it is
necessary to install Gmsh. Download and unpack the latest version of
Gmsh for Windows. Open the unpacked folder with a browser and make sure
that ``gmsh.exe`` is placed somewhere on the execution path.

Mayavi
------

http://code.enthought.com/projects/mayavi/

:term:`Mayavi` is a requirement if you wish to view 3D problems or improve the
viewing capabilities of the superfill examples. Either 
`Enthought Python Distribution`_ or `Python(x,y)`_ is advised.

Using FiPy on Windows
=====================

A number of interactive python environments are available such as the
IDLE_ and IPython_ environments. The following videos may be useful for
explaining the use of IPython_ on Windows:

http://showmedo.com/videos/series?name=PythonIPythonSeries

Testing
-------

If you have a working copy of the source, not an installed version of
:term:`FiPy`, you can run the tests using IPython_ from the base :term:`FiPy`
directory, by typing

    >>> run setup.py test 

in the IPython_ shell.

Running Examples
----------------

To run the :term:`FiPy` examples in IPython_ simply use the `run` command:

    >>> run examples/diffusion/mesh20x20.py

.. _IDLE: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.python.org/idle/doc/idlemain.html
.. _IPython: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://ipython.scipy.org





