petsc-3.7.1 2016-05-15
Report Typos and Errors

DMAddBoundary

Add a boundary condition to the model

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
PetscErrorCode DMAddBoundary(DM dm, PetscBool isEssential, const char name[], const char labelname[], PetscInt field, PetscInt numcomps, const PetscInt *comps, void (*bcFunc)(), PetscInt numids, const PetscInt *ids, void *ctx)

Input Parameters

dm - The mesh object Many br
isEssential - Flag for an essential (Dirichlet) condition, as opposed to a natural (Neumann) condition Many br
name - The BC name Many br
labelname - The label defining constrained points Many br
field - The field to constrain Many br
numcomps - The number of constrained field components Many br
comps - An array of constrained component numbers Many br
bcFunc - A pointwise function giving boundary values Many br
numids - The number of DMLabel ids for constrained points Many br
ids - An array of ids for constrained points Many br
ctx - An optional user context for bcFunc Many br

Options Database Keys

-bc_<boundary name> <num> - Overrides the boundary ids Many br
-bc_<boundary name>_comp <num> - Overrides the boundary components Many br

Many br

See Also

DMGetBoundary()

Level:developer
Location:
src/dm/interface/dm.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex62.c.html
src/snes/examples/tutorials/ex77.c.html
src/ts/examples/tutorials/ex11.c.html