Initial commit of an in-development testing project called 'xpdeint', pronounced 'expedient'.

This code is written in python and generates C++ code. Currently it's very bare-bones, for example
the xml script the parser reads is hard-coded in the parser (parser2.py) and the simulation source
is sent to standard output. For build instructions, current and missing features, see the README
file in the xpdeint directory.

As a summary, the tools required to build and test xpdeint are:
Python 2.5 or later and Cheetah 2.0.1 or later.

xpdeint requires xmds to be installed for libxmds, and xmds_complex.h. Like xmds-1, if you want fourier
transforms, you need fftw2 or fftw3 installed, though at the moment, only fftw3 is supported.

Examples scripts are found in the examples subdirectory. These xmds scripts are using a new xmds-1 like
syntax, but because they are different, they require the xmds-version=2 attribute on the simulation element
so that they can be differentiated from scripts using the xmds-1 syntax.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1731 41b19578-b77a-4e3b-9682-c8570d237623
The main result of this commit is that stochastics now works in a basic way. You can't use error checking, you can only run 1 path, and I've only tested it with the RK4 integrator, but it is usable at the moment. It should work with RK9, and ARK45 will need a few small tweaks before that will work.

_ScriptElement, _MomentGroupElement, _Operator:
* All templates now know what the filter template argument was that was passed to them when they were instantiated. This is so that templates that are created later can have the correct filter used.
* All templates now have a 'dependencies' attribute for containing a set of vectors that they need when looping. This doesn't make sense for many templates, but its there for those that do and so that the name is consistent.

VectorElement:
* Only initialise the vector if it needs initialisation

VectorInitialisation, VectorInitialisationCDATA:
* The stochastic feature needs to know what field some templates use when looping, so I've added a field property to all vector initialisations.

ConstantOperator, ConstantIPOperator, AdaptiveStepIPOperator, NonConstantOperator, FilterOperator:
* Remove unnecessary set-to-list conversions

_StochasticFeature, StochasticFeature, GaussianPOSIXNoise, SlowGaussianPOSIXNoise:
* Stochastic feature now works at a basic level. We need to fix error checking so that it creates the missing noise vectors when error checking is on. We also need to parse the 'noises' tag inside integration tags and initialisation tags.

XMDS2Parser:
* Parse the 'seed' attribute of each noise if available. If not, just use random numbers generated at (simulation) runtime to seed.

kubo.xmds:
* Turn of error checking so the stochastics works.

xpdeint.tmproj:
* Remove TextMate project from repository.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1734 41b19578-b77a-4e3b-9682-c8570d237623
Make stochastics work with adaptive integrators in xpdeint. I haven't checked that the results converge correctly, but as of this commit, xpdeint has a working ARK45 algorithm with stochastics.

_ScriptElement, _StochasticFeature:
* Replace the 'objectMap' object with just a set of all the templates called 'templates'.

SimulationElement:
* Make available the _EPSILON macro which is a small number for fuzzy floating point comparisons.

_Integrator:
* Document a potential bug when non-fourier dimensions are implemented.

AdaptiveStepIntegrator:
* Bug fixes so stochastics can work correctly.

ARK45Integrator, _StochasticFeature:
* Move the exponents for the algorithm for changing the timestep into the actual integrator as this depends on the order of the adaptive algorithm, and whether or not noises are being used in the integration.

ErrorCheckFeature, StochasticFeature, Noise, PoissonianPOSIXNoise:
* Remove unnecessary _dVdt argument from noises. This has the effect of changing the interpretation of the mean_rate attribute for poissonian noises. Previously, the intention was that poissonian noises would have zero mean for vector initialisation (as dt = 0), however now the mean-rate is interpreted to mean the mean rate per unit volume in initialisation and per unit volume per unit time during an integration stage. Typically, a user will only want a poissonian noise in one or the other stage, so this way poissonian noises can be available for both.

StochasticFeature:
* Finish implementation of the dtdW noise store for adaptive integrators.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1736 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: In the integrators, replace the broken goFromXSpace / goFromKSpace stuff with just a single goToHomeSpace.

git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1737 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: The beginnings of a simulation driver for running multiple paths on a single CPU.

_SimulationDriver:
* Parent class for all simulation drivers.

MultiPathDriver:
* A single-cpu multiple-path simulation driver.

Integrator, FixedStepIntegrator, AdaptiveStepIntegrator, ARK45Integrator:
* initialisation must take two stages, the first is a general initialisation that allocates and does things that don't necessarily need to be local to the segment for the integrator. The second is local initialisation that must occur in the integrator's segment.

ScriptParser, XMDS2Parser:
* Add support for simulation drivers.

git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1738 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Completed simulation driver for running multiple paths on a single CPU. Also, stochastics can now be used with error checking.

