Skip to content

Commit

Permalink
Remove initialisation of sampler arrays - not required now due to use…
Browse files Browse the repository at this point in the history
… of mask.
  • Loading branch information
ElliotB256 committed Feb 10, 2021
1 parent 3e1e369 commit 7d0f52d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 39 deletions.
4 changes: 2 additions & 2 deletions matlab/benchmark.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
thread_numbers = 1:1:6;
thread_atom_numbers = 10.^[2:0.5:6];
atom_numbers = 10.^[0:0.5:6];
steps = 5e3;
steps = 5e2;

% Run once to force compilation.
bench(10, 1, steps);
Expand Down Expand Up @@ -50,7 +50,7 @@
set(gca, 'XTick', 1:12);
set(gca, 'YScale', 'log');
xlim([1 6]);
labels = arrayfun(@(x) [num2str(x) ' atoms'], thread_atom_numbers, 'UniformOutput', 0);
%labels = arrayfun(@(x) [num2str(x) ' atoms'], thread_atom_numbers, 'UniformOutput', 0);
legend(labels, 'Interpreter', 'Latex');

% Render to file
Expand Down
40 changes: 3 additions & 37 deletions src/laser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn add_systems_to_dispatch(
builder: DispatcherBuilder<'static, 'static>,
deps: &[&str],
) -> DispatcherBuilder<'static, 'static> {
let mut builder = builder
let builder = builder
.with(
AttachLaserComponentsToNewlyCreatedAtomsSystem,
"attach_atom_laser_components",
Expand All @@ -114,39 +114,6 @@ pub fn add_systems_to_dispatch(
"initialise_laser_sampler_masks",
deps,
)
.with(
intensity::InitialiseLaserIntensitySamplersSystem,
"initialise_laser_intensity",
deps,
)
.with(
doppler::InitialiseDopplerShiftSamplersSystem,
"initialise_doppler_shift",
deps,
)
.with(
sampler::InitialiseLaserDetuningSamplersSystem,
"initialise_laser_detuning",
deps,
)
.with(
rate::InitialiseRateCoefficientsSystem,
"initialise_rate_coefficient",
deps,
)
.with(
photons_scattered::InitialiseExpectedPhotonsScatteredVectorSystem,
"initialise_expected_photons",
deps,
)
.with(
photons_scattered::InitialiseActualPhotonsScatteredVectorSystem,
"initialise_actual_photons",
deps,
);
// We add a barrier here because the calculations should only start once all components are initialized.
//builder.add_barrier();
builder = builder
.with(
sampler::FillLaserSamplerMasksSystem,
"fill_laser_sampler_masks",
Expand All @@ -155,18 +122,17 @@ pub fn add_systems_to_dispatch(
.with(
intensity::SampleLaserIntensitySystem,
"sample_laser_intensity",
&["initialise_laser_intensity", "index_cooling_lights"],
&["index_cooling_lights"],
)
.with(
doppler::CalculateDopplerShiftSystem,
"calculate_doppler_shift",
&["initialise_doppler_shift", "index_cooling_lights"],
&["index_cooling_lights"],
)
.with(
sampler::CalculateLaserDetuningSystem,
"calculate_laser_detuning",
&[
"initialise_laser_detuning",
"calculate_doppler_shift",
"zeeman_shift",
"index_cooling_lights",
Expand Down

0 comments on commit 7d0f52d

Please sign in to comment.