DMSetField#
Set the discretization object for a given DM
field. Usually one would call DMAddField()
which automatically handles the field numbering.
Synopsis#
#include "petscdm.h"
#include "petscdmlabel.h"
#include "petscds.h"
PetscErrorCode DMSetField(DM dm, PetscInt f, DMLabel label, PetscObject disc)
Logically collective on dm
Input Parameters#
dm - The
DM
f - The field number
label - The label indicating the support of the field, or NULL for the entire mesh
disc - The discretization object
See Also#
DMAddField()
, DMGetField()
Level#
intermediate
Location#
Examples#
src/dm/impls/swarm/tutorials/ex1.c.html
src/dm/impls/swarm/tutorials/ex1f90.F90.html
src/dm/dt/dualspace/impls/lagrange/tutorials/ex2.c.html
src/dm/field/tutorials/ex1.c.html
src/snes/tutorials/ex12.c.html
src/snes/tutorials/ex13.c.html
src/snes/tutorials/ex17.c.html
src/snes/tutorials/ex20.c.html
src/snes/tutorials/ex23.c.html
src/snes/tutorials/ex24.c.html
src/snes/tutorials/ex26.c.html
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages