##### Description: 

This contains 2 FreeFem scripts used to produce data, and to prepare data for visualization processing.


This uses FreeFem++ library (under LGPL 3.0 license) that can be found at the following link: https://freefem.org/

Once FreeFem++ parallel mpi version is properly installed, the scripts can be ran. 

##### OPTIONS

-index  -indexOld : can be used to restart from previous data (eg -index 1 -indexOld 0 will load iter=0 file and output iter=1 ...)
-dirname : directory where data is store
-plots (0/1): activate plot interface
-lx or -ly : domain size
-npts : option to change number of points on mesh boundary, to change resolution

-loops : number of minimization loops
-iMAX : number of iteration of the GL solver
-a11 : parameter of the GL potential (same for -a22  -a33 -a12  -a13  -a23 -b11  -b22  -b33  )
-e gauge field coupling
-B0 : applied field3.250  


##### Example

# A- Produce data: In the following  example the initial state is random, and the parameters are chosen so be in a time-reversal symmetry broken phase. This can be ran by the following mpi command:

if [ ! -d  tmp-here ]; then mkdir tmp-here; fi

mpirun --oversubscribe -np 4 FreeFem++-mpi -wg 3CGL-produce-mpi.edp \
       -dirname tmp-here -plots 1 \
       -index 0 -indexOld 0\
       -lx 20 -ly 20 -npts 200 \
       -loops 10  -iMAX 100             \
       -a11 -2.0 -a22 -1.0 -a33 -1.0  \
       -a12  1.0 -a13  1.0 -a23  1.0  \
       -b11  1.0 -b22  1.0 -b33  1.0  \
       -e 0.250   -B0 3.250             


# B- Convert output for visualization processing: In the following example, the previously produced data are loaded and processed to compute various quantities. The later are then tabulated in a .txt file (space separated). That .txt file can then be used in standard visualisation softwares (gnuplot, etc). This can be ran by the following serial command:

mpirun --oversubscribe -np 1 FreeFem++-mpi -wg 3CGL-snapshot.edp \
       -dirname tmp-here -plots 1 \
       -index 0 -indexOld 0\
       -a11 -2.0 -a22 -1.0 -a33 -1.0  \
       -a12  1.0 -a13  1.0 -a23  1.0  \
       -b11  1.0 -b22  1.0 -b33  1.0  \
       -e 0.250   -B0 3.250             




## Play on parameters, iteration numbers, number of point to improve accuracy of the solution. HQ solutions like that of the paper should require larger machine than a personnal computer and should thus be ported to computing cluster and ran on larger number of nodes.