# SDACreate2d

Creates a two-dimensional regular array that is distributed across some processors. This is the simplified interface, must be used with SDAXXX operations, NOT DAXXX operations.

### Synopsis

    #include "petscda.h"
    PetscErrorCode PETSCDM_DLLEXPORT SDACreate2d(MPI_Comm comm,DAPeriodicType wrap,DAStencilType stencil_type,
                    PetscInt M,PetscInt N,PetscInt m,PetscInt n,PetscInt w,PetscInt s,PetscInt *lx,PetscInt *ly,SDA *sda)

### Input Parameters

comm -MPI communicator
wrap -type of periodicity should the array have, if any

            DA_NONPERIODIC, DA_XPERIODIC,

            DA_YPERIODIC, DA_XYPERIODIC

stencil_type -stencil type 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 degress of freedom per node
s -stencil width
lx, ly -arrays containing the number of nodes in each cell along

              the x and y coordinates, or PETSC_NULL

### Output Parameter

inra -the resulting array object

### Keywords

distributed array, create, two-dimensional

### See Also

DADestroy(), DAView(), DACreate1d(), DACreate3d()

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