/[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 315 by johnpye, Thu Feb 23 07:40:47 2006 UTC revision 316 by johnpye, Thu Feb 23 07:49:27 2006 UTC
# Line 293  Simulation::getFixableVariables(){ Line 293  Simulation::getFixableVariables(){
293          throw runtime_error("Simulation system not yet built");          throw runtime_error("Simulation system not yet built");
294      }      }
295    
296      int32 **vip; /** TODO ensure 32 bit integers are used */      int32 *vip; /** TODO ensure 32 bit integers are used */
297    
298      // Get IDs of elegible variables in array at vip...      // Get IDs of elegible variables in array at vip...
299      if(!slvDOF_eligible(sys,vip)){      if(!slvDOF_eligible(sys,&vip)){
300          ERROR_REPORTER_NOLINE(ASC_USER_NOTE,"No fixable variables found.");          ERROR_REPORTER_NOLINE(ASC_USER_NOTE,"No fixable variables found.");
301      }else{      }else{
302          //cerr << "FIXABLE VARS FOUND" << endl;          //cerr << "FIXABLE VARS FOUND" << endl;
# Line 313  Simulation::getFixableVariables(){ Line 313  Simulation::getFixableVariables(){
313    
314          // iterate through this list until we find a -1:          // iterate through this list until we find a -1:
315          int i=0;          int i=0;
316          int var_index = (*vip)[i];          int var_index = vip[i];
317          while(var_index >= 0){          while(var_index >= 0){
318              //cerr << "FOUND VARIABLE var_index = " << var_index << endl;              //cerr << "FOUND VARIABLE var_index = " << var_index << endl;
319              struct var_variable *var = vp[var_index];              struct var_variable *var = vp[var_index];
# Line 323  Simulation::getFixableVariables(){ Line 323  Simulation::getFixableVariables(){
323              ascfree(var_name);              ascfree(var_name);
324              vars.push_back( Variable(this, var) );              vars.push_back( Variable(this, var) );
325              ++i;              ++i;
326              var_index = (*vip)[i];              var_index = vip[i];
327          }          }
328          ERROR_REPORTER_NOLINE(ASC_USER_NOTE,"Found %d fixable variables.",i);          ERROR_REPORTER_NOLINE(ASC_USER_NOTE,"Found %d fixable variables.",i);
329          //cerr << "END ELEGIBLE VARS LIST" << endl;          //cerr << "END ELEGIBLE VARS LIST" << endl;
330          ascfree(*vip);          ascfree(vip);
331          //cerr << "FREED VIP LIST" << endl;          //cerr << "FREED VIP LIST" << endl;
332      }      }
333    

Legend:
Removed from v.315  
changed lines
  Added in v.316

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