/[ascend]/trunk/pygtk/gtkbrowser.py
ViewVC logotype

Diff of /trunk/pygtk/gtkbrowser.py

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

revision 899 by johnpye, Tue Oct 24 00:12:34 2006 UTC revision 900 by johnpye, Wed Oct 25 06:03:04 2006 UTC
# Line 522  class Browser: Line 522  class Browser:
522  #   SOLVER LIST  #   SOLVER LIST
523    
524      def set_solver(self,solvername):      def set_solver(self,solvername):
525            """ this sets the active solver in the GUI, which is the default applied to newly instantiated models """
526          self.solver = ascpy.Solver(solvername)          self.solver = ascpy.Solver(solvername)
527          self.prefs.setStringPref("Solver","engine",solvername)          self.prefs.setStringPref("Solver","engine",solvername)
528          self.reporter.reportNote("Set solver engine to '%s'" % solvername)          self.reporter.reportNote("Set solver engine to '%s'" % solvername)
# Line 627  class Browser: Line 628  class Browser:
628              ascpy.getCompiler().setUseRelationSharing(_v)              ascpy.getCompiler().setUseRelationSharing(_v)
629    
630              self.sim = type_object.getSimulation(str(type_object.getName())+"_sim")              self.sim = type_object.getSimulation(str(type_object.getName())+"_sim")
631    
632                self.reporter.reportNote("SIMULATION ASSIGNED")
633          except RuntimeError, e:          except RuntimeError, e:
634              self.stop_waiting()              self.stop_waiting()
635              self.reporter.reportError(str(e))              self.reporter.reportError(str(e))
# Line 643  class Browser: Line 646  class Browser:
646          except RuntimeError, e:          except RuntimeError, e:
647              self.stop_waiting()              self.stop_waiting()
648              self.reporter.reportError(str(e))              self.reporter.reportError(str(e))
649              return;              return
650    
651          print "DONE BUILDING"          print "DONE BUILDING"
652          self.stop_waiting()          self.stop_waiting()
653    
654          self.sim.setSolver(self.solver)          self.sim.setSolver(self.solver)
655    
656          # methods          self.start_waiting("Running default method...")
657    
658            try:
659                print "SIMULATION CREATED, RUNNING DEFAULT METHOD NOW..."
660                self.sim.runDefaultMethod()
661            except RuntimeError, e:
662                self.stop_waiting()
663                self.reporter.reportError(str(e))
664                return          
665    
666            self.stop_waiting()
667    
668            # get method names and load them into the GUI
669          self.methodstore.clear()          self.methodstore.clear()
670          _methods = self.sim.getType().getMethods()          _methods = self.sim.getType().getMethods()
671          _activemethod = None;          _activemethod = None;

Legend:
Removed from v.899  
changed lines
  Added in v.900

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