JuliaLinearAlgebra / AlgebraicMultigrid.jl

Algebraic Multigrid in Julia
Other
117 stars 23 forks source link

Reference for direct interpolation used #44

Open mohamed82008 opened 6 years ago

mohamed82008 commented 6 years ago

What is the reference for the direct interpolation used in this package? I see that it is an extension to non Z matrices but is there a paper or book that describes the rationale?

learning-chip commented 2 years ago

I found it in Trottenberg's Multigrid book -> Appendix A. An Introduction to Algebraic Multigrid (by Klaus Stuben) -> Section A.4.2 Direct Interpolation -> A.4.2.3 General case (compared to the more commonly-seen formula in Section A.4.2.1 M-matrices)

termi-official commented 1 year ago

Sorry to bother, but I think the reference does not match the actual implementation. One of my students found this. I fail to understand the discrepancy, too. In these lines here https://github.com/JuliaLinearAlgebra/AlgebraicMultigrid.jl/blob/7bb7e0583cdac84cd831e9b201026b01170dda49/src/classical.jl#L158-L162 Here an abs pops up (introduced in https://github.com/JuliaLinearAlgebra/AlgebraicMultigrid.jl/pull/43), while the original general formula given by Klaus Stuben's An Introduction to Algebraic Multigrid (A.4.2.3 - Equation 83f) states that the weights are signed, i.e.

w_{ik} = \begin{cases}
    - \alpha_i a_{ik} / a_{ii} & \text{if } k\in P_i^- \\
    - \beta_i a_{ik} / a_{ii} & \text{if } k\in P_i^+ \\
\end{cases}

such that $w_{ik} < 0$ for $k\in Pi^-$ and $w{ik} > 0$ for $k\in P_i^+$.

Can someone help me here what I got wrong?