[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small bug about line search
Hi,
After a SNESLineSearchPostCheck call, the function SNESLineSearchCubic and SNESLineSearchQuadratic should recompute residual norm ||g|| and search length norm ||y||
But the code is
src/snes/impls/ls/ls.c
676: VecNormBegin(g,NORM_2,gnorm);
677: if (*gnorm != *gnorm) SETERRQ(PETSC_ERR_FP,"User provided compute function generated a Not-a-Number");
678: VecNormBegin(w,NORM_2,ynorm);
679: VecNormEnd(g,NORM_2,gnorm);
680: VecNormEnd(w,NORM_2,ynorm);
and
850: VecNormBegin(g,NORM_2,gnorm);
851: VecNormBegin(w,NORM_2,ynorm);
852: VecNormEnd(g,NORM_2,gnorm);
853: VecNormEnd(w,NORM_2,ynorm);
it set ||w|| for variable ynorm, for which i think should be ||y||
Yours
Gong Ding