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

DMProjectFunctionLabelLocal

This projects the given function into the function space provided, putting the coefficients in a local vector, setting values only for points in the given label.

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMProjectFunctionLabelLocal(DM dm, PetscReal time, DMLabel label, PetscInt numIds, const PetscInt ids[], PetscInt Nc, const PetscInt comps[], PetscErrorCode (**funcs)(PetscInt, PetscReal, const PetscReal [], PetscInt, PetscScalar *, void *), void **ctxs, InsertMode mode, Vec localX)
Not collective

Input Parameters

dm - The DM
time - The time
label - The DMLabel selecting the portion of the mesh for projection
funcs - The coordinate functions to evaluate, one per field
ctxs - Optional array of contexts to pass to each coordinate function. ctxs itself may be null.
mode - The insertion mode for values

Output Parameter

localX - vector

Calling sequence of func

   func(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar u[], void *ctx);

dim - The spatial dimension
x - The coordinates
Nf - The number of fields
u - The output field values
ctx - optional user-defined function context

See Also

DMProjectFunction(), DMProjectFunctionLocal(), DMProjectFunctionLabel(), DMComputeL2Diff()

Level

developer

Location

src/dm/interface/dm.c

Implementations

DMProjectFunctionLabelLocal_pforest(DM dm, PetscReal time, DMLabel label, PetscInt numIds, const PetscInt ids[], PetscInt Ncc, const PetscInt comps[], PetscErrorCode (**funcs) in src/dm/impls/forest/p4est/pforest.c
DMProjectFunctionLabelLocal_Plex(DM dm, PetscReal time, DMLabel label, PetscInt numIds, const PetscInt ids[], PetscInt Ncc, const PetscInt comps[], PetscErrorCode (**funcs) in src/dm/impls/plex/plexproject.c

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