Oh, yes. Sorry I did not say it clearly. What I did is using an identity
vector whose
elements are all ones and ratio that with the original lumped vector to get
the inverse.
Then I use it in the mmult(), which can take a diagonal vector.
Thanks!
Feimi
On Monday, May 14, 2018 at 7:47:16 PM UTC-
On 05/14/2018 11:52 PM, Feimi Yu wrote:
Thank you for the detailed explanation! Actually what I want to do is to
evaluate
the inverse of a lumped diagonal matrix to mimic the matrix inverse.
I see. Since floating point division is *so much more expensive* than floating
point multiplication,
Hi Wolfgang,
Thank you for the detailed explanation! Actually what I want to do is to
evaluate
the inverse of a lumped diagonal matrix to mimic the matrix inverse.
Anyway, I
will write my own loop to avoid using ratio(). Thanks again!
Feimi
On Monday, May 14, 2018 at 10:23:12 AM UTC-4, Wolfgan
On 05/12/2018 12:02 PM, Feimi Yu wrote:
I'm currently using the ratio function for PETSc vectors to compute vector
inverse in my parallel code. However, it looks like that ratio() is
deprecated. I know there is a potential floating point exception due to
the undefined behavior when the denomina
Hi,
I'm currently using the ratio function for PETSc vectors to compute vector
inverse in my parallel code. However,
it looks like that ratio() is deprecated. I know there is a potential
floating point exception due to the
undefined behavior when the denominator vector contains zero (because
P