[petsc-dev] VECCUSP needs to be zeroed?
Jose E. Roman
jroman at dsic.upv.es
Tue Nov 8 04:37:45 CST 2011
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
More information about the petsc-dev
mailing list