<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I changed the type from MATSEQMAIJ to MATSEQAIJ and it works
correctly. mat_size is not 0, should I still send the standalone
executable?<br>
<br>
-Dan<br>
<br>
On 05/10/2012 05:21 AM, Matthew Knepley wrote:
<blockquote
cite="mid:CAMYG4GmHW-ztFX1cwrjPRVHf3GxhCVNwVR_YysRBcNc9me7_Yw@mail.gmail.com"
type="cite">On Wed, May 9, 2012 at 8:09 PM, Daniel Christian
Weflen <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:Daniel.Weflen@colorado.edu" target="_blank">Daniel.Weflen@colorado.edu</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
I still get 0 for both the start and end rows.<br>
</blockquote>
<div><br>
</div>
<div>1) Is mat_size 0?</div>
<div><br>
</div>
<div>2) If not, put these line in a standalone executable that
shows the bug and send it.</div>
<div>
<br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
-Dan
<div class="HOEnZb">
<div class="h5"><br>
<br>
On 05/09/2012 05:35 PM, Lisandro Dalcin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
On 9 May 2012 20:01, Daniel Christian Weflen<<a
moz-do-not-send="true"
href="mailto:Daniel.Weflen@colorado.edu"
target="_blank">Daniel.Weflen@colorado.edu</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
I have the following code:<br>
<br>
Mat H;<br>
PetscInt mat_size=x_npts*y_npts;<br>
ierr=MatCreate(PETSC_COMM_WORLD,&H);CHKERRQ(ierr);<br>
<br>
ierr=MatSetSizes(H,PETSC_DECIDE,PETSC_DECIDE,mat_size,mat_size);CHKERRQ(ierr);<br>
ierr=MatSetType(H,MATSEQMAIJ);CHKERRQ(ierr);<br>
PetscInt* nonzeros;<br>
PetscInt start_row,end_row,row_index;<br>
MatGetOwnershipRange(H,&start_row,&end_row);<br>
<br>
When I check the values of start_row and end_row right
after calling<br>
MatGetOwnershipRange, both are 0. What am I doing
wrong here? Am I calling<br>
MatCreate(), MatSetSizes() and MatSetType() in the
wrong order?<br>
</blockquote>
Call MatSetUp() after MatSetType().<br>
<br>
<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to
which their experiments lead.<br>
-- Norbert Wiener<br>
</blockquote>
</body>
</html>