Exemple #1
0
 public void AddVirtualParticlePeriodicBoundaries(Aggregate aggregate, double maxRadius, BoxDimension xDim, BoxDimension yDim)
 {
     foreach (var primaryParticle in aggregate.GetPrimaryParticles())
     {
         var virtualParticle = GetVirtualParticle(primaryParticle);
         CheckPeriodicBoundary(virtualParticle, primaryParticle.Position.X, maxRadius, xDim);
         CheckPeriodicBoundary(virtualParticle, primaryParticle.Position.Y, maxRadius, yDim);
     }
 }
Exemple #2
0
 private void CheckPeriodicBoundary(PrimaryParticle virtualParticle, double oneDPosition, double maxRadius, BoxDimension dim)
 {
     if (oneDPosition + virtualParticle.Radius >= dim.Upper - maxRadius)
     {
         virtualParticle.Position.X -= dim.Width;
         AddParticlesToNeighborsList(virtualParticle);
     }
     else if (oneDPosition - virtualParticle.Radius <= dim.Lower + maxRadius)
     {
         virtualParticle.Position.X += dim.Width;
         AddParticlesToNeighborsList(virtualParticle);
     }
 }
Exemple #3
0
 public AbsoluteTetragonalSimulationBox(double width)
 {
     XDim = new BoxDimension(-0.5 * width, 0.5 * width);
     YDim = new BoxDimension(-0.5 * width, 0.5 * width);
     ZDim = new BoxDimension(0, 0);
 }