/[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 771 by johnpye, Fri Jul 14 03:35:16 2006 UTC revision 772 by johnpye, Fri Jul 14 06:03:47 2006 UTC
# Line 655  class Browser: Line 655  class Browser:
655          try:          try:
656              if self.sim.check():              if self.sim.check():
657                  self.reporter.reportNote("System check OK")                  self.reporter.reportNote("System check OK")
658              self.sim.checkDoF()              if self.sim.checkDoF():
659                    self.reporter.reportNode("System DoF check OK")
660                else:
661                    sing = self.sim.getSingularityInfo()
662                    title = "Structural singularity"
663                    text = title
664                    text += "\n\nThe singularity can be reduced by freeing the following variables:"
665                    msgs = {
666                        "The singularity can be reduced by freeing the following variables" : sing.freeablevars
667                        ,"Relations involved in the structural singularity" : sing.rels
668                        ,"Variables involved in the structural singularity" : sing.vars
669                    }
670                    for k,v in msgs.iteritems():
671                        text+="\n\n%s:" % k
672                        if len(v):
673                            _l = [j.getName() for j in v]
674                            _l.sort()
675                            text+= "\n\t" + "\n\t".join(_l)
676                        else:
677                            text += "\nnone"
678    
679                    _dialog = InfoDialog(self,self.window,text,title)
680                    _dialog.run()
681    
682                    self.reporter.reportError("System DoF check failed")
683          except RuntimeError, e:          except RuntimeError, e:
684              self.stop_waiting()              self.stop_waiting()
685              self.reporter.reportError(str(e))              self.reporter.reportError(str(e))

Legend:
Removed from v.771  
changed lines
  Added in v.772

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