| ... | ... | @@ -51,12 +51,14 @@ void modify_potentials(int it, wslda_density h_densities, wslda_potential h_pote |
|
|
|
|
|
|
|
// params0 -> effective coupling strength
|
|
|
|
// you can also access tags from the input file, like input->sclgth here
|
|
|
|
// other global variables: dc_mu_a, dc_mu_b, dc_ec
|
|
|
|
|
|
|
|
ixyz=0;
|
|
|
|
for(ix=0; ix<lNX; ix++) for(iy=0; iy<lNY; iy++) for(iz=0; iz<lNZ; iz++)
|
|
|
|
{
|
|
|
|
// ...
|
|
|
|
h_potentials.delta[ixyz] = -1.0*params[0]*h_densities.nu[ixyz];
|
|
|
|
...
|
|
|
|
// ...
|
|
|
|
ixyz++;
|
|
|
|
}
|
|
|
|
}
|
| ... | ... | @@ -113,3 +115,12 @@ __global__ void modify_potentials(int it, wslda_density h_densities, wslda_poten |
|
|
|
}
|
|
|
|
#include "tdwslda_functionals_framework_disable.h" // DO NOT REMOVE!
|
|
|
|
```
|
|
|
|
Note, you need to activate `modify_potentials(...)` in `predefines.h`
|
|
|
|
```c
|
|
|
|
#define ENABLE_V_EXT
|
|
|
|
// ...
|
|
|
|
// #define ENABLE_MODIFY_DENSITIES
|
|
|
|
#define ENABLE_MODIFY_POTENTIALS
|
|
|
|
// #define ENABLE_MODIFY_ENERGIES
|
|
|
|
// ...
|
|
|
|
``` |