DACreate1d

Creates an object that will manage the communication of one-dimensional regular array data that is distributed across some processors.

Synopsis

int DACreate1d(MPI_Comm comm,DAPeriodicType wrap,int M,int w,int s,int *lc,DA *inra)
Collective on MPI_Comm

Input Parameters

comm - MPI communicator
wrap - type of periodicity should the array have, if any. Use either DA_NONPERIODIC or DA_XPERIODIC
M - global dimension of the array
w - number of degrees of freedom per node
lc - array containing number of nodes in the X direction on each processor, or PETSC_NULL. If non-null, must be of length as m.
s - stencil width

Output Parameter

inra -the resulting distributed array object

Notes

The array data itself is NOT stored in the DA, it is stored in Vec objects; The appropriate vector objects can be obtained with calls to DACreateGlobalVector() and DACreateLocalVector() and calls to VecDuplicate() if more are needed.

Options Database Key

-da_view -Calls DAView() at the conclusion of DACreate1d()

Keywords

distributed array, create, one-dimensional

See Also

DADestroy(), DAView(), DACreate2d(), DACreate3d(), DAGlobalToLocalBegin(),
DAGlobalToLocalEnd(), DALocalToGlobal(), DALocalToLocalBegin(), DALocalToLocalEnd()

Examples

src/snes/examples/tutorials/ex3.c

Location: src/da/src/da1.c
IS and DA Index
Table of Contents