|
# Lattice calculations
|
|
# Lattice calculations
|
|
W-SLDA Toolkit solves the problem on a Cartesian mesh grid with a lattice size $`N_x\times N_y\times N_z`$ and lattice spacing $`D_x\times D_y\times D_z`$. The total extend of the simulation box is $`L_x\times L_y\times L_z=N_xD_x\times N_yD_y\times N_zD_z`$.
|
|
W-SLDA Toolkit solves the problem on a Cartesian mesh grid with a lattice size $`N_x\times N_y\times N_z`$ and lattice spacing $`D_x\times D_y\times D_z`$. The total extend of the simulation box is $`L_x\times L_y\times L_z=N_xD_x\times N_yD_y\times N_zD_z`$.
|
|
The lattice parameters mast be provided at compilation stage via [predefines.h](https://gitlab.fizyka.pw.edu.pl/gabrielw/wslda/-/blob/public/st-project-template/predefines.h) file:
|
|
The lattice parameters mast be provided at compilation stage via [predefines.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/blob/public/st-project-template/predefines.h) file:
|
|
```c
|
|
```c
|
|
/**
|
|
/**
|
|
* Define lattice size and lattice spacing
|
|
* Define lattice size and lattice spacing
|
... | @@ -59,7 +59,7 @@ Variables (like `density_a`, `delta`, ...) are stored as one-dimensional arrays. |
... | @@ -59,7 +59,7 @@ Variables (like `density_a`, `delta`, ...) are stored as one-dimensional arrays. |
|
```c
|
|
```c
|
|
int ixyz = iz + NZ*iy + NZ*NY*ix;
|
|
int ixyz = iz + NZ*iy + NZ*NY*ix;
|
|
```
|
|
```
|
|
Typically access to quantities is provided via structures [wslda_density](https://gitlab.fizyka.pw.edu.pl/gabrielw/wslda/-/tree/public/hpc-engine/wslda_potdens.h) and [wslda_potential](https://gitlab.fizyka.pw.edu.pl/gabrielw/wslda/-/tree/public/hpc-engine/wslda_potdens.h). These structures contain information about the coordinate frame that was used for storing provided there quantities:
|
|
Typically access to quantities is provided via structures [wslda_density](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/hpc-engine/wslda_potdens.h) and [wslda_potential](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/hpc-engine/wslda_potdens.h). These structures contain information about the coordinate frame that was used for storing provided there quantities:
|
|
```c
|
|
```c
|
|
typedef struct
|
|
typedef struct
|
|
{
|
|
{
|
... | | ... | |