|
|
|
[[_TOC_]]
|
|
|
|
|
|
|
|
# Tracking the states using build in mechanism
|
|
|
|
# Tracking the states using the built-in mechanism
|
|
|
|
**VERSION>=2021.09.18**
|
|
|
|
## Defining the subset
|
|
|
|
W-SLDA Toolkit allows the tracking of observables arising from selected states in time. Presently, the following quantities can be tracked:
|
| ... | ... | @@ -15,8 +15,8 @@ $`\vec{j}_{\downarrow}^{\textrm{(subset)}}(r) = \sum_{E_{\textrm{min}}^{\textrm{ |
|
|
|
|
|
|
|
To control interval range $`E_{\textrm{min}}^{\textrm{(subset)}}<E_n<E_{\textrm{max}}^{\textrm{(subset)}}`$ use `input` file variables:
|
|
|
|
```bash
|
|
|
|
subsetMinEn 0.0 # in eF units, deafault=0.0
|
|
|
|
subsetMaxEn 0.0 # in eF units, deafault=0.0
|
|
|
|
subsetMinEn 0.0 # in eF units, default=0.0
|
|
|
|
subsetMaxEn 0.0 # in eF units, default=0.0
|
|
|
|
```
|
|
|
|
|
|
|
|
In the case of spin-imbalanced systems, it is also convenient to introduce a shift of quasiparticle energies when selecting the states: $`E_n \rightarrow E_n+\frac{\mu_{\uparrow}-\mu_{\downarrow}}{2}`$. This can be done automatically by enabling
|
| ... | ... | @@ -24,18 +24,18 @@ In the case of spin-imbalanced systems, it is also convenient to introduce a shi |
|
|
|
subsetShiftDmu 1 # if 1 then apply extra shift of quasiparticle energies by (mu_a-mu_b)/2, default=0
|
|
|
|
```
|
|
|
|
## Limitations
|
|
|
|
The states to be tracked and contracted into `subset_rho` and `subset_j` are tagged at the beginning of the simulations. We select states based on their energies at `t=0`. However, as the dynamics proceed, the energies of the states can change as well, so some of them can acquire energy that is out of the given range, and some that were not included initially can acquire energy within the considered energy range. These effects are not taken into account by the presented prescription.
|
|
|
|
The states to be tracked and contracted into `subset_rho` and `subset_j` are tagged at the beginning of the simulations. We select states based on their energies at `t=0`. However, as the dynamics proceed, the energies of the states can change, so some can acquire energy outside the given range, while others that were not included initially can acquire energy within the considered range. These effects are not accounted for in the presented prescription.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
Below we present a snapshot from a simulation with SLDA functional for the spin-symmetric system. `td-wslda-2d` has been used. The unitary Fermi gas is confined in a tube, and the vortex dipole is imprinted in the initial state. Following options for subset tracking were used
|
|
|
|
Below we present a snapshot from a simulation with the SLDA functional for the spin-symmetric system. `td-wslda-2d` has been used. The unitary Fermi gas is confined in a tube, and the vortex dipole is imprinted in the initial state. The following options for subset tracking were used
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# ---------------- SUBSET TRACKING ------------------
|
|
|
|
# See: Wiki -> Tracking of selected states
|
|
|
|
# observables (densities, currents) arising from state in the energy interval En in [subsetMinEn,subsetMaxEn]
|
|
|
|
# will be computed, if subsetMinEn=subsetMaxEn=0 the functionality is disables
|
|
|
|
subsetMinEn -0.35 # in eF units, deafault=0.0
|
|
|
|
subsetMaxEn 0.35 # in eF units, deafault=0.0
|
|
|
|
subsetMinEn -0.35 # in eF units, default=0.0
|
|
|
|
subsetMaxEn 0.35 # in eF units, default=0.0
|
|
|
|
subsetShiftDmu 1 # if 1 then apply extra shift of quasiparticle energies by (mu_a-mu_b)/2, default=0
|
|
|
|
```
|
|
|
|
For the unitary Fermi gas $`\Delta/\varepsilon_{F}=0.5`$, thus, as the subset, we select only in-gap states, which in this case corresponds to Andreev vortex states. They are localized in the vortex core. It is visualized below: the left half shows $`\Delta(r)/\varepsilon_{F}`$, while the right half shows `subset_rho_a`.
|
| ... | ... | @@ -44,7 +44,7 @@ For the unitary Fermi gas $`\Delta/\varepsilon_{F}=0.5`$, thus, as the subset, w |
|
|
|
# Writing to files selected states
|
|
|
|
**VERSION>=2024.01.31**
|
|
|
|
# Tracking the state using write_wave_functions(...)
|
|
|
|
The use can track the selected state via `write_wave_functions(...)` function located in `logger.h`. The example below shows an example code that writes periodically to files states with quasiparticle energies smaller than the given threshold value. The example is for 2D code.
|
|
|
|
The user can track the selected state via the `write_wave_functions(...)` function located in `logger.h`. The code below writes to files periodically, recording states with quasiparticle energies below the given threshold value. The example is for 2D code.
|
|
|
|
```c
|
|
|
|
static int wffileid; // line id
|
|
|
|
static int wfcall; // call id of the function
|
| ... | ... | @@ -64,7 +64,7 @@ int write_wave_functions(int it, int nxyz, int nwfip, int nwf, double beta, MPI_ |
|
|
|
wfcall++;
|
|
|
|
if((wfcall-1) % sweep != 0) return 0; // break
|
|
|
|
|
|
|
|
// example code demonstrating writing wave functions to data format (readable by VisIt).
|
|
|
|
// example code demonstrating writing wave functions to wdata format (readable by VisIt).
|
|
|
|
int ip, np;
|
|
|
|
MPI_Comm_size(comm, &np); // np = total number of processes
|
|
|
|
MPI_Comm_rank(comm, &ip); // id of process st 0 <= ip < np
|
| ... | ... | @@ -81,7 +81,7 @@ int write_wave_functions(int it, int nxyz, int nwfip, int nwf, double beta, MPI_ |
|
|
|
|
|
|
|
// identify only states that have e_n<Delta, where Delta is stored in delta
|
|
|
|
// and save their indices to the global array
|
|
|
|
// do it only for the firts call of the function
|
|
|
|
// do it only for the first call of the function
|
|
|
|
if(wffileid==0)
|
|
|
|
{
|
|
|
|
cnt=0;
|
| ... | ... | @@ -161,7 +161,7 @@ int write_wave_functions(int it, int nxyz, int nwfip, int nwf, double beta, MPI_ |
|
|
|
#define __LINE_LGHT 128
|
|
|
|
char line[__LINE_LGHT];
|
|
|
|
sprintf(line, "%5d %12.8f %12.8f \n", 0, 0.0, 0.0); // line format
|
|
|
|
int _line_lgh = strlen(line); // test its lenght to get info about number of bytes per line
|
|
|
|
int _line_lgh = strlen(line); // test its length to get info about number of bytes per line
|
|
|
|
for(i=0; i<ip; i++) my_offset+=sizeof(char)*_line_lgh*wf_tbl[i];
|
|
|
|
int startidx=0;
|
|
|
|
for(i=0; i<ip; i++) startidx+=wf_tbl[i];
|
| ... | ... | |