[petsc-users] Check vector for zeros
Florian Lindner
mailinglists at xgm.de
Thu Jan 3 09:57:29 CST 2019
Hello,
Happy New Year Everybody!
I get a vector from a linear solve and is used a divisor in VecPointwiseDivide. Clearly, I must check for zero entries before doing the division.
What is the best way to do so, especially performance wise?
The only way I come up with so far, is to VecCopy, VecAbs and then check for VecMin > eps. The VecCopy kind of scares me for the performance draw back. I haven't found something like a VecAbsMin.
Any better ideas?
Thanks,
Florian
More information about the petsc-users
mailing list