simulations/isam/isam/isam.cpp
/**
 * Save statistics for each time step for external visualization.
 */
Save statistics for each time step for external visualization.
Save statistics for each time step for external visualization .
void save_statistics(const string& fname) {
  ofstream out(fname.c_str(), ios::out | ios::binary);
  require(out, "Cannot open statistics file.");
  for (unsigned int i = 0; i < stats.size(); i++) {
    out << i << " " << stats[i].time << " " << stats[i].chi2 << " "
        << stats[i].nnz;
    out << " " << stats[i].local_chi2;
    out << " " << stats[i].nconstraints << " " << stats[i].nnodes;
    out << endl;
  }
  out.close();
}
void save_statistics ( const string & fname ) { ofstream out ( fname . c_str ( ) , ios :: out | ios :: binary ) ; require ( out , " " ) ; for ( unsigned int i = 0 ; i < stats . size ( ) ; i ++ ) { out << i << " " << stats [ i ] . time << " " << stats [ i ] . chi2 << " " << stats [ i ] . nnz ; out << " " << stats [ i ] . local_chi2 ; out << " " << stats [ i ] . nconstraints << " " << stats [ i ] . nnodes ; out << endl ; } out . close ( ) ; }
Save statistics for each time step for external visualization.
Save statistics for each time step for external visualization .