Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 44: Line 44:
  this.timeout= null;
  this.timeout= null;
  this.curtime= 0.0;
  this.curtime= 0.0;
 +
this.curstep= 0;
  this.canv= null;
  this.canv= null;
Line 243: Line 244:
  //Reset quantities, clear curves
  //Reset quantities, clear curves
  simulations[simid].curtime= 0;
  simulations[simid].curtime= 0;
 +
simulations[simid].curstep= 0;
  for(var i= 0 ; i < simulations[simid].molecules.length ; ++i)
  for(var i= 0 ; i < simulations[simid].molecules.length ; ++i)
  {
  {
Line 263: Line 265:
   }
   }
  }
  }
-
  document.getElementById('simbox_time_'+simid).innerHTML= 't = ' + simulations[simid].curtime.toPrecision(5);
+
  document.getElementById('simbox_time_'+simid).innerHTML= 't = ' + simulations[simid].curtime.toPrecision(5) + ' [step n°+'+simulations[simid].curstep+']';
}
}
Line 378: Line 380:
  sim.curtime += sim.timestep;
  sim.curtime += sim.timestep;
 +
sim.curstep++;
}
}

Revision as of 03:16, 3 August 2013