[petsc-users] VTK format?

Matthew Knepley knepley at gmail.com
Mon Sep 7 09:33:11 CDT 2020


On Mon, Sep 7, 2020 at 9:58 AM Berend van Wachem <berend.vanwachem at ovgu.de>
wrote:

> Dear Jed,
>
> Thanks for the suggestion. I've tried writing to .vtu (see attached
> code), but that doesn't seem to work for a section containing multiple
> fields? Upon running the attached code, I get the error:
>

Yes, Jed removed that error check today. It should make it to master is a
few days. You can just delete that line I think.
I still prefer to use HDF5 and XDMF since it is much more flexible, and
easier to store many things in. I put lots of fields
in the HDF5 file (and hopefully will get time to support many meshes in
it), and also support timesteps. I recognize that
VTU is familiar, which is a plus for that format.

  Thanks,

     Matt


> $ mpirun -np 1 visualizemesh
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Petsc has generated inconsistent data
> [0]PETSC ERROR: Total number of field components 1 != block size 4
> [0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.13.3, Jul 01, 2020
> [0]PETSC ERROR: visualizemesh on a linux-gcc-opt named
> ivt14.mb.uni-magdeburg.de by berend Mon Sep  7 15:55:10 2020
> [0]PETSC ERROR: Configure options --with-debugging=0 COPTFLAGS="-O3
> -march=native -mtune=native" CXXOPTFLAGS="-O3 -march=native
> -mtune=native" FOPTFLAGS="-O3 -march=native -mtune=native" --with-clean
> --download-metis=yes --download-parmetis=yes --download-hdf5
> --download-p4est --download-triangle --download-tetgen
> --with-zlib-lib=/usr/lib64/libz.a --with-zlib-include=/usr/include
> [0]PETSC ERROR: #1 DMPlexVTKWriteAll_VTU() line 334 in
> /usr/local/petsc-3.13.3/src/dm/impls/plex/plexvtu.c
> [0]PETSC ERROR: #2 DMPlexVTKWriteAll() line 688 in
> /usr/local/petsc-3.13.3/src/dm/impls/plex/plexvtk.c
> [0]PETSC ERROR: #3 PetscViewerFlush_VTK() line 100 in
> /usr/local/petsc-3.13.3/src/sys/classes/viewer/impls/vtk/vtkv.c
> [0]PETSC ERROR: #4 PetscViewerFlush() line 26 in
> /usr/local/petsc-3.13.3/src/sys/classes/viewer/interface/flush.c
> [0]PETSC ERROR: #5 PetscViewerDestroy() line 113 in
> /usr/local/petsc-3.13.3/src/sys/classes/viewer/interface/view.c
> [0]PETSC ERROR: #6 main() line 102 in visualizemesh.c
> [0]PETSC ERROR: No PETSc Option Table entries
> [0]PETSC ERROR: ----------------End of Error Message -------send entire
> error message to petsc-maint at mcs.anl.gov----------
> application called MPI_Abort(MPI_COMM_SELF, 102077) - process 0
>
>
> Or am I making a mistake?
>
> Thanks, best wishes, Berend.
>
>
>
>
> On 2020-09-03 16:53, Jed Brown wrote:
> > Use the xml format (not the legacy format) by naming your file.vtu
> > instead of file.vtk
> >
> > On Thu, Sep 3, 2020, at 8:17 AM, Berend van Wachem wrote:
> >> Dear PETSc,
> >>
> >> What is the best way to write data from a DMPLEX vector to file, so it
> >> can be viewed with paraview?
> >> I've found that the standard VTK format works for a serial job, but if
> >> there is more than 1 processor, the geometry data gets messed up.
> >> I've attached a small working example for a cylinder and the visualised
> >> geometry with paraview for 1 processors and 4 processors.
> >> Any pointers or "best practice" very much appreciated.
> >>
> >> Best regards,
> >>
> >> Berend.
> >>
> >>
> >>
> >>
> >> *Attachments:*
> >>
> >>   * visualisemesh-1proc.png
> >>   * visualisemesh-4proc.png
> >>   * visualizemesh.c
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200907/ad8a07d9/attachment-0001.html>


More information about the petsc-users mailing list