[Paraview] help with scalar field over moving mesh coming from PETSc code
David E DeMarle
dave.demarle at kitware.com
Thu Mar 31 09:20:58 EDT 2016
Hi Luca,
Try this -> open up both data sets, select both in the Pipeline Browser and
apply the Append Attributes filter.
hope that help
On Mar 30, 2016 5:11 AM, "Luca Pavarino" <luca.pavarino at unimi.it> wrote:
>
> I need to visualize in Paraview at every time step a scalar field (in my
> PETSc code Vec cc_1 below) over a moving structured mesh (Vec um). Both the
> field and the mesh are solutions of some a parallel PETSc time-dependent
> PDE code. Do you have a simple PETSc example to output these vectors at
> each time step and see them in Paraview (either each snapshot separately or
> with a movie)?
>
> I tried with the simple PETSc code (Vec cc_1 is the scalar field and Vec
> uum_1 is the vector of 3D coordinates):
>
> write (filename,"(A, I4.4, A)") "uuvtk", int(k*dt),".vts"
> call PetscViewerVTKOpen(PETSC_COMM_WORLD,filename,
> & FILE_MODE_WRITE,view_out_vtk,ierr);
> call VecView(cc_1,view_out_vtk,ierr)
> call PetscViewerDestroy(view_out_vtk,ierr)
>
> write (filename,"(A, I4.4, A)") "uumvtk", int(k*dt),".vts"
> call PetscViewerVTKOpen(PETSC_COMM_WORLD,filename,
> & FILE_MODE_WRITE,view_out_vtk,ierr);
> call VecView(uum_1,view_out_vtk,ierr)
> call PetscViewerDestroy(view_out_vtk,ierr)
>
> but I get 2 separate vectors and I do not know how to make Paraview see
> that the scalar field is defined over the coordinate mesh. Thanks for any
> help,
>
> Luca
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160331/797085a6/attachment.html>
More information about the ParaView
mailing list