Ejemplo n.º 1
0
             stats.sort_stats('cumulative')
             if Profiling.verbose:
                 stats.print_stats(30)
             stats.sort_stats('time')
             if Profiling.verbose:
                 stats.print_stats(30)
         else:
             ns = NumericalSolution.NS_base(so,pList,nList,sList,opts,simFlagsList)
             ns.calculateSolution(runName)
         log("Completed %s run number %i" %(so.name,runNumber))
         import gc
         log("Collecting garbage")
         gc.collect()
         log("Done with garbage")
         if comm.isMaster():
             Profiling.closeLog()
 if opts.viewer:
     if comm.isMaster():
         try:
             if vtkViewers.hasQt:
                 vtkViewers.g.app.exec_()
             for w in vtkViewers.windowDict.values():
                 w.compManager.StopServices()
             sys.exit()
         except:
             pass
     else:
         try:
             for w in vtkViewers.windowDict.values():
                 w.compManager.StartServices()
             sys.exit()
Ejemplo n.º 2
0
             if Profiling.verbose:
                 stats.print_stats(30)
             stats.sort_stats('time')
             if Profiling.verbose:
                 stats.print_stats(30)
         else:
             ns = NumericalSolution.NS_base(so, pList, nList, sList, opts,
                                            simFlagsList)
             ns.calculateSolution(runName)
         log("Completed %s run number %i" % (so.name, runNumber))
         import gc
         log("Collecting garbage")
         gc.collect()
         log("Done with garbage")
         if comm.isMaster():
             Profiling.closeLog()
 if opts.viewer:
     if comm.isMaster():
         try:
             if vtkViewers.hasQt:
                 vtkViewers.g.app.exec_()
             for w in list(vtkViewers.windowDict.values()):
                 w.compManager.StopServices()
             sys.exit()
         except:
             pass
     else:
         try:
             for w in list(vtkViewers.windowDict.values()):
                 w.compManager.StartServices()
             sys.exit()