Calculations/Dipolar-Gas-Simulator/+Simulator/@DipolarGas/run.m

23 lines
783 B
Mathematica
Raw Normal View History

2024-06-18 19:01:35 +02:00
function [Params, Transf, psi,V,VDk] = run(this)
% --- Obtain simulation parameters ---
[Params] = this.setupParameters();
this.SimulationParameters = Params;
% --- Set up spatial grids and transforms ---
[Transf] = this.setupSpace(Params);
[TransfRad] = this.setupSpaceRadial(Params);
% --- Initialize ---
mkdir(sprintf(this.SaveDirectory))
[psi,V,VDk] = this.initialize(Params,Transf,TransfRad);
Observ.EVec = []; Observ.NormVec = []; Observ.PCVec = []; Observ.tVecPlot = []; Observ.mucVec = [];
t_idx = 1; % Start at t = 0;
Observ.res_idx = 1;
% --- Run Simulation ---
mkdir(sprintf('./Data/Run_%03i',Params.njob))
[psi] = this.propagateWavefunction(psi,Params,Transf,VDk,V,t_idx,Observ);
end