[petsc-users] Reading VTK files in PETSc
Kevin G. Wang
kevinw3 at vt.edu
Wed Nov 29 07:59:47 CST 2023
Good morning everyone.
I use the following functions to output parallel vectors --- "globalVec" in
this example --- to VTK files. It works well, and is quite convenient.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PetscViewer viewer;
PetscViewerVTKOpen(PetscObjectComm((PetscObject)*dm), filename,
FILE_MODE_WRITE, &viewer);
VecView(globalVec, viewer);
PetscViewerDestroy(&viewer);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now, I am trying to do the opposite. I would like to read the VTK files
generated by PETSc back into memory, and assign each one to a Vec. Could
someone let me know how this can be done?
Thanks!
Kevin
--
Kevin G. Wang, Ph.D.
Associate Professor
Kevin T. Crofton Department of Aerospace and Ocean Engineering
Virginia Tech
1600 Innovation Dr., VTSS Rm 224H, Blacksburg, VA 24061
Office: (540) 231-7547 | Mobile: (650) 862-2663
URL: https://www.aoe.vt.edu/people/faculty/wang.html
Codes: https://github.com/kevinwgy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20231129/90465e24/attachment.html>
More information about the petsc-users
mailing list