petsc-3.7.7 2017-09-25
Report Typos and Errors

# PetscSectionCreate

Allocates PetscSection space and sets the map contents to the default.

### Synopsis

    #include "petscvec.h"
    PetscErrorCode PetscSectionCreate(MPI_Comm comm, PetscSection *s)

Collective on MPI_Comm

### Input Parameters

| comm | - the MPI communicator
| s | - pointer to the section

Notes: Typical calling sequence

          PetscSectionCreate(MPI_Comm,PetscSection *);

          PetscSectionSetNumFields(PetscSection, numFields);

          PetscSectionSetChart(PetscSection,low,high);

          PetscSectionSetDof(PetscSection,point,numdof);

          PetscSectionSetUp(PetscSection);

          PetscSectionGetOffset(PetscSection,point,PetscInt *);

          PetscSectionDestroy(PetscSection);

The PetscSection object and methods are intended to be used in the PETSc Vec and Mat implementions; it is recommended they not be used in user codes unless you really gain something in their use.

### See Also

PetscSection, PetscSectionDestroy()

Level:developer
Location:src/vec/is/utils/vsectionis.c
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ts/examples/tutorials/ex11.c.html