Beispiel #1
0
// Main simulation function
//
void omp_one_step_move (sotl_device_t *dev)
{
  // Apply gravity force
  //
  if (gravity_enabled)
    omp_gravity (dev);

  // Compute interactions between atoms
  //
  if (force_enabled)
    omp_force (dev);

  // Bounce on borders
  //
  if(borders_enabled)
    omp_bounce (dev);

  // Update positions
  //
  omp_move (dev);

#ifdef HAVE_LIBGL
  // Update OpenGL position
  //
  if (dev->display)
    omp_update_vbo (dev);
#endif
}
Beispiel #2
0
// Main simulation function
//
void omp_one_step_move (sotl_device_t *dev)
{
    // Sort positions
    /* Tri par Z: */
//    sotl_atom_set_t *set = get_global_atom_set();
//    atom_set_sort(set);
    /* Tri par boites :*/
    atom_box_sort(dev);

    // Apply gravity force
    //
    if (gravity_enabled)
        omp_gravity (dev);

    // Compute interactions between atoms
    //
    if (force_enabled)
        omp_force (dev);

    // Bounce on borders
    //
    if(borders_enabled)
        omp_bounce (dev);

    // Update positions
    //
    omp_move (dev);
    n++;


#ifdef HAVE_LIBGL
    // Update OpenGL position
    //
    if (dev->display)
        omp_update_vbo (dev);
#endif
}