DACreate2d

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

Synopsis

int DACreate2d(MPI_Comm comm,DAPeriodicType wrap,DAStencilType stencil_type,
                int M,int N,int m,int n,int w,int s,int *lx,int *ly,DA *inra)
Collective on MPI_Comm

Input Parameters

comm - MPI communicator
wrap - type of periodicity should the array have. Use one of DA_NONPERIODIC, DA_XPERIODIC, DA_YPERIODIC, or DA_XYPERIODIC.
stencil_type - stencil type. Use either DA_STENCIL_BOX or DA_STENCIL_STAR.
M,N - global dimension in each direction of the array
m,n - corresponding number of processors in each dimension (or PETSC_DECIDE to have calculated)
w - number of degrees of freedom per node
lx, ly - arrays containing the number of nodes in each cell along the x and y coordinates, or PETSC_NULL. If non-null, these must be of length as m and n, and the corresponding m and n cannot be PETSC_DECIDE.
s - stencil width

Output Parameter

inra -the resulting distributed array object

Options Database Key

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

Notes

The stencil type DA_STENCIL_STAR with width 1 corresponds to thestandard 5-pt stencil, while DA_STENCIL_BOX with width 1 denotesthe standard 9-pt stencil.

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.

Keywords

distributed array, create, two-dimensional

See Also

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

Examples

src/sles/examples/tutorials/ex14f.F
src/sles/examples/tutorials/ex14.c
src/snes/examples/tutorials/ex5f.F
src/snes/examples/tutorials/ex5f90.F
src/snes/examples/tutorials/ex5.c
src/snes/examples/tutorials/ex7.c
src/snes/examples/tutorials/ex8.c
src/snes/examples/tutorials/ex9.c

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