/[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 961 by johnpye, Mon Dec 11 14:04:13 2006 UTC revision 962 by johnpye, Mon Dec 11 14:43:02 2006 UTC
# Line 87  class Ascend(unittest.TestCase): Line 87  class Ascend(unittest.TestCase):
87      def testLSODE(self):      def testLSODE(self):
88          self._testIntegrator('LSODE')          self._testIntegrator('LSODE')
89    
90        def testnewton(self):
91            self.L.load('johnpye/newton.a4c')
92            T = self.L.findType('newton')
93            M = T.getSimulation('sim')
94            M.solve(ascpy.Solver("QRSlv"),ascpy.SolverReporter())  
95            I = ascpy.Integrator(M)
96            I.setEngine('LSODE')
97            I.setReporter(ascpy.IntegratorReporterConsole(I))
98            I.setLinearTimesteps(ascpy.Units("s"), 0, 20.0/9.8, 2);
99            I.analyse()
100            I.solve()
101            print "At end of simulation,"
102            print "x = %f" % M.sim.x
103            print "v = %f" % M.sim.v
104            M.run(T.getMethod('self_test'))
105    
106      def testlotka(self):      def testlotka(self):
107          self.L.load('johnpye/lotka.a4c')          self.L.load('johnpye/lotka.a4c')
108          M = self.L.findType('lotka').getSimulation('sim')          M = self.L.findType('lotka').getSimulation('sim')

Legend:
Removed from v.961  
changed lines
  Added in v.962

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