PetscWeakFormSetIndexJacobian — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscWeakFormSetIndexJacobian

Set the Jacobian pointwise functions `g0`, `g1`, `g2`, and `g3` at the given indices for a given key in a `PetscWeakForm`

## Synopsis

    #include "petscds.h"
    PetscErrorCode PetscWeakFormSetIndexJacobian(PetscWeakForm wf, DMLabel label, PetscInt val, PetscInt f, PetscInt g, PetscInt part, PetscInt i0, void (*g0)(PetscInt, PetscInt, PetscInt, const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], PetscReal, PetscReal, const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), PetscInt i1, void (*g1)(PetscInt, PetscInt, PetscInt, const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], PetscReal, PetscReal, const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), PetscInt i2, void (*g2)(PetscInt, PetscInt, PetscInt, const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], PetscReal, PetscReal, const PetscReal[], PetscInt, const PetscScalar[], PetscScalar[]), PetscInt i3, void (*g3)(PetscInt, PetscInt, PetscInt, const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[], PetscReal, 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 test field number

- g - The trial field number

- part - The equation part, or 0 if unused

- i0 - The index at which to store `g0` in the `g0` list

- g0 - The `g0` Jacobian pointwise function; a `NULL` is ignored

- i1 - The index at which to store `g1` in the `g1` list

- g1 - The `g1` Jacobian pointwise function; a `NULL` is ignored

- i2 - The index at which to store `g2` in the `g2` list

- g2 - The `g2` Jacobian pointwise function; a `NULL` is ignored

- i3 - The index at which to store `g3` in the `g3` list

- g3 - The `g3` Jacobian pointwise function; a `NULL` is ignored

## See Also

`PetscWeakForm`, `PetscWeakFormSetJacobian()`, `PetscWeakFormAddJacobian()`, `PetscWeakFormGetJacobian()`, `PetscWeakFormClearIndex()`

## Level

intermediate

## Location

src/dm/dt/interface/dtweakform.c

## Examples

src/snes/tutorials/ex23.c

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