Skip to content

Instantly share code, notes, and snippets.

@Lucacalderaro
Lucacalderaro / harmonic_oscillator_imag.m
Created February 2, 2016 11:26
Find the ground state of the harmonic potential using GPELab
%% Setting the method and geometry
Computation = 'Ground';
Ncomponents = 1;
Type = 'BESP';
Deltat = 1e-4;
Stop_time = [];
Stop_crit = {'MaxNorm',1e-4};
Max_iter = 40000;
Method = Method_Var2d(Computation,Ncomponents, Type, Deltat, Stop_time , Stop_crit, Max_iter);
xmin = -7.07;
@Lucacalderaro
Lucacalderaro / harmonic_oscillator_real.m
Created February 2, 2016 11:31
Evolve the ground state of the harmonic oscillator using GPELab
%% Setting the method and geometry
Computation = 'Dynamic';
Ncomponents = 1;
Type = 'Relaxation';
Deltat = 1e-4;
Stop_time = 2;
Method = Method_Var2d(Computation,Ncomponents, Type, Deltat, Stop_time);
xmin = -7.07;
xmax = 7.07;