Cosmetic changes only.

This commit is contained in:
Karthik 2021-07-14 20:04:54 +02:00
parent 411375b464
commit 6d161ceede

View File

@ -1,7 +1,8 @@
function [LoadingRate, StandardError, ConfidenceInterval] = calculateLoadingRate(this, ParticleDynamicalQuantities) function [LoadingRate, StandardError, ConfidenceInterval] = calculateLoadingRate(this)
switch this.SimulationMode switch this.SimulationMode
case "2D" case "2D"
n = this.NumberOfAtoms; n = this.NumberOfAtoms;
DynamicalQuantities = this.ParticleDynamicalQuantities;
NumberOfTimeSteps = int64(this.SimulationTime/this.TimeStep); NumberOfTimeSteps = int64(this.SimulationTime/this.TimeStep);
NumberOfLoadedAtoms = zeros(1, NumberOfTimeSteps); NumberOfLoadedAtoms = zeros(1, NumberOfTimeSteps);
TimeCounts = zeros(1, n); TimeCounts = zeros(1, n);
@ -9,7 +10,7 @@ function [LoadingRate, StandardError, ConfidenceInterval] = calculateLoadingRate
% Include the stochastic process of background collisions % Include the stochastic process of background collisions
for AtomIndex = 1:n for AtomIndex = 1:n
TimeCounts(AtomIndex) = this.computeTimeSpentInInteractionRegion(squeeze(ParticleDynamicalQuantities(AtomIndex,:,1:3))); TimeCounts(AtomIndex) = this.computeTimeSpentInInteractionRegion(squeeze(DynamicalQuantities(AtomIndex,:,1:3)));
end end
this.TimeSpentInInteractionRegion = mean(TimeCounts); this.TimeSpentInInteractionRegion = mean(TimeCounts);
for AtomIndex = 1:n for AtomIndex = 1:n
@ -22,8 +23,8 @@ function [LoadingRate, StandardError, ConfidenceInterval] = calculateLoadingRate
NumberOfLoadedAtoms(TimeIndex) = NumberOfLoadedAtoms(TimeIndex-1); NumberOfLoadedAtoms(TimeIndex) = NumberOfLoadedAtoms(TimeIndex-1);
end end
for AtomIndex = 1:n for AtomIndex = 1:n
Position = squeeze(ParticleDynamicalQuantities(AtomIndex, TimeIndex, 1:3))'; Position = squeeze(DynamicalQuantities(AtomIndex, TimeIndex, 1:3))';
Velocity = squeeze(ParticleDynamicalQuantities(AtomIndex, TimeIndex, 4:6))'; Velocity = squeeze(DynamicalQuantities(AtomIndex, TimeIndex, 4:6))';
if this.exitCondition(Position, Velocity, CollisionEvents(AtomIndex)) if this.exitCondition(Position, Velocity, CollisionEvents(AtomIndex))
NumberOfLoadedAtoms(TimeIndex) = NumberOfLoadedAtoms(TimeIndex) + 1; NumberOfLoadedAtoms(TimeIndex) = NumberOfLoadedAtoms(TimeIndex) + 1;
end end