Esempio n. 1
0
		public bool IsInJoiningSectors(GridSector other)
		{
			if (((X + 1 >= other.X) &&
				 (X - 1 <= other.X)) &&
				((Y + 1 >= other.Y) &&
				 (Y - 1 <= other.Y)))
			{
				return true; 
			}
			else
			{
				return false; 
			}
		}
Esempio n. 2
0
		public Particle()
		{
			//	cout << "Particle allocated" << endl;
			TypeID = 0;
			m_Mass = 10;
			m_ParticleCollided = false;
			m_KineticEnergy = 0.0;
			m_VInCollisionFrame = 0.0;

			Position = new DPVector(0, 0);
			PositionLast = new DPVector(0, 0);
			Velocity = new DPVector(0, 0);
			VelocityLast = new DPVector(0, 0);
			Force = new DPVector(0, 0);
			ForceLast = new DPVector(0, 0);
			GridSector = new GridSector(); 

			xVelocityAutoCorrelationFunction = new List<double>(new double[ParticleEnsemble.VelocityAutoCorrelationLength]);  // this is the vector that will hold the particle's velocity autocorrelation function
            yVelocityAutoCorrelationFunction = new List<double>(new double[ParticleEnsemble.VelocityAutoCorrelationLength]);  // this is the vector that will hold the particle's velocity autocorrelation function
		}