petsc-3.14.6 2021-03-30
Report Typos and Errors

DMPlexCreateSquareBoundary

Creates a 1D mesh the is the boundary of a square lattice.

Synopsis

#include "petscdmplex.h"   
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateSquareBoundary(DM dm, const PetscReal lower[], const PetscReal upper[], const PetscInt edges[])
Collective

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

Output Parameter

dm - The DM object

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

18--5-17--4--16
 |     |     |
 6    10     3
 |     |     |
19-11-20--9--15
 |     |     |
 7     8     2
 |     |     |
12--0-13--1--14

See Also

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

Level

beginner

Location

src/dm/impls/plex/plexcreate.c
Index of all DMPLEX routines
Table of Contents for all manual pages
Index of all manual pages