PetscViewerGLVisSetFields#
Sets the required information to visualize different fields from a vector.
Synopsis#
#include "petscviewer.h" 
#include "petscsys.h"    
PetscErrorCode PetscViewerGLVisSetFields(PetscViewer viewer, PetscInt nf, const char *fec_type[], PetscInt dim[], PetscErrorCode (*g2l)(PetscObject, PetscInt, PetscObject[], void *), PetscObject Vfield[], void *ctx, PetscErrorCode (*destroyctx)(void *))
Logically Collective
Input Parameters#
- viewer - the - PetscViewerof type- PETSCVIEWERGLVIS
- nf - number of fields to be visualized 
- fec_type - the type of finite element to be used to visualize the data (see FiniteElementCollection::Name() in MFEM) 
- dim - array of space dimension for field vectors (used to initialize the scene) 
- g2l - User routine to compute the local field vectors to be visualized; PetscObject is used in place of Vec on the prototype 
- Vfield - array of work vectors, one for each field 
- ctx - User context to store the relevant data to apply g2lfields 
- destroyctx - Destroy function for userctx 
Notes#
g2lfields is called on the vector V to be visualized in order to extract the relevant dofs to be put in Vfield, as
  g2lfields((PetscObject)V,nfields,(PetscObject*)Vfield[],ctx).
For vector spaces, the block size of Vfield[i] represents the vector dimension.
The names of the Vfield vectors will be displayed in the window title.
See Also#
Viewers: Looking at PETSc Objects, PETSCVIEWERGLVIS, PetscViewerGLVisOpen(), PetscViewerCreate(), PetscViewerSetType(), PetscObjectSetName()
Level#
intermediate
Location#
Examples#
Implementations#
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages