-
Notifications
You must be signed in to change notification settings - Fork 0
Compute_g1
The example is in the directory test/g1 with the parameter file params_g1_2d.dat.
The script prop/compute_prop.py can be used to propagate in time an initial state and can compute the g1 function.
I strongly recommend to use it from a directory which is not the one of the and-python repository (e.g. obtained using git).
Suppose you have created your local git repository by cloning the main one:
git clone git@github-and-python:delande/and-python.git
or created a local copy by any method you like, in the directory ~/git/and-python. Then, you copy the parameter file in a local directory:
cd your_local_directory
cp ~/git/and-python/prop/params_g1_2d.dat .
Then, the script can be simply ran using the command:
python ~/git/and-python/prop/compute_prop.py params_g1_2d.dat
or, if you want to use MPI:
mpiexec -n NN python ~/git/and-python/prop/compute_prop.py params_g1_2d.dat
where NN is the number of cores for the parallel computation.
If you have the message:
Warning, no chebyshev C library found, this uses the slow Python version!
this means that you do not use the fast C versions for some computations. This will of course slow down the calculation. If you are on a LKB machine, you should probably try to load the intel module using:
module load intel
and rerun the script.
Example
It corresponds to the data in Fig. 2 of T. Bardon-Brun et al, Phys. Rev. Research 2, 013297 (2020).
When running on a standard desktop computer on one core, it should print something like:
Python script runs on machine : meteor Name of python script: /home/delande/git/and-python/prop/compute_prop.py Name of parameter file: /home/delande/git/and-python/tests/g1/params_g1_2d.dat Python script started on: Fri Sep 16 10:23:20 2022 Total number of disorder realizations: 8 Number of processes: 1 Python script ended on: Fri Sep 16 10:23:33 2022 Wallclock time 12.695 seconds CHE time = 10.994 Max nonlinear phase = 0.183 Max order = 6 Expect time = 0.102 Dummy time = 1.531 Number of ops = 8.6016e+10 Total_CPU time = 12.695
The system size and the final time are slightly smaller than in the original figure, and the spatial discretization a bit too large, but the results are nevertheless good. To compare with the original figure, distances have to be multiplied by 0.158 and times divided by 2. g1 is computed at t=0, 100 and 200, which corresponds to z/zNL=0, 50, 100. You may view the 2d plot of (real part of) g1 using:
view_2d.py g1_intermediate_N.dat
with N=0, 1 or 2. You may compute an angular average using
my_extract_radial.py g1_intermediate_N.dat
and looking at the 1d data in g1_intermediate_N_Re_radial.dat
In this example, there is no disorder, the randomness is only in the initial state which is of type gaussian_with_speckle.