<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I want to print vector / matrix to VTK file.<br>
    <br>
    I am running simple tutorial example ex15.c, but since I have
    compiled PETSc with complex scalars (I need them for my program) I
    get an error below. Can I force PETSc to print only real, imaginary
    (or both) part(s) of the solution?<br>
    <br>
    Another question - ksp/ex42.c explicitly writes header information
    to VTK file while snes/ex15.c has only one line - to open VTK file.
    How these two examples are different in terms of writing output to
    VTK?<br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <a
href="http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex42.c.html"
      style="font-family: 'Times New Roman'; font-size: medium;
      font-style: normal; font-variant: normal; font-weight: normal;
      letter-spacing: normal; line-height: normal; orphans: auto;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 1; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
      255);">src/ksp/ksp/examples/tutorials/ex42.c</a><br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <a
href="http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex15.c.html"
      style="font-family: 'Times New Roman'; font-size: medium;
      font-style: normal; font-variant: normal; font-weight: normal;
      letter-spacing: normal; line-height: normal; orphans: auto;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 1; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
      255);">src/snes/examples/tutorials/ex15.c</a><br>
    <br>
    Thanks!<br>
    Juris<br>
    <br>
    <blockquote type="cite">vencels@bigone:/scratch/petsc-git/src/snes/examples/tutorials$
      <b>./ex15 -snes_monitor_short -da_grid_x 20 -da_grid_y 20 -p 1.3
        -lambda 1 -jtype NEWTON -o ex15.vts</b><br>
        0 SNES Function norm 0.690597 <br>
        1 SNES Function norm 0.437399 <br>
        2 SNES Function norm 0.309415 <br>
        3 SNES Function norm 0.132358 <br>
        4 SNES Function norm 0.0919276 <br>
        5 SNES Function norm 0.0752639 <br>
        6 SNES Function norm 0.0669195 <br>
        7 SNES Function norm 0.0592599 <br>
        8 SNES Function norm 0.0516658 <br>
        9 SNES Function norm 0.0441565 <br>
       10 SNES Function norm 0.0367695 <br>
       11 SNES Function norm 0.0288595 <br>
       12 SNES Function norm 0.0277417 <br>
       13 SNES Function norm 0.0085536 <br>
       14 SNES Function norm 0.00140906 <br>
       15 SNES Function norm 7.35341e-05 <br>
       16 SNES Function norm 3.63992e-07 <br>
       17 SNES Function norm 1.034e-11 <br>
      CONVERGED_FNORM_RELATIVE Number of nonlinear iterations = 17<br>
      [0]PETSC ERROR: --------------------- Error Message
      --------------------------------------------------------------<br>
      <b>[0]PETSC ERROR: No support for this operation for this object
        type</b><b><br>
      </b><b>
        [0]PETSC ERROR: Complex values not supported</b><br>
      [0]PETSC ERROR: See
      <a class="moz-txt-link-freetext" href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble
      shooting.<br>
      [0]PETSC ERROR: Petsc Development GIT revision:
      v3.5.3-2213-g589572e  GIT Date: 2015-03-07 10:56:38 -0600<br>
      [0]PETSC ERROR: ./ex15 on a intelmkl-debug named bigone by vencels
      Mon Mar 16 10:45:52 2015<br>
      [0]PETSC ERROR: Configure options --with-cc=icc --with-cxx=icpc
      --with-fc=ifort --with-blas-lapack-dir=/opt/intel/mkl/
      --with-fortran-kernels=generic --with-scalar-type=complex
      --with-mpi=0 --download-superlu<br>
      [0]PETSC ERROR: #1 DMDAVTKWriteAll_VTS() line 30 in
      /scratch/petsc-git/src/dm/impls/da/grvtk.c<br>
      [0]PETSC ERROR: #2 DMDAVTKWriteAll() line 482 in
      /scratch/petsc-git/src/dm/impls/da/grvtk.c<br>
      [0]PETSC ERROR: #3 PetscViewerFlush_VTK() line 78 in
      /scratch/petsc-git/src/sys/classes/viewer/impls/vtk/vtkv.c<br>
      [0]PETSC ERROR: #4 PetscViewerFlush() line 30 in
      /scratch/petsc-git/src/sys/classes/viewer/interface/flush.c<br>
      [0]PETSC ERROR: #5 PetscViewerDestroy() line 101 in
      /scratch/petsc-git/src/sys/classes/viewer/interface/view.c<br>
      [0]PETSC ERROR: #6 main() line 257 in
      /scratch/petsc-git/src/snes/examples/tutorials/ex15.c<br>
      [0]PETSC ERROR: PETSc Option Table entries:<br>
      [0]PETSC ERROR: -da_grid_x 20<br>
      [0]PETSC ERROR: -da_grid_y 20<br>
      [0]PETSC ERROR: -jtype NEWTON<br>
      [0]PETSC ERROR: -lambda 1<br>
      [0]PETSC ERROR: -o ex15.vts<br>
      [0]PETSC ERROR: -p 1.3<br>
      [0]PETSC ERROR: -snes_monitor_short<br>
      [0]PETSC ERROR: ----------------End of Error Message -------send
      entire error message to <a class="moz-txt-link-abbreviated" href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a>----------<br>
      Aborted (core dumped)</blockquote>
    <br>
    <br>
  </body>
</html>