petsc-3.4.2 2013-07-02

# DMDAGetRay

Returns a vector on process zero that contains a row or column of the values in a DMDA vector

### Synopsis

    #include "petscdmda.h"
    PetscErrorCode  DMDAGetRay(DM da,DMDADirection dir,PetscInt gp,Vec *newvec,VecScatter *scatter)

Collective on DMDA

### Input Parameters

| da | - the distributed array
| vec | - the vector
| dir | - Cartesian direction, either DMDA_X, DMDA_Y, or DMDA_Z
| gp | - global grid point number in this direction

### Output Parameters

| newvec | - the new vector that can hold the values (size zero on all processes except process 0)
| scatter | - the VecScatter that will map from the original vector to the slice

### Notes

All processors that share the DMDA must call this with the same gp value

### Keywords

distributed array, get, processor subset

Level:advanced
Location:src/dm/impls/da/dasub.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages