/[ascend]/branches/fprops2/test.py
ViewVC logotype

Diff of /branches/fprops2/test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 972 by johnpye, Tue Dec 19 07:55:02 2006 UTC revision 973 by johnpye, Tue Dec 19 10:48:38 2006 UTC
# Line 1  Line 1 
1  import unittest  import unittest
2  import ascpy  import ascpy
3  import math  import math
4  import os, subprocess  import os, subprocess, sys
5  import atexit  import atexit
6    
7  class Ascend(unittest.TestCase):  class Ascend(unittest.TestCase):
# Line 123  class TestLSODE(Ascend): Line 123  class TestLSODE(Ascend):
123          self.L.load('johnpye/zill.a4c')          self.L.load('johnpye/zill.a4c')
124          T = self.L.findType('zill')          T = self.L.findType('zill')
125          M = T.getSimulation('sim')          M = T.getSimulation('sim')
         M.build()  
126          M.setSolver(ascpy.Solver('QRSlv'))          M.setSolver(ascpy.Solver('QRSlv'))
127          I = ascpy.Integrator(M)          I = ascpy.Integrator(M)
128          I.setEngine('LSODE')          I.setEngine('LSODE')
# Line 137  class TestLSODE(Ascend): Line 136  class TestLSODE(Ascend):
136          M.run(T.getMethod('self_test'))          M.run(T.getMethod('self_test'))
137    
138      def testnewton(self):      def testnewton(self):
139            sys.stderr.write("STARTING TESTNEWTON\n")
140          self.L.load('johnpye/newton.a4c')          self.L.load('johnpye/newton.a4c')
141          T = self.L.findType('newton')          T = self.L.findType('newton')
142          M = T.getSimulation('sim')          M = T.getSimulation('sim')
# Line 210  class TestIDA(Ascend): Line 210  class TestIDA(Ascend):
210          self.L.load('johnpye/zill.a4c')          self.L.load('johnpye/zill.a4c')
211          T = self.L.findType('zill')          T = self.L.findType('zill')
212          M = T.getSimulation('sim')          M = T.getSimulation('sim')
         M.build()  
213          M.setSolver(ascpy.Solver('QRSlv'))          M.setSolver(ascpy.Solver('QRSlv'))
214          I = ascpy.Integrator(M)          I = ascpy.Integrator(M)
215          I.setEngine('IDA')          I.setEngine('IDA')

Legend:
Removed from v.972  
changed lines
  Added in v.973

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22