diff --git a/Dipolar Gas Simulator/+Scripts/test.m b/Dipolar Gas Simulator/+Scripts/test.m index a00acea..67dcdf1 100644 --- a/Dipolar Gas Simulator/+Scripts/test.m +++ b/Dipolar Gas Simulator/+Scripts/test.m @@ -24,6 +24,7 @@ OptionsStruct.TimeStepSize = 50E-6; % in s OptionsStruct.NumberOfTimeSteps = 100; % in s OptionsStruct.EnergyTolerance = 5E-10; +OptionsStruct.JobNumber = 6; OptionsStruct.SaveData = true; OptionsStruct.SaveDirectory = './Data'; options = Helper.convertstruct2cell(OptionsStruct); @@ -31,7 +32,7 @@ clear OptionsStruct sim = Simulator.DipolarGas(options{:}); pot = Simulator.Potentials(options{:}); -sim.Potential = pot.trap(); % + pot.repulsive_stirrer(); +sim.Potential = pot.trap(); % + pot.repulsive_chopstick(); %-% Run Simulation %-% [Params, Transf, psi, V, VDk] = sim.run(); diff --git a/Dipolar Gas Simulator/+Simulator/@DipolarGas/DipolarGas.m b/Dipolar Gas Simulator/+Simulator/@DipolarGas/DipolarGas.m index e9a791e..69b1e3a 100644 --- a/Dipolar Gas Simulator/+Simulator/@DipolarGas/DipolarGas.m +++ b/Dipolar Gas Simulator/+Simulator/@DipolarGas/DipolarGas.m @@ -22,6 +22,7 @@ classdef DipolarGas < handle & matlab.mixin.Copyable %Flags + JobNumber; DebugMode; DoSave; SaveDirectory; @@ -61,6 +62,8 @@ classdef DipolarGas < handle & matlab.mixin.Copyable @(x) assert(isnumeric(x) && isscalar(x) && (x > 0))); addParameter(p, 'MinimumTimeStepSize', 1e-6,... @(x) assert(isnumeric(x) && isscalar(x) && (x > 0))); + addParameter(p, 'JobNumber', 1,... + @(x) assert(isnumeric(x) && isscalar(x) && (x > 0))); addParameter(p, 'DebugMode', false,... @islogical); addParameter(p, 'SaveData', false,... @@ -84,6 +87,7 @@ classdef DipolarGas < handle & matlab.mixin.Copyable this.EnergyTolerance = p.Results.EnergyTolerance; this.MinimumTimeStepSize = p.Results.MinimumTimeStepSize; + this.JobNumber = p.Results.JobNumber; this.DebugMode = p.Results.DebugMode; this.DoSave = p.Results.SaveData; this.SaveDirectory = p.Results.SaveDirectory; diff --git a/Dipolar Gas Simulator/+Simulator/@DipolarGas/setupParameters.m b/Dipolar Gas Simulator/+Simulator/@DipolarGas/setupParameters.m index 6d780ff..c7c7e25 100644 --- a/Dipolar Gas Simulator/+Simulator/@DipolarGas/setupParameters.m +++ b/Dipolar Gas Simulator/+Simulator/@DipolarGas/setupParameters.m @@ -50,7 +50,7 @@ function [Params] = setupParameters(this) % even though the solution is good, this just stops it going on forever Params.mindt = this.MinimumTimeStepSize; % Minimum size for a time step using adaptive dt - Params.njob = 6; + Params.njob = this.JobNumber; % ================ Parameters defined by those above ================ %