Skip to main content
Ctrl+K
PETSc v3.26.0-2-g3c5cfaeaff0b documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • PetscSection...

PetscSectionSetNumFields#

Sets the number of fields in a PetscSection

Synopsis#

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

Not Collective

Input Parameters#

  • s - the PetscSection

  • numFields - the number of fields

Notes#

Calling this destroys all the information in the PetscSection including the chart.

You must call PetscSectionSetChart() after calling this.

See Also#

PetscSection, PetscSection, PetscSectionGetNumFields(), PetscSectionSetChart(), PetscSectionReset()

Level#

intermediate

Location#

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

Examples#

src/vec/is/tests/ex5.c
src/dm/impls/plex/tutorials/ex7.c
src/dm/impls/forest/tests/ex3.c
src/dm/impls/plex/tests/ex21.c
src/dm/impls/plex/tests/ex22.c
src/dm/impls/plex/tests/ex26.c
src/dm/impls/plex/tests/ex26f90.F90
src/dm/impls/plex/tests/ex31.c
src/dm/impls/plex/tests/ex47.c
src/dm/impls/plex/tests/ex62f90.F90


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

On this page
  • Synopsis
  • Input Parameters
  • Notes
  • See Also
  • Level
  • Location
  • Examples
Edit on GitLab
Show Source

© Copyright 1991-2026, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2026-09-28T23:19:25-0500 (v3.26.0-2-g3c5cfaeaff0b).