Demo entry 6350232

timestep-c

   

Submitted by anonymous on Mar 08, 2017 at 23:33
Language: C. Code size: 438 Bytes.

double timestep(SimFlat* s, int nSteps, real_t dt)
{
   for (int ii=0; ii<nSteps; ++ii)
   {
      advanceVelocity(s, s->boxes->nLocalBoxes, 0.5*dt); 

      advancePosition(s, s->boxes->nLocalBoxes, dt);

      updateHost(s);

      redistributeAtoms(s);

      updateGPU(s);

      computeForce(s);

      advanceVelocity(s, s->boxes->nLocalBoxes, 0.5*dt); 
   }

   kineticEnergy(s);

   return s->ePotential;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).