Date: 2026-03-01T05:24:32+00:00

Actual source code: petscsectiontypes.h

      1: #pragma once

      3: /* MANSEC = Vec */
      4: /* SUBMANSEC = PetscSection */

      6: /*S
      7:   PetscSection - Mapping from integers in a designated range to contiguous sets of integers.

      9:   The range of a `PetscSection` is in the space of
     10:   contiguous sets of integers. These ranges are frequently interpreted as domains of other array-like objects,
     11:   especially other `PetscSection`, `Vec`s, and `IS`s. The domain is set with `PetscSectionSetChart()` and does not need to
     12:   start at 0. For each point in the domain of a `PetscSection`, the output set is represented through an offset and a
     13:   count, which are set using `PetscSectionSetOffset()` and `PetscSectionSetDof()` respectively. Lookup is typically using
     14:   accessors or routines like `VecGetValuesSection()`.

     16:   The `PetscSection` object and methods are intended to be used in the PETSc `Vec` and `Mat` implementations. The indices returned by the `PetscSection`
     17:   are appropriate for the kind of `Vec` it is associated with. For example, if the vector being indexed is a local vector, we call the section a
     18:   local section. If the section indexes a global vector, we call it a global section. For parallel vectors, like global vectors, we use negative
     19:   indices to indicate dofs owned by other processes.

     21:   Level: beginner

     23: .seealso: [PetscSection](ch_petscsection), `PetscSectionCreate()`, `PetscSectionDestroy()`, `PetscSectionSym`
     24: S*/
     25: typedef struct _p_PetscSection *PetscSection;

     27: /*S
     28:   PetscSectionSym - Symmetries of the data referenced by a `PetscSection`.

     30:   Often the order of data index by a `PetscSection` is meaningful, and describes additional structure, such as points on a
     31:   line, grid, or lattice.  If the data is accessed from a different "orientation", then the image of the data under
     32:   access then undergoes a symmetry transformation.  A `PetscSectionSym` specifies these symmetries.  The types of
     33:   symmetries that can be specified are of the form R * P, where R is a diagonal matrix of scalars, and P is a permutation.

     35:   Level: developer

     37: .seealso: [PetscSection](ch_petscsection), `PetscSection`, `PetscSectionSymCreate()`, `PetscSectionSymDestroy()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`, `PetscSectionSetFieldSym()`,
     38:           `PetscSectionGetFieldSym()`, `PetscSectionGetSymPoints()`, `PetscSectionSymType`, `PetscSectionSymSetType()`, `PetscSectionSymGetType()`
     39: S*/
     40: typedef struct _p_PetscSectionSym *PetscSectionSym;

     42: /*J
     43:   PetscSectionSymType - String with the name of a `PetscSectionSym` type.

     45:   Level: developer

     47:   Note:
     48:   `PetscSectionSym` has no default implementation, but is used by `DM` in `PetscSectionSymCreateLabel()`.

     50: .seealso: [PetscSection](ch_petscsection), `PetscSectionSymSetType()`, `PetscSectionSymGetType()`, `PetscSectionSym`, `PetscSectionSymCreate()`, `PetscSectionSymRegister()`
     51: J*/
     52: typedef const char *PetscSectionSymType;