... | @@ -13,3 +13,29 @@ The functional has the generic form: |
... | @@ -13,3 +13,29 @@ The functional has the generic form: |
|
\end{aligned}
|
|
\end{aligned}
|
|
```
|
|
```
|
|
TODO
|
|
TODO
|
|
|
|
# Stabilization of ASLDA functional
|
|
|
|
In the case of calculations for trapped system term $`\frac{\bm{j}_{\sigma}^2}{2n_{\sigma}}`$ is source of numerical instabilities. Precisely, for small density regions we have:
|
|
|
|
* $`n_{\sigma}\rightarrow 0`$,
|
|
|
|
* $`\bm{j}_{\sigma}\rightarrow 0`$,
|
|
|
|
* $`\frac{\bm{j}_{\sigma}^2}{2n_{\sigma}}\rightarrow 0`$.
|
|
|
|
|
|
|
|
However, division of very small numbers is numerically not stable operations. For this reason, we introduce stabilization procedure:
|
|
|
|
```math
|
|
|
|
\dfrac{\bm{j}_{\sigma}^2}{2n_{\sigma}}\longrightarrow f_{\textrm{reg.}}(n_{\sigma})\dfrac{\bm{j}_{\sigma}^2}{2n_{\sigma}}
|
|
|
|
```
|
|
|
|
Role of $`f_{\textrm{reg.}}`$ is to exclude from computation regions of small density. The function is controlled by two parameters in `predefines.h` file:
|
|
|
|
```c
|
|
|
|
/**
|
|
|
|
* Meaningful only in case of ASLDA.
|
|
|
|
* Paremeters defining stabilization procedure of ASLDA functional.
|
|
|
|
* For regions with density smaller than ASLDA_STABILIZATION_EXCLUDE_BELOW_DENISTY
|
|
|
|
* contribution from current term j^2/2n is assumed to be zero.
|
|
|
|
* For regions with density above ASLDA_STABILIZATION_RETAIN_ABOVE_DENSITY
|
|
|
|
* the contribution is assumed to be intact by stabilization procedure.
|
|
|
|
* */
|
|
|
|
#define ASLDA_STABILIZATION_RETAIN_ABOVE_DENSITY 1.0e-5
|
|
|
|
#define ASLDA_STABILIZATION_EXCLUDE_BELOW_DENISTY 1.0e-7
|
|
|
|
```
|
|
|
|
There meaning is presented on the figure below.
|
|
|
|
![stabilization](uploads/6528cf3b55ebb0d55a3e7f62a6124a83/stabilization.png)
|
|
|
|
Smooth transition between densities `ASLDA_STABILIZATION_EXCLUDE_BELOW_DENISTY` and `ASLDA_STABILIZATION_RETAIN_ABOVE_DENSITY` |
|
|
|
\ No newline at end of file |