petsc-3.13.6 2020-09-29
Report Typos and Errors

PetscDSAddBoundary

Add a boundary condition to the model

Synopsis

#include "petscds.h" 
PetscErrorCode PetscDSAddBoundary(PetscDS ds, 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

ds - The PetscDS object
type - The type of condition, e.g. DM_BC_ESSENTIAL/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 (0 will constrain all fields)
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

PetscDSGetBoundary()

Level

developer

Location

src/dm/dt/interface/dtds.c

Examples

src/snes/tutorials/ex12.c.html
src/snes/tutorials/ex56.c.html
src/snes/tutorials/ex62.c.html
src/snes/tutorials/ex77.c.html
src/ts/tutorials/ex11.c.html
src/ts/tutorials/ex48.c.html
src/tao/tutorials/ex1.c.html
src/tao/tutorials/ex2.c.html
src/tao/tutorials/ex3.c.html

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