Exemplo n.º 1
0
 GlobalEvent
 GWaker::getEvent(const Particle& part) const
 {
   if (part.testState(Particle::DYNAMIC))
     return GlobalEvent(part,  HUGE_VAL, NONE, *this);
   else
     return GlobalEvent(part, _wakeTime, WAKEUP, *this);
 }
Exemplo n.º 2
0
  GlobalEvent 
  GPBCSentinel::getEvent(const Particle& part) const
  {
    return GlobalEvent(part, Sim->dynamics
		       ->getPBCSentinelTime(part, maxintdist),
		       VIRTUAL, *this);
  }
Exemplo n.º 3
0
  GlobalEvent 
  GSOCells::getEvent(const Particle& part) const
  {
#ifdef ISSS_DEBUG
    if (!Sim->dynamics->isUpToDate(part))
      M_throw() << "Particle is not up to date";
#endif

    //This 
    //Sim->dynamics->updateParticle(part);
    //is not required as we compensate for the delay using 
    //Sim->dynamics->getParticleDelay(part)

    Vector CellOrigin;
    size_t ID(part.getID());

    for (size_t iDim(0); iDim < NDIM; ++iDim)
      {
	CellOrigin[iDim] = (ID % cuberootN) * cellDimension[iDim] - 0.5*Sim->primaryCellSize[iDim];
	ID /= cuberootN;
      }

    return GlobalEvent(part,
		       Sim->dynamics->
		       getSquareCellCollision2
		       (part, CellOrigin,
			cellDimension)
		       -Sim->dynamics->getParticleDelay(part),
		       CELL, *this);
  }
Exemplo n.º 4
0
  GlobalEvent 
  GParabolaSentinel::getEvent(const Particle& part) const
  {
    Sim->dynamics.getLiouvillean().updateParticle(part);

    return GlobalEvent(part, Sim->dynamics.getLiouvillean()
		       .getParabolaSentinelTime(part), 
		       VIRTUAL, *this);
  }
Exemplo n.º 5
0
  GlobalEvent 
  GParabolaSentinel::getEvent(const Particle& part) const
  {
    Sim->dynamics->updateParticle(Sim->particles[part.getID()]);

    return GlobalEvent(part, Sim->dynamics
		       ->getParabolaSentinelTime(part), 
		       RECALCULATE_PARABOLA, *this);
  }
Exemplo n.º 6
0
  GlobalEvent 
  GCellsShearing::getEvent(const Particle& part) const
  {
#ifdef ISSS_DEBUG
    if (!Sim->dynamics->isUpToDate(part))
      M_throw() << "Particle is not up to date";
#endif

    //We do not inherit GCells get Event as the calcPosition thing done
    //for infinite systems is breaking it for shearing for some reason.
    return GlobalEvent(part,
		       Sim->dynamics->
		       getSquareCellCollision2
		       (part, calcPosition(partCellData[part.getID()]), 
			cellDimension)
		       - Sim->dynamics->getParticleDelay(part),
		       CELL, *this);
  }