181 |
M.run(self.L.findType('testlog10').getMethod('on_load')) |
M.run(self.L.findType('testlog10').getMethod('on_load')) |
182 |
if platform.system!="Windows": |
if platform.system!="Windows": |
183 |
f = file('temp.png','wb') |
f = file('temp.png','wb') |
184 |
|
# currently M.write is failing...JP 20120511. |
185 |
M.write(f,"dot") |
M.write(f,"dot") |
186 |
f.close() |
f.close() |
187 |
else: |
else: |
1496 |
H = ascpy.SolverHooks(ascpy.SolverReporter()) |
H = ascpy.SolverHooks(ascpy.SolverReporter()) |
1497 |
ascpy.SolverHooksManager_Instance().setHooks(H) |
ascpy.SolverHooksManager_Instance().setHooks(H) |
1498 |
T = self.L.findType('test1') |
T = self.L.findType('test1') |
1499 |
M = T.getSimulation('sim') |
M = T.getSimulation('sim',0) |
1500 |
print "\n\n\nRUNNING ON_LOAD EXPLICITLY NOW..." |
print "\n\n\nRUNNING ON_LOAD EXPLICITLY NOW..." |
1501 |
M.run(T.getMethod('on_load')) |
M.run(T.getMethod('on_load')) |
1502 |
|
|
1543 |
H = SolverHooksPython() |
H = SolverHooksPython() |
1544 |
ascpy.SolverHooksManager_Instance().setHooks(H) |
ascpy.SolverHooksManager_Instance().setHooks(H) |
1545 |
T = self.L.findType('test1') |
T = self.L.findType('test1') |
1546 |
M = T.getSimulation('sim') |
M = T.getSimulation('sim',1) |
1547 |
|
|
1548 |
# test some stuff for beam calculations |
# test some stuff for beam calculations |
1549 |
class TestSection(Ascend): |
class TestSection(Ascend): |