petsc-3.10.2 2018-10-09
Report Typos and Errors

DMAddBoundary

Add a boundary condition to the model

Synopsis

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

Input Parameters

dm - The DM, with a PetscDS that matches the problem being constrained
type - The type of condition, e.g. DM_BC_ESSENTIAL_ANALYTIC/DM_BC_ESSENTIAL_FIELD (Dirichlet), or DM_BC_NATURAL (Neumann)
name - The BC name
labelname - The label defining constrained points
field - The field to constrain
numcomps - The number of constrained field components
comps - An array of constrained component numbers
bcFunc - A pointwise function giving boundary values
numids - The number of DMLabel ids for constrained points
ids - An array of ids for constrained points
ctx - An optional user context for bcFunc

Options Database Keys

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

See Also

DMGetBoundary()

Level

developer

Location

src/dm/interface/dm.c

Examples

src/dm/impls/plex/examples/tutorials/ex2.c.html
src/snes/examples/tutorials/ex56.c.html

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages