Added job number as a property of DipolarGas class.
This commit is contained in:
		
							parent
							
								
									263805dd7a
								
							
						
					
					
						commit
						d0849a8680
					
				| @ -24,6 +24,7 @@ OptionsStruct.TimeStepSize            = 50E-6;                    % in s | |||||||
| OptionsStruct.NumberOfTimeSteps       = 100;                      % in s | OptionsStruct.NumberOfTimeSteps       = 100;                      % in s | ||||||
| OptionsStruct.EnergyTolerance         = 5E-10; | OptionsStruct.EnergyTolerance         = 5E-10; | ||||||
| 
 | 
 | ||||||
|  | OptionsStruct.JobNumber               = 6; | ||||||
| OptionsStruct.SaveData                = true; | OptionsStruct.SaveData                = true; | ||||||
| OptionsStruct.SaveDirectory           = './Data'; | OptionsStruct.SaveDirectory           = './Data'; | ||||||
| options                               = Helper.convertstruct2cell(OptionsStruct); | options                               = Helper.convertstruct2cell(OptionsStruct); | ||||||
| @ -31,7 +32,7 @@ clear OptionsStruct | |||||||
| 
 | 
 | ||||||
| sim            = Simulator.DipolarGas(options{:}); | sim            = Simulator.DipolarGas(options{:}); | ||||||
| pot            = Simulator.Potentials(options{:}); | pot            = Simulator.Potentials(options{:}); | ||||||
| sim.Potential  = pot.trap(); % + pot.repulsive_stirrer(); | sim.Potential  = pot.trap(); % + pot.repulsive_chopstick(); | ||||||
| 
 | 
 | ||||||
| %-% Run Simulation %-% | %-% Run Simulation %-% | ||||||
| [Params, Transf, psi, V, VDk] = sim.run(); | [Params, Transf, psi, V, VDk] = sim.run(); | ||||||
|  | |||||||
| @ -22,6 +22,7 @@ classdef DipolarGas < handle & matlab.mixin.Copyable | |||||||
| 
 | 
 | ||||||
|         %Flags |         %Flags | ||||||
|          |          | ||||||
|  |         JobNumber; | ||||||
|         DebugMode; |         DebugMode; | ||||||
|         DoSave; |         DoSave; | ||||||
|         SaveDirectory; |         SaveDirectory; | ||||||
| @ -61,6 +62,8 @@ classdef DipolarGas < handle & matlab.mixin.Copyable | |||||||
|                 @(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));   |                 @(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));   | ||||||
|             addParameter(p, 'MinimumTimeStepSize',   1e-6,... |             addParameter(p, 'MinimumTimeStepSize',   1e-6,... | ||||||
|                 @(x) assert(isnumeric(x) && isscalar(x) && (x > 0))); |                 @(x) assert(isnumeric(x) && isscalar(x) && (x > 0))); | ||||||
|  |             addParameter(p, 'JobNumber',                1,... | ||||||
|  |                 @(x) assert(isnumeric(x) && isscalar(x) && (x > 0))); | ||||||
|             addParameter(p, 'DebugMode',        false,... |             addParameter(p, 'DebugMode',        false,... | ||||||
|                 @islogical); |                 @islogical); | ||||||
|             addParameter(p, 'SaveData',         false,... |             addParameter(p, 'SaveData',         false,... | ||||||
| @ -84,6 +87,7 @@ classdef DipolarGas < handle & matlab.mixin.Copyable | |||||||
|             this.EnergyTolerance      = p.Results.EnergyTolerance; |             this.EnergyTolerance      = p.Results.EnergyTolerance; | ||||||
|             this.MinimumTimeStepSize  = p.Results.MinimumTimeStepSize; |             this.MinimumTimeStepSize  = p.Results.MinimumTimeStepSize; | ||||||
|              |              | ||||||
|  |             this.JobNumber            = p.Results.JobNumber; | ||||||
|             this.DebugMode            = p.Results.DebugMode; |             this.DebugMode            = p.Results.DebugMode; | ||||||
|             this.DoSave               = p.Results.SaveData; |             this.DoSave               = p.Results.SaveData; | ||||||
|             this.SaveDirectory        = p.Results.SaveDirectory; |             this.SaveDirectory        = p.Results.SaveDirectory; | ||||||
|  | |||||||
| @ -50,7 +50,7 @@ function [Params] = setupParameters(this) | |||||||
|                                                       % even though the solution is good, this just stops it going on forever |                                                       % 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.mindt   = this.MinimumTimeStepSize;   % Minimum size for a time step using adaptive dt | ||||||
| 
 | 
 | ||||||
|     Params.njob    = 6; |     Params.njob    = this.JobNumber; | ||||||
|       |       | ||||||
|     % ================ Parameters defined by those above ================ % |     % ================ Parameters defined by those above ================ % | ||||||
|      |      | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user