PetscWeakFormGetIndexObjective — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscWeakFormGetIndexObjective

Retrieve a single objective pointwise function at the given index for a given key from a `PetscWeakForm`

## Synopsis

    #include "petscds.h"
    PetscErrorCode PetscWeakFormGetIndexObjective(PetscWeakForm wf, DMLabel label, PetscInt val, PetscInt f, PetscInt part, PetscInt ind, void (**obj)(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

- ind - The index into the list of objective pointwise functions for this key

## Output Parameter

- obj - The objective pointwise function at position `ind`, or `NULL` if no function is registered for this key

## See Also

`PetscWeakForm`, `PetscWeakFormSetIndexObjective()`, `PetscWeakFormGetObjective()`, `PetscWeakFormSetObjective()`, `PetscWeakFormAddObjective()`

## Level

intermediate

## Location

src/dm/dt/interface/dtweakform.c

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