/[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 229 by johnpye, Fri Jan 27 14:55:43 2006 UTC revision 230 by johnpye, Sun Jan 29 07:16:06 2006 UTC
# Line 318  Simulation::solve(Solver solver){ Line 318  Simulation::solve(Solver solver){
318              lastupdate = tm_cpu_time();              lastupdate = tm_cpu_time();
319          }          }
320      }      }
321        double elapsed = tm_cpu_time() - starttime;
322    
323      if(status.ok){      if(status.ok){
324          cerr << "... DONE SOLVING SYSTEM" << endl;          cerr << "... DONE SOLVING SYSTEM" << endl;
# Line 325  Simulation::solve(Solver solver){ Line 326  Simulation::solve(Solver solver){
326          ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"Solver failed");          ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"Solver failed");
327      }      }
328    
329      cerr << "SOLVER PERFORMED " << status.iteration << " ITERATIONS IN " << (tm_cpu_time() - starttime) << "s" << endl;      cerr << "SOLVER PERFORMED " << status.iteration << " ITERATIONS IN " << elapsed << "s" << endl;
330    
331      if(status.iteration_limit_exceeded){      if(status.iteration_limit_exceeded){
332          ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"Exceeded interation limit");          ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"Exceeded interation limit");
333      }      }
334    
335      if(status.converged){      if(status.converged){
336          ERROR_REPORTER_NOLINE(ASC_USER_SUCCESS,"Solver converged: %d iterations, %3.2e s"          ERROR_REPORTER_NOLINE(ASC_USER_SUCCESS,"Solver converged: %d iterations (%.2f s)"
337              ,status.iteration,status.cpu_elapsed);              ,status.iteration,elapsed);
338      }else{      }else{
339          ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"Solver not converged after %d iterations.",status.iteration);          ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"Solver not converged after %d iterations (%.2f s).",status.iteration,elapsed);
340      }      }
341    
342  }  }

Legend:
Removed from v.229  
changed lines
  Added in v.230

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