:orphan: # DMPlexInsertBoundaryValuesEssentialField Insert boundary values into a local vector using a function of the coordinates and field data ## Synopsis ``` #include "petscdmplex.h" PetscErrorCode DMPlexInsertBoundaryValuesEssentialField(DM dm, PetscReal time, Vec locU, PetscInt field, PetscInt Nc, const PetscInt comps[], DMLabel label, PetscInt numids, const PetscInt ids[], void (*func)(PetscInt, PetscInt, PetscInt, const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], PetscReal, const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), void *ctx, Vec locX) ``` ## Input Parameters - ***dm -*** The `DM`, with a `PetscDS` that matches the problem being constrained - ***time -*** The time - ***locU -*** A local vector with the input solution values - ***field -*** The field to constrain - ***Nc -*** The number of constrained field components, or 0 for all components - ***comps -*** An array of constrained component numbers, or `NULL` for all components - ***label -*** The `DMLabel` defining constrained points - ***numids -*** The number of `DMLabel` ids for constrained points - ***ids -*** An array of ids for constrained points - ***func -*** A pointwise function giving boundary values - ***ctx -*** An optional user context for bcFunc ## Output Parameter - ***locX -*** A local vector to receives the boundary values ## See Also [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexInsertBoundaryValuesEssential()`, `DMPlexInsertBoundaryValuesEssentialBdField()`, `DMAddBoundary()` ## Level developer ## Location src/dm/impls/plex/plexfem.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexfem.c) [Index of all DMPlex routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)