<div dir="ltr"><div>Barry,</div><div><br></div><div>Can you please provide me with an example on how to use MatSetValuesBlocked? </div><div><br></div><div>To play it easy, let's say that I want to insert a 3x3 block matrix b into the matrix A, rows 0-2, columns 0-2. Up to what I've understood (very few apparently XD ), I would do like this:</div><div><br></div><div>b(3,3) = 11.0 </div><div>call MatSetValuesBlocked(A, 3, <font color="#ff0000" style="background-color:rgb(255,255,255)">0</font>, 3, <font color="#ff0000">0</font>, b, INSERT_VALUES, ierr).  <br></div><div><br></div><div>This does not work at all, I get this result that does not make any sense 😫</div><div><br></div><div><img src="cid:ii_la1lrrwi0" alt="image.png" width="541" height="63"><br></div><div><br></div><div>It places 6 values instead of 9 and it they are in odd locations (0 1 2 9 10 11).</div><div><br></div><div>Also I noted that I am getting  different results if in place of  the zero in red I use a fortran integer 😥</div><div><br></div><div>Super thanks for the help</div></div>