"Buesing, Henrik" <hbues...@eonerc.rwth-aachen.de> writes:

> Dear all,
>
> I have structured cell-centered data and would like to visualize this with 
> Paraview. Up to now I use PetscViewerVTKOpen and VecView to write data in 
> *.vts format. I would like to tell PETSc that the fieldtype is 
> PETSC_VTK_CELL_FIELD. I have found PetscViewerVTKAddField.
>
> Is this the way to go? I was thinking maybe a DMDASetFieldType exists, but 
> did not find any. If yes, what is the PetscViewerVTKWriteFunction I need to 
> provide?

DMDA does not explicitly support distinguishing between cell and point
values.  PetscViewerVTKAddField is a developer level routine and you
would need to implement a function similar to DMDAVTKWriteAll_VTS (not
at all trivial and you need to read the code because it is responsible
for almost everything).

Reply via email to