[petsc-users] Matrix is missing diagonal entry

Matthew Knepley knepley at gmail.com
Wed Jan 21 17:35:26 CST 2015


On Wed, Jan 21, 2015 at 5:06 PM, Orxan Shibliyev <orxan.shibli at gmail.com>
wrote:

> I am solving Ax=b with KSP. I set the matrix (A) so that from first row to
> a certain row (row N) I used negative indices (see below). I got an error
> indicating that the matrix is
>

What do you mean by this? Matrix rows are always refered to by
non-negative, contiguous integers.

  Thanks,

     Matt


> missing diagonal entry at 0 (zero). Does this mean that negative indexing
> is not working so that the row zero points to the actual first row which
> has negative index? Should not the rows with negative indices be ignored?
> In case, I checked the first row without negative index (row N) and its
> diagonal entry is not zero anyway.
>
> A =
> | negative index   |
> | "                         |
> | "                         |
> | "                         |
> | non-zero value  | --> row N
> | non-zero value  |
> | "                         |
> | ...                       |
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150121/7ac870ec/attachment.html>


More information about the petsc-users mailing list