<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Well, try and create a small SEQAIJ/MPIAIJ matrix and preallocate
memory for the diagonal.<br>
</p>
<p>When I try to call MatSetValues to fill the diagonal, on the
first row I get <br>
</p>
<p>[0]PETSC ERROR: Argument out of range<br>
[0]PETSC ERROR: Inserting a new nonzero at (0,0) in the matrix</p>
<p>Which is within my preallocated non-zero structure.</p>
<p>This is why I'm confused.<br>
</p>
<p>Thibaut</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 08/10/2019 15:31, Zhang, Hong wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGCphBtsOcnOSxm8N5WexT=M+SZVZkXRMygiX5G44damqZFH6w@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">Thibaut:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
Hi,<br>
<br>
Just out of curiosity, I'm a bit confused by the parameter
option <br>
MAT_NEW_NONZERO_LOCATION_ERR.<br>
<br>
It triggers an error if you try to insert/add a value in the
non-zero <br>
structure, regardless of the matrix preallocation status. In
what case </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
would such an option be useful?<br>
</blockquote>
<div> </div>
<div> It triggers an error if you try to insert/add a NEW
value outside of your preallocated non-zero structure.</div>
<div>Hong</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<br>
</blockquote>
</div>
</div>
</blockquote>
</body>
</html>