From 38e49bf4fd07cf2dc20c913bf15980c7e86eff1b Mon Sep 17 00:00:00 2001 From: Ed Bueler Date: Sun, 7 May 2023 13:21:22 -0800 Subject: [PATCH] find and fix lower-bound bug in c/ch12/solns/elasto.c --- c/ch12/solns/elasto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/ch12/solns/elasto.c b/c/ch12/solns/elasto.c index f47d6e23..e1781e0c 100644 --- a/c/ch12/solns/elasto.c +++ b/c/ch12/solns/elasto.c @@ -132,7 +132,7 @@ PetscErrorCode FormBounds(SNES snes, Vec Xl, Vec Xu) { DMDALocalInfo info; PetscInt i, j; PetscReal **aXu, dx, dy, x, y; - PetscCall(VecSet(Xu,PETSC_NINFINITY)); + PetscCall(VecSet(Xl,PETSC_NINFINITY)); PetscCall(SNESGetDM(snes,&da)); PetscCall(DMDAGetLocalInfo(da,&info)); dx = 1.0 / (PetscReal)(info.mx-1);