DIIS solver
ElemCo.DIIS — ModuleDIIS module for iterative solvers
Main structure
ElemCo.DIIS.Diis — TypeDIIS object
Exported functions
ElemCo.DIIS.perform — Methodperform(diis::Diis, Amps, Res)Perform DIIS.
Internal functions
ElemCo.DIIS.combine — Methodcombine(diis::Diis, vecfiles, coeffs)Combine vectors from files with coefficients.
ElemCo.DIIS.loadamps — Methodloadamps(diis::Diis, ipos)Load vectors from file at position ipos.
ElemCo.DIIS.loadres — Methodloadres(diis::Diis, ipos)Load residuals from file at position ipos.
ElemCo.DIIS.loadvecs — Methodloadvecs(file)Load vectors from file.
ElemCo.DIIS.saveamps — Methodsaveamps(diis::Diis, vecs, ipos)Save vectors to file (replacing previous vectors at position ipos).
ElemCo.DIIS.saveres — Methodsaveres(diis::Diis, vecs, ipos)Save residuals to file (replacing previous residuals at position ipos).
ElemCo.DIIS.update_Bmat — Methodupdate_Bmat(diis::Diis, nDim, Res, ithis)Update B matrix with new residual (at the position ithis).
B matrix is defined as:
\[{\bf B} = \begin{pmatrix} \langle {\bf R}_1, {\bf R}_1 \rangle & \langle {\bf R}_1, {\bf R}_2 \rangle & \cdots & \langle {\bf R}_1, {\bf R}_{\rm nDim} \rangle & -1 \\ \langle {\bf R}_2, {\bf R}_1 \rangle & \langle {\bf R}_2, {\bf R}_2 \rangle & \cdots & \langle {\bf R}_2, {\bf R}_{\rm nDim} \rangle & -1 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ \langle {\bf R}_{\rm nDim}, {\bf R}_1 \rangle & \langle {\bf R}_{\rm nDim}, {\bf R}_2 \rangle & \cdots & \langle {\bf R}_{\rm nDim}, {\bf R}_{\rm nDim} \rangle & -1 \\ -1 & -1 & \cdots & -1 & 0 \end{pmatrix}\]
Returns the dot product of the new residual with itself, $\langle {\bf R}_{\rm ithis}, {\bf R}_{\rm ithis} \rangle$.
ElemCo.DIIS.weighted_dot — Methodweighted_dot(diis::Diis, vecs1, vecs2)Compute weighted (with diis.weights) dot product of vectors.