Cosmetic changes only.

This commit is contained in:
Karthik 2021-07-14 20:07:40 +02:00
parent 039b1c36ec
commit b5f9a1b44a

View File

@ -2,24 +2,23 @@ function [LoadingRate, StandardError, ConfidenceInterval] = runSimulation(this)
%% - Sampling for initial positions and velocities
% - sampling the position distribution
this.InitialPositions = this.initialPositionSampling();
Positions = this.initialPositionSampling();
% - sampling the velocity distribution
this.InitialVelocities = this.initialVelocitySampling();
Velocities = this.initialVelocitySampling();
%% Solve ODE
progressbar = Helper.parforNotifications();
progressbar.PB_start(this.NumberOfAtoms,'Message',['Simulating capture process for ' num2str(this.NumberOfAtoms,'%.0f') ' atoms:']);
% calculate the final position of the atoms
ParticleDynamicalQuantities = zeros(this.NumberOfAtoms,int64(this.SimulationTime/this.TimeStep),6);
Positions = this.InitialPositions;
Velocities = this.InitialVelocities;
DynamicalQuantities = zeros(this.NumberOfAtoms,int64(this.SimulationTime/this.TimeStep),6);
parfor Index = 1:this.NumberOfAtoms
ParticleDynamicalQuantities(Index,:, :) = this.solver(Positions(Index,:), Velocities(Index,:));
DynamicalQuantities(Index,:, :) = this.solver(Positions(Index,:), Velocities(Index,:));
progressbar.PB_iterate();
end
clear Index
this.ParticleDynamicalQuantities = DynamicalQuantities;
%% Calculate the Loading Rate
[LoadingRate, StandardError, ConfidenceInterval] = this.calculateLoadingRate(ParticleDynamicalQuantities);
[LoadingRate, StandardError, ConfidenceInterval] = this.calculateLoadingRate();
end