The following code prints a vector of uninitialized entries.

  ierr = VecCreate(comm,&v);CHKERRQ(ierr);
  ierr = VecSetSizes(v,n,n);CHKERRQ(ierr);
  ierr = VecSetType(v,VECSEQCUSP);CHKERRQ(ierr);
  ierr = VecView(v,PETSC_NULL);CHKERRQ(ierr);

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?

Jose


Reply via email to