PetscWeakFormSetIndexResidual#

Set the residual pointwise functions f0 and f1 at the given indices for a given key in a PetscWeakForm

Synopsis#

#include "petscds.h" 
PetscErrorCode PetscWeakFormSetIndexResidual(PetscWeakForm wf, DMLabel label, PetscInt val, PetscInt f, PetscInt part, PetscInt i0, void (*f0)(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[]), PetscInt i1, void (*f1)(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[]))

Not Collective

Input Parameters#

  • wf - The PetscWeakForm

  • label - The label selecting the mesh region, or NULL for the entire domain

  • val - The label value selecting the mesh region

  • f - The field number

  • part - The equation part, or 0 if unused

  • i0 - The index at which to store f0 in the f0 list

  • f0 - The f0 residual pointwise function; a NULL is ignored

  • i1 - The index at which to store f1 in the f1 list

  • f1 - The f1 residual pointwise function; a NULL is ignored

See Also#

PetscWeakForm, PetscWeakFormSetResidual(), PetscWeakFormAddResidual(), PetscWeakFormGetResidual(), PetscWeakFormClearIndex()

Level#

intermediate

Location#

src/dm/dt/interface/dtweakform.c

Examples#

src/ts/tutorials/ex76.c
src/snes/tutorials/ex23.c
src/snes/tutorials/ex17.c


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