# DAView

Visualizes a distributed array object.

### Synopsis

    #include "petscda.h"
    PetscErrorCode PETSCDM_DLLEXPORT DAView(DA da,PetscViewer viewer)

Collective on DA

### Input Parameters

| da | - the distributed array
| ptr | - an optional visualization context

### Notes

The available visualization contexts include

| PETSC_VIEWER_STDOUT_SELF | - standard output (default)
| PETSC_VIEWER_STDOUT_WORLD | - synchronized standard output where only the first processor opens the file. All other processors send their data to the first processor to print.
| PETSC_VIEWER_DRAW_WORLD | - to default window

The user can open alternative visualization contexts with

| PetscViewerASCIIOpen() | - Outputs vector to a specified file
| PetscViewerDrawOpen() | - Outputs vector to an X window display

### Default Output Format

(for 3d arrays)

       Processor [proc] M  N  P  m  n  p  w  s
       X range: xs xe, Y range: ys, ye, Z range: zs, ze

       where
          M,N,P - global dimension in each direction of the array
          m,n,p - corresponding number of procs in each dimension
          w - number of degrees of freedom per node
          s - stencil width
          xs, xe - internal local starting/ending grid points
                   in x-direction, (augmented to handle multiple
                   degrees of freedom per node)
          ys, ye - local starting/ending grid points in y-direction
          zs, ze - local starting/ending grid points in z-direction

### Options Database Key

-da_view -Calls DAView() at the conclusion of DACreate1d(), DACreate2d(), and DACreate3d()

### Notes

Use DAGetCorners() and DAGetGhostCorners() to get the starting and ending grid points (ghost points) in each direction.

When drawing the DA grid it only draws the logical grid and does not respect the grid coordinates set with DASetCoordinates()

### Keywords

distributed array, view, visualize

### See Also

PetscViewerASCIIOpen(), PetscViewerDrawOpen(), DAGetInfo(), DAGetCorners(),
DAGetGhostCorners()

Level:beginner
Location: src/dm/da/src/daview.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex5f90.F.html
src/dm/da/examples/tutorials/ex1.c.html
src/dm/da/examples/tutorials/ex5.c.html