[petsc-users] Documentation for VTU format?

Justin Chang jchang27 at uh.edu
Mon Mar 30 11:51:18 CDT 2015


Jed thank you for the response.

1) In my case, I want to output a transient diffusion problem (with
DMPlex). I see that in ex11 there's a TSMonitorSet(). Is this (and its
calling function) be the place I have something along the lines that you
have suggested? That is, if TSMonitorSet() calls MonitorVTK(), then
MonitorVTK() would have PetscViewerVTKOpen(...). Am I along the right track?

2) What I meant by parallel was if each rank would output its local part of
the solution, kind of like the way it's done with FEniCS. That way, if I
had an extremely large solution set (at least over 10 million DOFS) then I
wouldn't be stuck with one giant ASCII file. Unless that's what binary
formats like HDF5 are for?

Thanks,

On Mon, Mar 30, 2015 at 10:54 AM, Jed Brown <jed at jedbrown.org> wrote:

> 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).
>
>


-- 
Justin Chang
PhD Candidate, Civil Engineering - Computational Sciences
University of Houston, Department of Civil and Environmental Engineering
Houston, TX 77004
(512) 963-3262
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150330/466dfbe7/attachment.html>


More information about the petsc-users mailing list