DMFieldCreateDA#

Create a DMField of type DMFIELDDA that represents a multilinear field on a DMDA given by its values at the corners of the reference element.

Synopsis#

#include "petscdmfield.h" 
#include "petscdm.h" 
PetscErrorCode DMFieldCreateDA(DM dm, PetscInt nc, const PetscScalar *cornerValues, DMField *field)

Collective

Input Parameters#

  • dm - the DMDA on which the field lives

  • nc - the number of components of the field

  • cornerValues - array of length nc * (1 << dim) holding the field values at each corner of the reference element, ordered by lexicographic corner index

Output Parameter#

  • field - the newly created DMField

Note#

Internally the corner values are converted to coefficients of a tensor-product multilinear polynomial so that evaluation at arbitrary points is inexpensive.

See Also#

DMField, DMFIELDDA, DMDA, DMFieldCreate(), DMFieldCreateDS(), DMFieldCreateShell()

Level#

intermediate

Location#

src/dm/field/impls/da/dmfieldda.c

Examples#

src/dm/field/tutorials/ex1.c


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