1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
<simulation xmds-version="2">
<name> nonlinear_SE </name>
<features>
<benchmark />
<auto_vectorise />
<globals>
<![CDATA[
real N = 10.0; // number of atoms
real g = 1.0; // nonlinear coupling
]]>
</globals>
</features>
<geometry>
<propagation_dimension> t </propagation_dimension>
<transverse_dimensions>
<dimension name="x" lattice="512"
domain="(-7, 7)" />
<dimension name="y" lattice="512"
domain="(-7, 7)" />
</transverse_dimensions>
</geometry>
<vector name="potential" type="real">
<components> V </components>
<initialisation>
<![CDATA[
V = 0.5*(x*x + y*y);
]]>
</initialisation>
</vector>
<vector name="wavefunction" type="complex">
<components> psi </components>
<initialisation>
<![CDATA[
psi = sqrt(N) * pow(M_PI, -0.25) * exp(-(x*x + y*y)/2);
]]>
</initialisation>
</vector>
<sequence>
<integrate algorithm="ARK45" interval="6.28"
tolerance="1e-5">
<samples> 50 </samples>
<operators>
<operator kind="ip">
<operator_names> T </operator_names>
<![CDATA[
T = -i * 0.5 * (kx * kx + ky * ky);
]]>
</operator>
<integration_vectors>
wavefunction
</integration_vectors>
<dependencies> potential </dependencies>
<![CDATA[
dpsi_dt = T[psi] - i * (V + g * mod2(psi)) * psi;
]]>
</operators>
</integrate>
</sequence>
<output format="hdf5">
<sampling_group initial_sample="yes" basis="x y">
<dependencies> wavefunction </dependencies>
<moments> psireal psiimag </moments>
<![CDATA[
psireal = Re(psi);
psiimag = Im(psi);
]]>
</sampling_group>
</output>
</simulation>
|