Hello,
I want to print vector / matrix to VTK file.
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?
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?
src/ksp/ksp/examples/tutorials/ex42.c
<http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex42.c.html>
src/snes/examples/tutorials/ex15.c
<http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex15.c.html>
Thanks!
Juris
vencels@bigone:/scratch/petsc-git/src/snes/examples/tutorials$ *./ex15
-snes_monitor_short -da_grid_x 20 -da_grid_y 20 -p 1.3 -lambda 1
-jtype NEWTON -o ex15.vts*
0 SNES Function norm 0.690597
1 SNES Function norm 0.437399
2 SNES Function norm 0.309415
3 SNES Function norm 0.132358
4 SNES Function norm 0.0919276
5 SNES Function norm 0.0752639
6 SNES Function norm 0.0669195
7 SNES Function norm 0.0592599
8 SNES Function norm 0.0516658
9 SNES Function norm 0.0441565
10 SNES Function norm 0.0367695
11 SNES Function norm 0.0288595
12 SNES Function norm 0.0277417
13 SNES Function norm 0.0085536
14 SNES Function norm 0.00140906
15 SNES Function norm 7.35341e-05
16 SNES Function norm 3.63992e-07
17 SNES Function norm 1.034e-11
CONVERGED_FNORM_RELATIVE Number of nonlinear iterations = 17
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
*[0]PETSC ERROR: No support for this operation for this object type**
**[0]PETSC ERROR: Complex values not supported*
[0]PETSC ERROR: See
http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Development GIT revision: v3.5.3-2213-g589572e
GIT Date: 2015-03-07 10:56:38 -0600
[0]PETSC ERROR: ./ex15 on a intelmkl-debug named bigone by vencels Mon
Mar 16 10:45:52 2015
[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
[0]PETSC ERROR: #1 DMDAVTKWriteAll_VTS() line 30 in
/scratch/petsc-git/src/dm/impls/da/grvtk.c
[0]PETSC ERROR: #2 DMDAVTKWriteAll() line 482 in
/scratch/petsc-git/src/dm/impls/da/grvtk.c
[0]PETSC ERROR: #3 PetscViewerFlush_VTK() line 78 in
/scratch/petsc-git/src/sys/classes/viewer/impls/vtk/vtkv.c
[0]PETSC ERROR: #4 PetscViewerFlush() line 30 in
/scratch/petsc-git/src/sys/classes/viewer/interface/flush.c
[0]PETSC ERROR: #5 PetscViewerDestroy() line 101 in
/scratch/petsc-git/src/sys/classes/viewer/interface/view.c
[0]PETSC ERROR: #6 main() line 257 in
/scratch/petsc-git/src/snes/examples/tutorials/ex15.c
[0]PETSC ERROR: PETSc Option Table entries:
[0]PETSC ERROR: -da_grid_x 20
[0]PETSC ERROR: -da_grid_y 20
[0]PETSC ERROR: -jtype NEWTON
[0]PETSC ERROR: -lambda 1
[0]PETSC ERROR: -o ex15.vts
[0]PETSC ERROR: -p 1.3
[0]PETSC ERROR: -snes_monitor_short
[0]PETSC ERROR: ----------------End of Error Message -------send
entire error message to [email protected]
Aborted (core dumped)