VecView behaviour

Andreas Grassl Andreas.Grassl at
Tue Jun 2 15:23:37 CDT 2009

Barry Smith schrieb:
> On May 29, 2009, at 4:34 AM, Andreas Grassl wrote:
>> Hello,
>> I'm working with the PCNN preconditioner and hence with
>> ISLocalToGlobalMapping.
>> After solving I want to write the solution to an ASCII-file where only
>> the
>> values belonging to the "external" global numbering are given and not
>> followed
>                                       ^^^^^^^^^^^^^^^^^^^^^^^
>> by the zeros.
> What do you mean? What parts of the vector do you want?

I want the first actdof entries

actdof is the number of DOF the system has.
the values of indices is in the range of 0 to actdof-1.
I create the mapping by

Due to the "existence" of interface DOF's the sum over all ind_length is
greather than actdof, namely the size of the Vectors, but only actdof entries of
this Vector are nonzero, if I view it.

>> Currently I'm giving this commands:
>> ierr =
>> PetscViewerSetFormat(viewer,PETSC_VIEWER_ASCII_SYMMODU);CHKERRQ(ierr);
>> ierr = VecView(X,viewer);CHKERRQ(ierr);

I hope you got an idea, what problem I have.



 \ /      ASCII Ribbon
  X    against HTML email
 / \

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 315 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the petsc-users mailing list