On Tue, Nov 8, 2011 at 10:37 AM, Jose E. Roman <span dir="ltr"><<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</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;">
The following code prints a vector of uninitialized entries.<br>
<br>
  ierr = VecCreate(comm,&v);CHKERRQ(ierr);<br>
  ierr = VecSetSizes(v,n,n);CHKERRQ(ierr);<br>
  ierr = VecSetType(v,VECSEQCUSP);CHKERRQ(ierr);<br>
  ierr = VecView(v,PETSC_NULL);CHKERRQ(ierr);<br>
<br>
In contrast, if the type is VECSEQ the vector is initialized to zero. So it seems that VecSet(v,0.0) must always be called. Is this the expected behaviour?</blockquote><div><br></div><div>There is no guarantee of initialization for any Vec type.</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;"><font color="#888888"><br>
Jose<br></font></blockquote></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>