petsc-3.14.6 2021-03-30
Report Typos and Errors

DMSetField

Set the discretization object for a given DM field

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMSetField(DM dm, PetscInt f, DMLabel label, PetscObject field)
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
field - The discretization object

See Also

DMAddField(), DMGetField()

Level

intermediate

Location

src/dm/interface/dm.c

Examples

src/dm/field/tutorials/ex1.c.html
src/snes/tutorials/ex12.c.html
src/snes/tutorials/ex17.c.html
src/snes/tutorials/ex56.c.html
src/snes/tutorials/ex62.c.html
src/snes/tutorials/ex77.c.html
src/ts/tutorials/ex45.c.html
src/ts/tutorials/ex46.c.html
src/ts/tutorials/ex48.c.html
src/tao/tutorials/ex1.c.html
src/tao/tutorials/ex2.c.html

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