[petsc-users] Documentation for VTU format?

Jed Brown jed at jedbrown.org
Mon Mar 30 10:54:38 CDT 2015


Justin Chang <jchang27 at uh.edu> writes:

> Hi all,
>
> I have a couple questions:
>
> 1) Is there any documentation somewhere that talks specifically on how to
> output using the *.vtu format? Specifically for transient problems. When I
> look at TS ex11 it seems to me the user has to create several additional
> routines, but I was wondering if there are any simpler
> examples/instructions.

    ierr = PetscViewerVTKOpen(PETSC_COMM_WORLD,"your-file.vtu",FILE_MODE_WRITE,&viewer);CHKERRQ(ierr);
    ierr = VecView(x,viewer);CHKERRQ(ierr);
    ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);

... assuming x is a vector obtained from a DM capable of writing *.vtu.
Note that the vtu format is not designed for time-series, so you'll need
to write a separate file per time step.

> 2) Can vtu files be outputted in parallel?

Yes, we write one file in parallel (not one file per rank which is a
scalability disaster).

-------------- 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/20150330/7d1e0759/attachment.pgp>


More information about the petsc-users mailing list