/[ascend]/trunk/pygtk/interface/simulation.cpp
ViewVC logotype

Diff of /trunk/pygtk/interface/simulation.cpp

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

revision 296 by johnpye, Thu Feb 16 08:10:24 2006 UTC revision 297 by johnpye, Fri Feb 17 01:51:19 2006 UTC
# Line 513  Simulation::getInstanceName(const Instan Line 513  Simulation::getInstanceName(const Instan
513            
514  void  void
515  Simulation::processVarStatus(){  Simulation::processVarStatus(){
     if(!sys)throw runtime_error("Not yet build");  
516    
517      // this is a cheap function call:      // this is a cheap function call:
518      const mtx_block_t *bb = slv_get_solvers_blocks(getSystem());      const mtx_block_t *bb = slv_get_solvers_blocks(getSystem());
519    
520      var_variable **vlist = slv_get_solvers_var_list(getSystem());      var_variable **vlist = slv_get_solvers_var_list(getSystem());
521      int nvars = slv_get_num_solvers_vars(getSystem());      int nvars = slv_get_num_solvers_vars(getSystem());
522    
523      slv_status_t status;      slv_status_t status;
524      slv_get_status(getSystem(), &status);      slv_get_status(getSystem(), &status);
525    
526        if(status.block.number_of == 0){
527            cerr << "Variable statuses can't be set: block structure not yet determined." << endl;
528            return;
529        }
530    
531      int activeblock = status.block.current_block;      int activeblock = status.block.current_block;
532      int low = bb->block[activeblock].col.low;      int low = bb->block[activeblock].col.low;
533      int high = bb->block[activeblock].col.high;      int high = bb->block[activeblock].col.high;

Legend:
Removed from v.296  
changed lines
  Added in v.297

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