sisl.mixing.AndersonMixer
- class sisl.mixing.AndersonMixer[source]
Bases:
BaseHistoryWeightMixer
Anderson mixing
The Anderson mixing assumes that the mixed input/output are linearly related. Hence
\[|\bar{n}^{m}_{\mathrm{in}/\mathrm{out}\rangle = (1 - \beta)|n^{m}_{\mathrm{in}/\mathrm{out}\rangle + \beta|n^{m-1}_{\mathrm{in}/\mathrm{out}\rangle\]Here the optimal choice
is calculated as:Finally the resulting output becomes:
See [5] for more details.
Methods
set_history
(history)Replace the current history in the mixer with a new one
set_weight
(weight)Set a new weight for this mixer
Attributes
History object tracked by this mixer
This mixers mixing weight, the weight is the fractional contribution of the derivative
- __call__(f, df, delta=None, append=True)[source]
Calculate a new variable
using input and output of the functional
- set_history(history)
Replace the current history in the mixer with a new one