/[ascend]/trunk/test.py
ViewVC logotype

Diff of /trunk/test.py

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

revision 1253 by johnpye, Sat Jan 27 09:05:53 2007 UTC revision 1254 by johnpye, Sat Jan 27 10:50:40 2007 UTC
# Line 850  class TestIDADENSE(Ascend): Line 850  class TestIDADENSE(Ascend):
850          I.setMaxSubSteps(10000)          I.setMaxSubSteps(10000)
851          I.analyse()          I.analyse()
852          I.solve()          I.solve()
853            for i in range(8):
854                print "y[%d] = %.20g" % (i+1, M.y[i+1])
855            M.run(T.getMethod('self_test'))
856    
857        def testtransamp(self):
858            self.L.load('test/transamp.a4c')
859            T = self.L.findType('transamp')
860            M = T.getSimulation('sim')
861            M.setSolver(ascpy.Solver('QRSlv'))
862            I = ascpy.Integrator(M)
863            I.setEngine('IDA')
864            I.setParameter('linsolver','DENSE')
865            I.setParameter('rtol',1e-7)
866            I.setParameter('atolvect',0)
867            I.setParameter('atol',1e-7)
868            I.setReporter(ascpy.IntegratorReporterConsole(I))
869            I.setLinearTimesteps(ascpy.Units("s"), 0.05, 0.2, 20)
870            I.setInitialSubStep(0.00001)
871            I.setMaxSubSteps(10000)
872            I.analyse()
873            I.solve()
874          for i in range(6):          for i in range(6):
875              print "y[%d] = %.20g" % (i+1, M.y[i+1])              print "y[%d] = %.20g" % (i+1, M.y[i+1])
876          M.run(T.getMethod('self_test'))          M.run(T.getMethod('self_test'))

Legend:
Removed from v.1253  
changed lines
  Added in v.1254

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