PetscSectionGetNumFields — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# PetscSectionGetNumFields

Returns the number of fields in a `PetscSection`, or 0 if no fields were defined.

## Synopsis

    #include "petscsection.h"
    PetscErrorCode PetscSectionGetNumFields(PetscSection s, PetscInt *numFields)

Not Collective

## Input Parameter

- s - the `PetscSection`

## Output Parameter

- numFields - the number of fields defined, or 0 if none were defined

## See Also

PetscSection, `PetscSection`, `PetscSectionSetNumFields()`

## Level

intermediate

## Location

src/vec/is/section/interface/section.c

## Examples

src/dm/impls/plex/tutorials/dmplexgetrestoreclosureindices.F90
src/ts/tutorials/ex18.c

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