petsc-3.7.1 2016-05-15
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 Many br

Input Parameters

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

Output Parameter

dm -The DM object Many br

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

Many br

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