[petsc-dev] DO NOT USE sqrt() in PETSC CODE!

Barry Smith bsmith at mcs.anl.gov
Tue Nov 1 16:48:47 CDT 2011



   Ok guys I wasted several days because people persist in using sqrt() in PETSc code! DO NOT DO it. Use PetscSqrtReal() or PetscSqrtScalar() because sqrt() does not work with quad precision.

   Peter,  please fix the six million sqrt() in the nonlinear solvers like ngmres

   Jed, please fix the sqrt() in the ODE integrators

   Shri,  I think I fixed all the sqrtt()s you put into the vectors but please do an etags search for any left.

    Barry




More information about the petsc-dev mailing list