From b5f9a1b44aa3fe2b9c3bba831111d6dfb243dc15 Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Wed, 14 Jul 2021 20:07:40 +0200 Subject: [PATCH] Cosmetic changes only. --- .../@MOTSimulator/runSimulation.m | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/MOT Capture Process Simulation/@MOTSimulator/runSimulation.m b/MOT Capture Process Simulation/@MOTSimulator/runSimulation.m index e3fdad4..3ff2a4d 100644 --- a/MOT Capture Process Simulation/@MOTSimulator/runSimulation.m +++ b/MOT Capture Process Simulation/@MOTSimulator/runSimulation.m @@ -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 \ No newline at end of file