sisl.mixing.BaseHistoryWeightMixer

class sisl.mixing.BaseHistoryWeightMixer(weight: float | int = 0.2, history: int | History = 0)

Bases: BaseWeightMixer

Base class mixer with history

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

History object tracked by this mixer

weight

This mixers mixing weight, the weight is the fractional contribution of the derivative

__call__(f: T, df: T, *args: Any, append: bool = True) None[source]

Append data to the history (omitting None values)!

set_history(history: int | History) None[source]

Replace the current history in the mixer with a new one

Parameters:

history – if an int a new History object will be created with that number of history elements Otherwise the object will be directly attached to the mixer.

set_weight(weight: float | int)

Set a new weight for this mixer

Parameters:

weight (float) – the new weight for this mixer, it must be bigger than 0

property history: History

History object tracked by this mixer

property weight: float | int

This mixers mixing weight, the weight is the fractional contribution of the derivative