[petsc-dev]Documentation typo: Sign error in SNES Picard defect correction formula
Dear PETSc Development Team, I am a researcher using PETSc for numerical simulations of partial differential equations. While reviewing the documentation for the SNES Picard interface, I noticed a sign inconsistency in the defect correction formulation that appears to be a typo. The documentation opens by stating the equation to be solved is: $$A(x)\,x = bp(x) - b$$ However, the provided defect correction iteration is written as: $$A(x^n)(x^{n+1} - x^n) = bp(x^n) + b - A(x^n)x^n$$ Following this, the "classic" Picard iteration is given as: $$A(x^n)x^{n+1} = bp(x^n) + b$$ There is a sign error on the constant term $b$. If we substitute the converged solution $x^*$ into the stated Picard iteration, we obtain $A(x^*)x^* = bp(x^*) + b$, which contradicts the original equation $A(x)x = bp(x) - b$ by a difference of $2b$. The correct defect correction form consistent with the original equation should be: $$A(x^n)(x^{n+1} - x^n) = bp(x^n) - b - A(x^n)x^n$$ which reduces to the correct classic Picard iteration: $$A(x^n)x^{n+1} = bp(x^n) - b$$ I greatly appreciate the high-quality documentation and the extensive work your team has put into PETSc. I wanted to report this small issue to help improve the manual. Please let me know if I have misunderstood the formulation. Best regards, Jingdu Li
Thank you for the report. I believe that there was one minus sign which was incorrect, which I have fixed in this MR: https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/9... . Let me know if you think I missed something. Thanks, Matt On Wed, Aug 5, 2026 at 12:43 PM 李敬都 <[email protected]> wrote:
Dear PETSc Development Team,
I am a researcher using PETSc for numerical simulations of partial differential equations. While reviewing the documentation for the SNES Picard interface, I noticed a sign inconsistency in the defect correction formulation that appears to be a typo.
The documentation opens by stating the equation to be solved is: $$A(x)\,x = bp(x) - b$$
However, the provided defect correction iteration is written as: $$A(x^n)(x^{n+1} - x^n) = bp(x^n) + b - A(x^n)x^n$$
Following this, the "classic" Picard iteration is given as: $$A(x^n)x^{n+1} = bp(x^n) + b$$
There is a sign error on the constant term $b$. If we substitute the converged solution $x^*$ into the stated Picard iteration, we obtain $A(x^*)x^* = bp(x^*) + b$, which contradicts the original equation $A(x)x = bp(x) - b$ by a difference of $2b$.
The correct defect correction form consistent with the original equation should be: $$A(x^n)(x^{n+1} - x^n) = bp(x^n) - b - A(x^n)x^n$$
which reduces to the correct classic Picard iteration: $$A(x^n)x^{n+1} = bp(x^n) - b$$
I greatly appreciate the high-quality documentation and the extensive work your team has put into PETSc. I wanted to report this small issue to help improve the manual. Please let me know if I have misunderstood the formulation.
Best regards,
Jingdu Li
-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
participants (2)
-
Matthew Knepley -
李敬都