wierd behaviour from MatGetRow?
Toby D. Young
tyoung at ippt.gov.pl
Thu Sep 27 07:52:53 CDT 2007
Hello,
I apologize in advance if this message is garbled.
I'm trying to set non-zero values of a column to zero, so I do the
following:
MatGetRow() <- get the column numbers of non-zero elements
MatSetValues() <- set those elements to zero
MatGetRow() <- check that element is set to zero
The output from my program gives:
num = 0x56f024 <- pointer to column number
values = 0.666667 <- it's value
num = 0x56f024 <- pointer to column number
values = 0 <- it's value
So it looks like it has worked the matrix value is zero!
...but if the matrix element has been set to zero, why does MatGetRow
tell mne this? Should not MatGetRow see that it is zero and return
nothing?
Is this behaviour be correct? I'd be interested to know it seems like
a riddle to me.
Thanks.
Best,
Toby
--
Toby D. Young ( Adiunkt )
Department of Computational Science
Institute of Fundamental Technological Research, Polish Academy of
Sciences, Room 206, Swietokrzyska 21, 00-049 Warsaw, POLAND
More information about the petsc-users
mailing list