[petsc-users] VTK Output / no file

Jed Brown jed at jedbrown.org
Tue Mar 3 16:49:12 CST 2015


Grischa Jacobs <grischa.jacobs at email.de> writes:

> Dear,
>  
> I used to save my Vec results to vts files. Unfortunately this is not working
> anymore. My Code:
>
> // Creating 3DDM before
> ierr = DMDACreateNaturalVector(dynamic_Maxwell, &dynamic_fields_global);CHKERRQ
> (ierr);
> ierr = VecSet(dynamic_fields_global,some_number);CHKERRQ(ierr);
>
> PetscViewer viewer;
> ierr = PetscViewerVTKOpen(PETSC_COMM_WORLD, "test.vts", FILE_MODE_WRITE, &
> viewer);CHKERRQ(ierr);
> ierr = VecView(dynamic_fields_global, viewer);CHKERRQ(ierr);
> ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);

What version of PETSc are you using and what error do you get?

> Saving to ASCII still works:
> ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD,"test.vts",&viewer);CHKERRQ(ierr);
>
> I don't get any errors.
>
>  
>
> king regrads,
> Grischa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150303/a08b5a1e/attachment.pgp>


More information about the petsc-users mailing list