_ScriptElement:
* If a template class has an attribute 'globalNameSpaceName', then the template will be added to the globalNameSpace with that name.
* Replace the dodgy way the caller was determined for 'insertCodeForFeatures' with something much more reliable.
* A template can delay when its preflight() method will be called through the 'canRunPreflightYet()' method.
* Add a remove() method that removes a template from various globalNameSpace variables.

_VectorElement, VectorElement:
* Set the default initialiser for a vector to be the zero initialisation template.
* Add support for vector array aliases. Another template (usually a feature) can register with a vector that it wants a similar array allocated and initialised at the same time as the original vector.

SimulationElement:
* Add a _LOG function to generated simulations. All printf output now goes through the _LOG function and has a log level attached to it. This makes it easy to filter what output will be generated from a simulation, for example suppressing 'sampled at t = blah' output when running a simulation with multiple paths.

DefaultDriver:
* The default simulation driver. This runs a single path.

_MultiPathDriver, MultiPathDriver:
* Completed multi-path driver. This driver allows multiple runs of simulation to be executed. This is designed to be used with stochastic simulations, though you can use it with deterministic simulations too.

Integrator, Noise:
* Tell the compiler to inline some of the shorter functions.

_ErrorCheckFeature, ErrorCheckFeature:
* Parent class for ErrorCheckFeature. Implements preflight and canRunPreflightYet for interoperability with the stochastic feature.

GaussianPOSIXNoise, SlowGaussianPOSIXNoise:
* Speed up the calculation of odd noises.

parser2:
* The implementation of the delayed-preflight algorithm.

git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1739 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Fixed bug so that stochastic PDE's now work. Added an example (fibre.xmds).

* The dimension dictionary has now been replaced with its own object so that things will be easier in the future.

* Initialisation for segments etc, has been shifted to after the ErrorCheck feature because IP operators depend on the step size.

* Corrected the Gaussian noises for the case where there is more than one noise to generate.

* Changed the source generator for the MKL noises to something more robust.

git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1740 41b19578-b77a-4e3b-9682-c8570d237623
support epydoc documentation generation

- epydoc creates documentation from doc strings in the source.
  See http://epydoc.sourceforge.net/

- To format the doc strings, we use restructured text by default.
  See http://docutils.sourceforge.net/rst.html

- We don't output frames in HTML because they are difficult to use.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1741 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: It appears that some of the changed files didn't get committed in my last commit for fixing stochastic PDE's.

* Fix documentation in MultiPathDriver to follow restructuredText so that the generated documentation looks a bit nicer for that function.

epydoc.cfg:
* Don't specify the path to the graphviz dot executable, as it may not be in /usr/bin/dot. Just assume it's on the path if it's installed.

doc/Makefile:
* Remove pdf documentation too when doing a make clean.

git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1742 41b19578-b77a-4e3b-9682-c8570d237623
Makefile for cheetah compilation and cleaning


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1743 41b19578-b77a-4e3b-9682-c8570d237623
notation change in templates

- We should not use # to begin Cheetah commands,
  because it clashes with the C preprocessor.
  It's even worse, because #include is a Cheetah command.

- Instead use @ to begin Cheetah directives,
  @# to begin Cheetah comments,
  and @* and *@ for multi-line comments.

- update Makefile to tell Cheetah about the new notation.

- update loopOverVectorsWithInnerContentTemplate to use new notation.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1744 41b19578-b77a-4e3b-9682-c8570d237623
fix escape of # in Python string

- we don't need to escape it; this was a leftover from a Makefile.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1745 41b19578-b77a-4e3b-9682-c8570d237623
update Makefile to compile changed templates all at once


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1746 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Get the Makefile to remove the .py.bak files during 'make clean'.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1747 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Looping optimisation.
* Don't create explicit index pointers for vectors not in the looping
  field when they are in a field that has the same dimensions as the
  looping field.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1748 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Correct comparison of spaces.
* When checking that a vector is in the appropriate space, you need
  to AND its space with a spaceMask as well as your space so that
  only the dimensions shared by the two spaceMasks are compared.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1749 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Clean up the IndentFilter, and move comments to a docstring.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1750 41b19578-b77a-4e3b-9682-c8570d237623
change __eq__ of Dimension class to be more flexible

- types don't have to be exact for the comparison to go ahead

- change __ne__ so it handles NotImplemented correctly
  (previously, it would return "not NotImplemented", which equals True,
  if the two values could not be compared).


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1751 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Various documentation cleanups.
* Modified the doc Makefile so that it correctly recognises when things have changed.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1752 41b19578-b77a-4e3b-9682-c8570d237623
xpdeint: Make the remove() function remove templates from more lists.


git-svn-id: svn+ssh://svn.code.sf.net/p/xmds/code/trunk/xpdeint@1753 41b19578-b77a-4e3b-9682-c8570d237623