petsc-3.6.2 2015-10-02
Report Typos and Errors

# DMPlexCreateSquareMesh

Creates a 2D mesh for a square lattice.

### Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexCreateSquareMesh(DM dm, const PetscReal lower[], const PetscReal upper[], const PetscInt edges[], DMBoundaryType bdX, DMBoundaryType bdY)

Collective on MPI_Comm

### Input Parameters

| comm | - The communicator for the DM object
| lower | - The lower left corner coordinates
| upper | - The upper right corner coordinates
| edges | - The number of cells in each direction
| bdX | - The boundary type for the X direction
| bdY | - The boundary type for the Y direction

### Output Parameter

dm -The DM object

### Note: Here is the numbering returned for 2 cells in each direction

    22--8-23--9--24

     |     |     |

    13  2 14  3  15

     |     |     |

    19--6-20--7--21

     |     |     |

    10  0 11  1 12

     |     |     |

    16--4-17--5--18

### Keywords

DM, create

### See Also

DMPlexCreateBoxMesh(), DMPlexCreateSquareBoundary(), DMPlexCreateCubeBoundary(), DMSetType(), DMCreate()

Level:beginner
Location: src/dm/impls/plex/plexcreate.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages