[xmds2] 01/04: Imported Upstream version 2.2.0+dfsg1

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Sat Feb 1 21:36:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

rlaboiss-guest pushed a commit to branch master
in repository xmds2.

commit 12266fed706588a9139eefe671dd9b15ff24c7d4
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Fri Jan 31 14:42:26 2014 +0100

    Imported Upstream version 2.2.0+dfsg1
---
 xpdeint/Vectors/VectorInitialisationFromXSIL.py | 1033 -----------------------
 1 file changed, 1033 deletions(-)

diff --git a/xpdeint/Vectors/VectorInitialisationFromXSIL.py b/xpdeint/Vectors/VectorInitialisationFromXSIL.py
deleted file mode 100644
index 54e3787..0000000
--- a/xpdeint/Vectors/VectorInitialisationFromXSIL.py
+++ /dev/null
@@ -1,1033 +0,0 @@
-#!/usr/bin/env python
-
-
-
-
-##################################################
-## DEPENDENCIES
-import sys
-import os
-import os.path
-try:
-    import builtins as builtin
-except ImportError:
-    import __builtin__ as builtin
-from os.path import getmtime, exists
-import time
-import types
-from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
-from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
-from Cheetah.Template import Template
-from Cheetah.DummyTransaction import *
-from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
-from Cheetah.CacheRegion import CacheRegion
-import Cheetah.Filters as Filters
-import Cheetah.ErrorCatchers as ErrorCatchers
-from xpdeint.Vectors.VectorInitialisation import VectorInitialisation
-from xpdeint.CallOnceGuards import callOnceGuard
-from xpdeint.Geometry.UniformDimensionRepresentation import UniformDimensionRepresentation
-from xpdeint.Geometry.SplitUniformDimensionRepresentation import SplitUniformDimensionRepresentation
-
-##################################################
-## MODULE CONSTANTS
-VFFSL=valueFromFrameOrSearchList
-VFSL=valueFromSearchList
-VFN=valueForName
-currentTime=time.time
-__CHEETAH_version__ = '2.4.4'
-__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
-__CHEETAH_genTime__ = 1389652446.664879
-__CHEETAH_genTimestamp__ = 'Tue Jan 14 09:34:06 2014'
-__CHEETAH_src__ = '/home/mattias/xmds-2.2.0/admin/staging/xmds-2.2.0/xpdeint/Vectors/VectorInitialisationFromXSIL.tmpl'
-__CHEETAH_srcLastModified__ = 'Thu Nov 14 17:42:18 2013'
-__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
-
-if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
-    raise AssertionError(
-      'This template was compiled with Cheetah version'
-      ' %s. Templates compiled before version %s must be recompiled.'%(
-         __CHEETAH_version__, RequiredCheetahVersion))
-
-##################################################
-## CLASSES
-
-class VectorInitialisationFromXSIL(VectorInitialisation):
-
-    ##################################################
-    ## CHEETAH GENERATED METHODS
-
-
-    def __init__(self, *args, **KWs):
-
-        super(VectorInitialisationFromXSIL, self).__init__(*args, **KWs)
-        if not self._CHEETAH__instanceInitialized:
-            cheetahKWArgs = {}
-            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
-            for k,v in KWs.items():
-                if k in allowedKWs: cheetahKWArgs[k] = v
-            self._initCheetahInstance(**cheetahKWArgs)
-        
-
-    def description(self, **KWS):
-
-
-
-        ## Generated from @def description: Vector initialisation from an XSIL file at line 30, col 1.
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        write(u'''Vector initialisation from an XSIL file''')
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-
-    @callOnceGuard
-    def static_functionPrototypes(self, **KWS):
-
-
-
-        ## CHEETAH: generated from @def static_functionPrototypes at line 33, col 1.
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        # 
-        _v = super(VectorInitialisationFromXSIL, self).static_functionPrototypes()
-        if _v is not None: write(_filter(_v))
-        # 
-        write(u'''inline uint32_t XMDSSwapInt32(uint32_t __arg);
-inline uint64_t XMDSSwapInt64(uint64_t __arg);
-inline float XMDSSwapFloat(float __in);
-inline double XMDSSwapDouble(double __in);
-''')
-        # 
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-
-    @callOnceGuard
-    def globals(self, **KWS):
-
-
-
-        ## CHEETAH: generated from @def globals at line 45, col 1.
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        _v = super(VectorInitialisationFromXSIL, self).globals()
-        if _v is not None: write(_filter(_v))
-        # 
-        write(u'''// This stuff is here because libxmds requires it.
-// That is because we need the XML parser in order to be able
-// to load XSIL files to initialise fields
-bool debugFlag = false;
-bool xmlDebugFlag =  false;
-''')
-        # 
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-
-    @callOnceGuard
-    def static_functionImplementations(self, **KWS):
-
-
-
-        ## CHEETAH: generated from @def static_functionImplementations at line 57, col 1.
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        # 
-        _v = super(VectorInitialisationFromXSIL, self).static_functionImplementations()
-        if _v is not None: write(_filter(_v))
-        # 
-        write(u'''// The following code is imported from CFByteOrder.h, and is used subject to the APSL v2
-// The license is at: http://www.opensource.apple.com/apsl
-
-// These functions have been renamed to avoid conflicts with the actual functions if an XMDS simulation
-// is ever linked against the CoreFoundation framework
-
-// 32-bit byte swapper
-inline uint32_t XMDSSwapInt32(uint32_t __arg)
-{
-#if defined(__i386__) && defined(__GNUC__)
-  __asm__("bswap %0" : "+r" (__arg));
-  return __arg;
-#elif defined(__ppc__) && defined(__GNUC__)
-  uint32_t __result;
-  __asm__("lwbrx %0, 0, %1" : "=r" (__result) : "r" (&__arg), "m" (__arg));
-  return __result;
-#else
-  uint32_t __result;
-  __result = ((__arg & 0xFF) << 24) | ((__arg & 0xFF00) << 8) | ((__arg >> 8) & 0xFF00) | ((__arg >> 24) & 0xFF);
-  return __result;
-#endif
-}
-
-// 64-bit byte-swapper
-inline uint64_t XMDSSwapInt64(uint64_t __arg)
-{
-  union XMDSSwap {
-    uint64_t __sv;
-    uint32_t __ul[2];
-    } __tmp, __result;
-  __tmp.__sv = __arg;
-  __result.__ul[0] = XMDSSwapInt32(__tmp.__ul[1]);
-  __result.__ul[1] = XMDSSwapInt32(__tmp.__ul[0]);
-  return __result.__sv;
-}
-
-inline float XMDSSwapFloat(float __in)
-{
-  union XMDSSwap {
-    float __f;
-    uint32_t __ul;
-  } __tmp;
-  __tmp.__f = __in;
-  __tmp.__ul = XMDSSwapInt32(__tmp.__ul);
-  return __tmp.__f;
-}
-
-inline double XMDSSwapDouble(double __in)
-{
-  union XMDSSwap {
-    double __d;
-    uint64_t __ull;
-  } __tmp;
-  __tmp.__d = __in;
-  __tmp.__ull = XMDSSwapInt64(__tmp.__ull);
-  return __tmp.__d;
-}
-''')
-        # 
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-
-    def initialiseVector(self, **KWS):
-
-
-
-        ## CHEETAH: generated from @def initialiseVector at line 125, col 1.
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        # 
-        initialisationCodeBlock = VFFSL(SL,"codeBlocks",True)['initialisation']
-        write(u'''// XSIL initialisation has three stages.
-// 1. Initialise the vector to zero.
-// 2. Execute any CDATA code if there is any.
-// 3. Read data from the XSIL file.
-
-{
-  // Stage 1 of initialisation
-  bzero(_active_''')
-        _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 135, col 17
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 135, col 17.
-        write(u''', sizeof(''')
-        _v = VFFSL(SL,"vector.type",True) # u'${vector.type}' on line 135, col 38
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.type}')) # from line 135, col 38.
-        write(u''') * ''')
-        _v = VFFSL(SL,"vector.allocSize",True) # u'${vector.allocSize}' on line 135, col 56
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.allocSize}')) # from line 135, col 56.
-        write(u''');
-''')
-        if VFN(VFFSL(SL,"initialisationCodeBlock.codeString",True),"isspace",False)(): # generated from line 136, col 3
-            write(u'''  // There is no stage 2
-''')
-        else: # generated from line 138, col 3
-            vectorOverrides = []
-            if VFFSL(SL,"vector.integratingComponents",True): # generated from line 140, col 5
-                vectorOverrides.append(VFFSL(SL,"vector",True))
-            write(u'''  // Stage 2 of initialisation
-  ''')
-            _v = VFN(VFFSL(SL,"initialisationCodeBlock",True),"loop",False)(self.insideInitialisationLoops, vectorOverrides=vectorOverrides) # u'${initialisationCodeBlock.loop(self.insideInitialisationLoops, vectorOverrides=vectorOverrides), autoIndent=True}' on line 144, col 3
-            if _v is not None: write(_filter(_v, autoIndent=True, rawExpr=u'${initialisationCodeBlock.loop(self.insideInitialisationLoops, vectorOverrides=vectorOverrides), autoIndent=True}')) # from line 144, col 3.
-        write(u'''}
-
-char **_dimNames  = new char* [_''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 148, col 33
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 148, col 33.
-        write(u'''_ndims];
-double *_dimDelta = new double[_''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 149, col 33
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 149, col 33.
-        write(u'''_ndims];
-double *_dimMin   = new double[_''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 150, col 33
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 150, col 33.
-        write(u'''_ndims];
-unsigned long *_dimLattice = new unsigned long[_''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 151, col 49
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 151, col 49.
-        write(u'''_ndims];
-
-''')
-        for dimensionNumber, dimension in enumerate(VFFSL(SL,"vector.field.dimensions",True)): # generated from line 153, col 3
-            dimRep = dimension.inBasis(VFFSL(SL,"vector.initialBasis",True))
-            write(u'''_dimNames[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'$dimensionNumber' on line 155, col 11
-            if _v is not None: write(_filter(_v, rawExpr=u'$dimensionNumber')) # from line 155, col 11.
-            write(u''']   = "''')
-            _v = VFFSL(SL,"dimRep.name",True) # u'${dimRep.name}' on line 155, col 34
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.name}')) # from line 155, col 34.
-            write(u'''";
-_dimDelta[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'$dimensionNumber' on line 156, col 11
-            if _v is not None: write(_filter(_v, rawExpr=u'$dimensionNumber')) # from line 156, col 11.
-            write(u''']   = ''')
-            _v = VFFSL(SL,"dimRep.stepSize",True) # u'${dimRep.stepSize}' on line 156, col 33
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.stepSize}')) # from line 156, col 33.
-            write(u''';
-_dimMin[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'$dimensionNumber' on line 157, col 9
-            if _v is not None: write(_filter(_v, rawExpr=u'$dimensionNumber')) # from line 157, col 9.
-            write(u''']     = ''')
-            _v = VFFSL(SL,"dimRep.minimum",True) # u'${dimRep.minimum}' on line 157, col 33
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.minimum}')) # from line 157, col 33.
-            write(u''';
-_dimLattice[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'$dimensionNumber' on line 158, col 13
-            if _v is not None: write(_filter(_v, rawExpr=u'$dimensionNumber')) # from line 158, col 13.
-            write(u'''] = ''')
-            _v = VFFSL(SL,"dimRep.globalLattice",True) # u'${dimRep.globalLattice}' on line 158, col 33
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.globalLattice}')) # from line 158, col 33.
-            write(u''';
-
-''')
-        # 
-        componentNameSizePrefix = ''
-        if VFFSL(SL,"vector.type",True) == 'complex': # generated from line 163, col 3
-            componentNameSizePrefix = '2 * '
-        write(u'''char **_componentNames = new char*[''')
-        _v = VFFSL(SL,"componentNameSizePrefix",True) # u'${componentNameSizePrefix}' on line 166, col 36
-        if _v is not None: write(_filter(_v, rawExpr=u'${componentNameSizePrefix}')) # from line 166, col 36.
-        write(u'''_''')
-        _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 166, col 63
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 166, col 63.
-        write(u'''_ncomponents + 1];
-int *_componentFieldIndices = new int[''')
-        _v = VFFSL(SL,"componentNameSizePrefix",True) # u'${componentNameSizePrefix}' on line 167, col 39
-        if _v is not None: write(_filter(_v, rawExpr=u'${componentNameSizePrefix}')) # from line 167, col 39.
-        write(u'''_''')
-        _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 167, col 66
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 167, col 66.
-        write(u'''_ncomponents];
-
-''')
-        componentNameIndex = 0
-        for component in VFFSL(SL,"vector.components",True): # generated from line 170, col 3
-            write(u'''_componentNames[''')
-            _v = VFFSL(SL,"componentNameIndex",True) # u'$componentNameIndex' on line 171, col 17
-            if _v is not None: write(_filter(_v, rawExpr=u'$componentNameIndex')) # from line 171, col 17.
-            write(u'''] = "''')
-            _v = VFFSL(SL,"component",True) # u'${component}' on line 171, col 41
-            if _v is not None: write(_filter(_v, rawExpr=u'${component}')) # from line 171, col 41.
-            write(u'''R";
-''')
-            componentNameIndex += 1
-            # 
-            if VFFSL(SL,"vector.type",True) == 'complex': # generated from line 174, col 5
-                write(u'''_componentNames[''')
-                _v = VFFSL(SL,"componentNameIndex",True) # u'$componentNameIndex' on line 175, col 17
-                if _v is not None: write(_filter(_v, rawExpr=u'$componentNameIndex')) # from line 175, col 17.
-                write(u'''] = "''')
-                _v = VFFSL(SL,"component",True) # u'${component}' on line 175, col 41
-                if _v is not None: write(_filter(_v, rawExpr=u'${component}')) # from line 175, col 41.
-                write(u'''I";
-''')
-                componentNameIndex += 1
-            write(u'''
-''')
-        write(u'''_componentNames[''')
-        _v = VFFSL(SL,"componentNameIndex",True) # u'$componentNameIndex' on line 180, col 17
-        if _v is not None: write(_filter(_v, rawExpr=u'$componentNameIndex')) # from line 180, col 17.
-        write(u'''] = NULL;
-
-char *_binaryDataFilename;
-int _unsignedLongSize;
-bool _dataEncodingIsNative;
-bool _isPrecisionDouble;
-unsigned long _nDataComponents;
-unsigned long *_inputLattice;
-int *_componentInputIndices;
-
-if (!initialiseFieldFromXSILFile("''')
-        _v = VFFSL(SL,"filename",True) # u'${filename}' on line 190, col 35
-        if _v is not None: write(_filter(_v, rawExpr=u'${filename}')) # from line 190, col 35.
-        write(u'''", "''')
-        _v = VFFSL(SL,"momentGroupName",True) # u'${momentGroupName}' on line 190, col 50
-        if _v is not None: write(_filter(_v, rawExpr=u'${momentGroupName}')) # from line 190, col 50.
-        write(u'''", _''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 190, col 72
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 190, col 72.
-        write(u'''_ndims, _dimNames, _componentNames, 
-                                 // output variables
-                                 &_binaryDataFilename, &_unsignedLongSize, &_dataEncodingIsNative, &_isPrecisionDouble,
-                                 &_nDataComponents, &_inputLattice, &_componentInputIndices))
-  _LOG(_ERROR_LOG_LEVEL, "Unable to load data from ''')
-        _v = VFFSL(SL,"filename",True) # u'${filename}' on line 194, col 52
-        if _v is not None: write(_filter(_v, rawExpr=u'${filename}')) # from line 194, col 52.
-        write(u'''\\nExiting.\\n");
-
-FILE *_inputFile = fopen(_binaryDataFilename, "rb");
-if (_inputFile == NULL)
-  _LOG(_ERROR_LOG_LEVEL, "Unable to open binary input file %s\\n", _binaryDataFilename);
-
-typedef union {
-  float *_floatPtr;
-  double *_doublePtr;
-} _GenericRealNumberPtr;
-
-typedef union {
-  unsigned long _ulong;
-  uint32_t _uint32;
-  uint64_t _uint64;
-} _GenericUnsignedLong;
-
-_GenericUnsignedLong _size;
-_GenericRealNumberPtr *_inputData = new _GenericRealNumberPtr[_''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 212, col 64
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 212, col 64.
-        write(u'''_ndims];
-
-// loop over the dimensions in the binary file
-for (int __i = 0; __i < _''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 215, col 26
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 215, col 26.
-        write(u'''_ndims; __i++) {
-  uint64_t _sizeValue;
-  switch(_unsignedLongSize) {
-''')
-        for unsignedLongSize, unionElement, typeName, swapFunctionName in [('0', '_ulong',  'unsigned long', 'XMDSSwapInt32'),                                                                      ('4', '_uint32', 'uint32_t',      'XMDSSwapInt32'),                                                                      ('8', '_uint64', 'uint64_t',      'XMDSSwapInt64')]: # generated from line 218, col 3
-            write(u'''    case ''')
-            _v = VFFSL(SL,"unsignedLongSize",True) # u'${unsignedLongSize}' on line 221, col 10
-            if _v is not None: write(_filter(_v, rawExpr=u'${unsignedLongSize}')) # from line 221, col 10.
-            write(u''':
-      fread(&_size.''')
-            _v = VFFSL(SL,"unionElement",True) # u'${unionElement}' on line 222, col 20
-            if _v is not None: write(_filter(_v, rawExpr=u'${unionElement}')) # from line 222, col 20.
-            write(u''', sizeof(''')
-            _v = VFFSL(SL,"typeName",True) # u'${typeName}' on line 222, col 44
-            if _v is not None: write(_filter(_v, rawExpr=u'${typeName}')) # from line 222, col 44.
-            write(u'''), 1, _inputFile);
-      if (_dataEncodingIsNative)
-        _sizeValue = _size.''')
-            _v = VFFSL(SL,"unionElement",True) # u'${unionElement}' on line 224, col 28
-            if _v is not None: write(_filter(_v, rawExpr=u'${unionElement}')) # from line 224, col 28.
-            write(u''';
-      else
-        _sizeValue = ''')
-            _v = VFFSL(SL,"swapFunctionName",True) # u'${swapFunctionName}' on line 226, col 22
-            if _v is not None: write(_filter(_v, rawExpr=u'${swapFunctionName}')) # from line 226, col 22.
-            write(u'''(_size.''')
-            _v = VFFSL(SL,"unionElement",True) # u'${unionElement}' on line 226, col 48
-            if _v is not None: write(_filter(_v, rawExpr=u'${unionElement}')) # from line 226, col 48.
-            write(u''');
-      _unsignedLongSize = sizeof(''')
-            _v = VFFSL(SL,"typeName",True) # u'${typeName}' on line 227, col 34
-            if _v is not None: write(_filter(_v, rawExpr=u'${typeName}')) # from line 227, col 34.
-            write(u''');
-      break;
-    
-''')
-        write(u'''    default:
-      _LOG(_ERROR_LOG_LEVEL, "Unexpected unsigned long size in input XSIL file. Was expecting \'4\' or \'8\', instead got \'%i\'\\n", _unsignedLongSize);
-  }
-  
-  // Read in the data (in either single or double precision)
-  if (_isPrecisionDouble) {
-    _inputData[__i]._doublePtr = new double[_sizeValue];
-    fread(_inputData[__i]._doublePtr, sizeof(double), _sizeValue, _inputFile);
-    if (!_dataEncodingIsNative) {
-      for (unsigned int __j = 0; __j < _sizeValue; __j++)
-        _inputData[__i]._doublePtr[__j] = XMDSSwapDouble(_inputData[__i]._doublePtr[__j]);
-    }
-  } else {
-    _inputData[__i]._floatPtr = new float[_sizeValue];
-    fread(_inputData[__i]._floatPtr, sizeof(float), _sizeValue, _inputFile);
-    if (!_dataEncodingIsNative) {
-      for (unsigned int __j = 0; __j < _sizeValue; __j++)
-        _inputData[__i]._floatPtr[__j] = XMDSSwapFloat(_inputData[__i]._floatPtr[__j]);
-    }
-  }
-  
-  double _difference;
-  if (_isPrecisionDouble)
-    _difference = _inputData[__i]._doublePtr[1] - _inputData[__i]._doublePtr[0];
-  else
-    _difference = _inputData[__i]._floatPtr[1]  - _inputData[__i]._floatPtr[0];
-  
-  // Assert that the deltas are the same to within 1%
-  if (abs(_dimDelta[__i] - _difference) > 0.01 * _dimDelta[__i])
-    // _LOG will cause the simulation to exit
-    _LOG(_ERROR_LOG_LEVEL, "The step size in the \'%s\' dimension of the input data and the simulation grid do not match.\\n"
-                           "The step size in the \'%s\' dimension was %e, while the input data had a step size of %e.\\n",
-                           _dimNames[__i], _dimNames[__i], _dimDelta[__i], _difference);
-''')
-        # 
-        if VFFSL(SL,"geometryMatchingMode",True) == 'strict': # generated from line 265, col 3
-            write(u'''  
-  // STRICT MODE: assert that the start point is the same to within 10% of one delta,
-  //              and that the number of lattice points is the same.
-  double _start;
-  if (_isPrecisionDouble)
-    _start = _inputData[__i]._doublePtr[0];
-  else
-    _start = _inputData[__i]._floatPtr[0];
-  
-  if (abs(_dimMin[__i] - _start) > 0.1*_dimDelta[__i])
-    // _LOG will cause the simulation to exit
-    _LOG(_ERROR_LOG_LEVEL, "Geometry matching mode is strict, so the starting coordinate of each dimension in the field\\n"
-                           "must be the same as in the input grid.\\n"
-                           "The problem is with dimension \'%s\'.\\n", _dimNames[__i]);
-  
-  if (_dimLattice[__i] != _inputLattice[__i])
-    // _LOG will cause the simulation to exit
-    _LOG(_ERROR_LOG_LEVEL, "Geometry matching mode is strict, so the number of lattice points in each dimension of the field\\n"
-                           "must be the same as in the input grid.\\n"
-                           "The problem is with dimension \'%s\'.\\n", _dimNames[__i]);
-''')
-        write(u'''}
-
-long _binaryFileBaseOffset = ftell(_inputFile);
-long _realNumberSize = _isPrecisionDouble ? sizeof(double) : sizeof(float);
-off_t _vectorFieldSize = _unsignedLongSize + _realNumberSize''')
-        _v = ''.join([''.join([u' * _inputLattice[',str(VFFSL(SL,"i",True)),u']']) for i in range(len(VFFSL(SL,"vector.field.dimensions",True)))]) # u"${''.join([c' * _inputLattice[$i]' for i in range(len($vector.field.dimensions))])}" on line 291, col 61
-        if _v is not None: write(_filter(_v, rawExpr=u"${''.join([c' * _inputLattice[$i]' for i in range(len($vector.field.dimensions))])}")) # from line 291, col 61.
-        write(u''';
-
-// Create minimum value variables for dimensions not in fourier space
-''')
-        for dimensionNumber, dimension in enumerate(VFFSL(SL,"vector.field.dimensions",True)): # generated from line 294, col 3
-            write(u'''double _inputfield_min_''')
-            _v = VFFSL(SL,"dimension.name",True) # u'${dimension.name}' on line 295, col 24
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimension.name}')) # from line 295, col 24.
-            write(u''';
-if (_isPrecisionDouble)
-  _inputfield_min_''')
-            _v = VFFSL(SL,"dimension.name",True) # u'${dimension.name}' on line 297, col 19
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimension.name}')) # from line 297, col 19.
-            write(u''' = _inputData[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 297, col 50
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 297, col 50.
-            write(u''']._doublePtr[0];
-else
-  _inputfield_min_''')
-            _v = VFFSL(SL,"dimension.name",True) # u'${dimension.name}' on line 299, col 19
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimension.name}')) # from line 299, col 19.
-            write(u''' = _inputData[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 299, col 50
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 299, col 50.
-            write(u''']._floatPtr[0];
-''')
-        write(u'''
-''')
-        if len(VFFSL(SL,"vector.field.dimensions",True)): # generated from line 302, col 3
-            write(u'''// Create inputfield index variables
-long ''')
-            _v = ', '.join([''.join([u'_inputfield',str(VFN(VFN(VFFSL(SL,"dim",True),"inBasis",False)(VFFSL(SL,"vector.initialBasis",True)),"loopIndex",True))]) for dim in VFFSL(SL,"vector.field.dimensions",True)]) # u"${', '.join([c'_inputfield${dim.inBasis($vector.initialBasis).loopIndex}' for dim in $vector.field.dimensions])}" on line 304, col 6
-            if _v is not None: write(_filter(_v, rawExpr=u"${', '.join([c'_inputfield${dim.inBasis($vector.initialBasis).loopIndex}' for dim in $vector.field.dimensions])}")) # from line 304, col 6.
-            write(u''';
-''')
-        write(u'''
-// Index pointer into the input array (new and old)
-off_t _inputfield_index_pointer, _inputfield_old_index_pointer;
-for (unsigned int _component = 0; _component < ''')
-        _v = VFFSL(SL,"componentNameSizePrefix",True) # u'${componentNameSizePrefix}' on line 309, col 48
-        if _v is not None: write(_filter(_v, rawExpr=u'${componentNameSizePrefix}')) # from line 309, col 48.
-        write(u'''_''')
-        _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 309, col 75
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 309, col 75.
-        write(u"""_ncomponents; _component++) {
-  if (_componentInputIndices[_component] == -1)
-    // This just means that this component doesn't exist in the XSIL file
-    continue;
-  _inputfield_index_pointer = -42; // Just so that we always seek the first time
-  
-""")
-        loopingVectors = VFN(VFFSL(SL,"initialisationCodeBlock.dependencies",True),"copy",False)()
-        loopingVectors.add(VFFSL(SL,"vector",True))
-        write(u'''  
-  ''')
-        _v = VFFSL(SL,"loopOverFieldInBasisWithVectorsAndInnerContent",False)(VFFSL(SL,"initialisationCodeBlock.field",True),
-                                                   VFFSL(SL,"initialisationCodeBlock.basis",True),
-                                                   VFFSL(SL,"loopingVectors",True),
-                                                   VFFSL(SL,"insideDataLoops",True))
-        if _v is not None: write(_filter(_v, autoIndent=True, rawExpr=u'${loopOverFieldInBasisWithVectorsAndInnerContent($initialisationCodeBlock.field,\n                                                   $initialisationCodeBlock.basis,\n                                                   $loopingVectors,\n                                                   $insideDataLoops), autoIndent=True}')) # from line 318, col 3.
-        write(u'''  
-} // end the loop over components
-
-fclose(_inputFile);
-delete [] _dimNames;
-delete [] _componentNames;
-free(_binaryDataFilename);
-delete [] _inputLattice;
-delete [] _componentInputIndices;
-for (int __i = 0; __i < _''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 331, col 26
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 331, col 26.
-        write(u'''_ndims; __i++) {
-  if (_isPrecisionDouble)
-    delete [] _inputData[__i]._doublePtr;
-  else
-    delete [] _inputData[__i]._floatPtr;
-}
-delete [] _inputData;
-''')
-        # 
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-
-    def insideInitialisationLoops(self, codeString, **KWS):
-
-
-
-        ## CHEETAH: generated from @def insideInitialisationLoops($codeString) at line 341, col 1.
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        # 
-        write(u"""// Stage 2 of initialisation
-
-// The purpose of the following define is to give a (somewhat helpful) compile-time error
-// if the user has attempted to use the propagation dimension variable in the initialisation
-// block of a <vector> element. If they're trying to do this, what they really want is a 
-// <computed_vector> instead.
-#define """)
-        _v = VFFSL(SL,"propagationDimension",True) # u'${propagationDimension}' on line 349, col 9
-        if _v is not None: write(_filter(_v, rawExpr=u'${propagationDimension}')) # from line 349, col 9.
-        write(u''' Dont_use_propagation_dimension_''')
-        _v = VFFSL(SL,"propagationDimension",True) # u'${propagationDimension}' on line 349, col 64
-        if _v is not None: write(_filter(_v, rawExpr=u'${propagationDimension}')) # from line 349, col 64.
-        write(u'''_in_vector_element_CDATA_block___Use_a_computed_vector_instead
-
-// ********** Initialisation code ***************
-''')
-        _v = VFFSL(SL,"codeString",True) # u'${codeString}' on line 352, col 1
-        if _v is not None: write(_filter(_v, rawExpr=u'${codeString}')) # from line 352, col 1.
-        write(u'''// **********************************************
-#undef ''')
-        _v = VFFSL(SL,"propagationDimension",True) # u'${propagationDimension}' on line 354, col 8
-        if _v is not None: write(_filter(_v, rawExpr=u'${propagationDimension}')) # from line 354, col 8.
-        write(u'''
-''')
-        # 
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-
-    def insideDataLoops(self, **KWS):
-
-
-
-        ## CHEETAH: generated from @def insideDataLoops at line 358, col 1.
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        # 
-        basis = VFFSL(SL,"vector.initialBasis",True)
-        write(u'''// Save the old initialisation pointer, and clear the new one
-_inputfield_old_index_pointer = _inputfield_index_pointer;
-_inputfield_index_pointer = 0;
-
-''')
-        for dimensionNumber, dimension in enumerate(VFFSL(SL,"vector.field.dimensions",True)): # generated from line 365, col 3
-            dimRep = dimension.inBasis(basis)
-            dimName = dimRep.name
-            write(u'''_inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 368, col 12
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 368, col 12.
-            write(u''' = ''')
-            #  FIXME: Consider moving this to the dimension representations
-            if isinstance(dimRep, UniformDimensionRepresentation): # generated from line 370, col 5
-                write(u'''lround((''')
-                _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 371, col 9
-                if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 371, col 9.
-                write(u''' - _inputfield_min_''')
-                _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 371, col 38
-                if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 371, col 38.
-                write(u''')/_dimDelta[''')
-                _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 371, col 60
-                if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 371, col 60.
-                write(u''']);
-''')
-            elif isinstance(dimRep, SplitUniformDimensionRepresentation): # generated from line 372, col 5
-                write(u'''lround(''')
-                _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 373, col 8
-                if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 373, col 8.
-                write(u'''/_dimDelta[''')
-                _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 373, col 29
-                if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 373, col 29.
-                write(u''']) + (_inputLattice[''')
-                _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 373, col 67
-                if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 373, col 67.
-                write(u''']/2);
-''')
-            else: # generated from line 374, col 5
-                assert False, "XSIL Loading does not support loading data for dimensions that aren't uniformly spaced. The problem is with %s" % dimName
-            write(u'''
-// Check if the input grid has this coordinate value
-if (_inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 379, col 16
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 379, col 16.
-            write(u''' < 0 || _inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 379, col 54
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 379, col 54.
-            write(u''' >= _inputLattice[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 379, col 91
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 379, col 91.
-            write(u"""])
-  // The input grid doesn't cover this point.
-  goto _ENDLOOP;
-
-// check that the input coordinate matches up with a field coordinate
-{
-  double _inputfield_""")
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 385, col 22
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 385, col 22.
-            write(u''';
-  if (_isPrecisionDouble)
-    _inputfield_''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 387, col 17
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 387, col 17.
-            write(u''' = _inputData[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 387, col 41
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 387, col 41.
-            write(u''']._doublePtr[_inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 387, col 83
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 387, col 83.
-            write(u'''];
-  else
-    _inputfield_''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 389, col 17
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 389, col 17.
-            write(u''' = _inputData[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 389, col 41
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 389, col 41.
-            write(u''']._floatPtr[_inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 389, col 82
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 389, col 82.
-            write(u'''];
-  
-  if (abs(_inputfield_''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 391, col 23
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 391, col 23.
-            write(u''' - ''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 391, col 36
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 391, col 36.
-            write(u''') > 0.1*_dimDelta[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'${dimensionNumber}' on line 391, col 64
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimensionNumber}')) # from line 391, col 64.
-            write(u'''])
-    // This only happens if your input field grid does not exactly match up with the simulation grid.
-    // _LOG will cause the simulation to exit
-''')
-            dimRepTypeFormat = {'real': 'e', 'long': 'li'}[dimRep.type]
-            write(u'''    _LOG(_ERROR_LOG_LEVEL, "The input field coordinate in the \'''')
-            _v = VFFSL(SL,"dimName",True) # u'$dimName' on line 395, col 64
-            if _v is not None: write(_filter(_v, rawExpr=u'$dimName')) # from line 395, col 64.
-            write(u'''\' dimension does not match up with the field coordinate.\\n"
-                           "''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 396, col 29
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 396, col 29.
-            write(u''': %li, ''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 396, col 55
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 396, col 55.
-            write(u''': %''')
-            _v = VFFSL(SL,"dimRepTypeFormat",True) # u'${dimRepTypeFormat}' on line 396, col 68
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRepTypeFormat}')) # from line 396, col 68.
-            write(u''', _inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 396, col 100
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 396, col 100.
-            write(u''': %li, "
-                           "_inputfield_''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 397, col 41
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 397, col 41.
-            write(u''': %e, d''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 397, col 58
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 397, col 58.
-            write(u''': %e, diff/Delta: %e\\n",
-                           ''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 398, col 28
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 398, col 28.
-            write(u''', ''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 398, col 49
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 398, col 49.
-            write(u''', _inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 398, col 72
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 398, col 72.
-            write(u''',
-                           _inputfield_''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 399, col 40
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 399, col 40.
-            write(u''', (real)d''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 399, col 59
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 399, col 59.
-            write(u''', abs(_inputfield_''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 399, col 87
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 399, col 87.
-            write(u''' - ''')
-            _v = VFFSL(SL,"dimName",True) # u'${dimName}' on line 399, col 100
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimName}')) # from line 399, col 100.
-            write(u''')/_dimDelta[''')
-            _v = VFFSL(SL,"dimensionNumber",True) # u'$dimensionNumber' on line 399, col 122
-            if _v is not None: write(_filter(_v, rawExpr=u'$dimensionNumber')) # from line 399, col 122.
-            write(u''']);
-}
-
-_inputfield_index_pointer += _inputfield''')
-            _v = VFFSL(SL,"dimRep.loopIndex",True) # u'${dimRep.loopIndex}' on line 402, col 41
-            if _v is not None: write(_filter(_v, rawExpr=u'${dimRep.loopIndex}')) # from line 402, col 41.
-            _v = ''.join([''.join([u' * _inputLattice[',str(VFFSL(SL,"i",True)),u']']) for i in range(dimensionNumber + 1, len(VFFSL(SL,"vector.field.dimensions",True)))]) # u"${''.join([c' * _inputLattice[$i]' for i in range(dimensionNumber + 1, len($vector.field.dimensions))])}" on line 402, col 60
-            if _v is not None: write(_filter(_v, rawExpr=u"${''.join([c' * _inputLattice[$i]' for i in range(dimensionNumber + 1, len($vector.field.dimensions))])}")) # from line 402, col 60.
-            write(u''';
-
-''')
-        write(u'''
-
-double _value;
-if (_inputfield_index_pointer != _inputfield_old_index_pointer + 1)
-  fseeko(_inputFile, _binaryFileBaseOffset + (_componentInputIndices[_component] - _''')
-        _v = VFFSL(SL,"vector.field.name",True) # u'${vector.field.name}' on line 409, col 85
-        if _v is not None: write(_filter(_v, rawExpr=u'${vector.field.name}')) # from line 409, col 85.
-        write(u'''_ndims) * _vectorFieldSize
-                     + _unsignedLongSize + _inputfield_index_pointer * _realNumberSize, SEEK_SET);
-
-if (_isPrecisionDouble) {
-  fread(&_value, sizeof(double), 1, _inputFile);
-  if (!_dataEncodingIsNative)
-    _value = XMDSSwapDouble(_value);
-} else {
-  float _temp;
-  fread(&_temp, sizeof(float), 1, _inputFile);
-  if (!_dataEncodingIsNative)
-    _temp = XMDSSwapFloat(_temp);
-  _value = (double)_temp;
-}
-
-''')
-        if VFFSL(SL,"vector.type",True) == 'real': # generated from line 424, col 3
-            write(u'''_active_''')
-            _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 425, col 9
-            if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 425, col 9.
-            write(u'''[_''')
-            _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 425, col 23
-            if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 425, col 23.
-            write(u'''_index_pointer + _component] = (real)_value;
-''')
-        else: # generated from line 426, col 3
-            write(u'''reinterpret_cast<real*>(_active_''')
-            _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 427, col 33
-            if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 427, col 33.
-            write(u''')[2*_''')
-            _v = VFFSL(SL,"vector.id",True) # u'${vector.id}' on line 427, col 50
-            if _v is not None: write(_filter(_v, rawExpr=u'${vector.id}')) # from line 427, col 50.
-            write(u'''_index_pointer + _component] = (real)_value;
-''')
-        write(u'''  
-_ENDLOOP:;
-''')
-        # 
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-
-    def writeBody(self, **KWS):
-
-
-
-        ## CHEETAH: main method generated for this template
-        trans = KWS.get("trans")
-        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
-            trans = self.transaction # is None unless self.awake() was called
-        if not trans:
-            trans = DummyTransaction()
-            _dummyTrans = True
-        else: _dummyTrans = False
-        write = trans.response().write
-        SL = self._CHEETAH__searchList
-        _filter = self._CHEETAH__currentFilter
-        
-        ########################################
-        ## START - generated method body
-        
-        # 
-        # VectorInitialisationFromXSIL.tmpl
-        # 
-        # Created by Graham Dennis on 2008-03-14.
-        # 
-        # Copyright (c) 2008-2012, Graham Dennis
-        # 
-        # This program is free software: you can redistribute it and/or modify
-        # it under the terms of the GNU General Public License as published by
-        # the Free Software Foundation, either version 2 of the License, or
-        # (at your option) any later version.
-        # 
-        # This program is distributed in the hope that it will be useful,
-        # but WITHOUT ANY WARRANTY; without even the implied warranty of
-        # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-        # GNU General Public License for more details.
-        # 
-        # You should have received a copy of the GNU General Public License
-        # along with this program.  If not, see <http://www.gnu.org/licenses/>.
-        # 
-        write(u'''
-
-
-
-
-
-
-
-''')
-        # 
-        #   Initialise a vector
-        write(u'''
-
-
-''')
-        
-        ########################################
-        ## END - generated method body
-        
-        return _dummyTrans and trans.response().getvalue() or ""
-        
-    ##################################################
-    ## CHEETAH GENERATED ATTRIBUTES
-
-
-    _CHEETAH__instanceInitialized = False
-
-    _CHEETAH_version = __CHEETAH_version__
-
-    _CHEETAH_versionTuple = __CHEETAH_versionTuple__
-
-    _CHEETAH_genTime = __CHEETAH_genTime__
-
-    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
-
-    _CHEETAH_src = __CHEETAH_src__
-
-    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
-
-    uselib = ['xmds']
-
-    _mainCheetahMethod_for_VectorInitialisationFromXSIL= 'writeBody'
-
-## END CLASS DEFINITION
-
-if not hasattr(VectorInitialisationFromXSIL, '_initCheetahAttributes'):
-    templateAPIClass = getattr(VectorInitialisationFromXSIL, '_CHEETAH_templateClass', Template)
-    templateAPIClass._addCheetahPlumbingCodeToClass(VectorInitialisationFromXSIL)
-
-
-# CHEETAH was developed by Tavis Rudd and Mike Orr
-# with code, advice and input from many other volunteers.
-# For more information visit http://www.CheetahTemplate.org/
-
-##################################################
-## if run from command line:
-if __name__ == '__main__':
-    from Cheetah.TemplateCmdLineIface import CmdLineIface
-    CmdLineIface(templateObj=VectorInitialisationFromXSIL()).run()
-
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/xmds2.git



More information about the debian-science-commits mailing list