[petsc-users] VTK format?
Berend van Wachem
berend.vanwachem at ovgu.de
Mon Sep 7 08:58:15 CDT 2020
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:
$ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: visualizemesh.c
Type: text/x-csrc
Size: 3017 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200907/de7d54fd/attachment.bin>
More information about the petsc-users
mailing list