xref: /petsc/include/petscsectiontypes.h (revision d5b43468fb8780a8feea140ccd6fa3e6a50411cc)
1 #ifndef PETSCSECTIONTYPES_H
2 #define PETSCSECTIONTYPES_H
3 
4 /* SUBMANSEC = PetscSection */
5 
6 /*S
7   PetscSection - Mapping from integers in a designated range to contiguous sets of integers.
8 
9   In contrast to `IS`, which maps from integers to single integers, 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()`.
15 
16   Level: beginner
17 
18 .seealso: `PetscSectionCreate()`, `PetscSectionDestroy()`, `PetscSectionSym`
19 S*/
20 typedef struct _p_PetscSection *PetscSection;
21 
22 /*S
23   PetscSectionSym - Symmetries of the data referenced by a `PetscSection`.
24 
25   Often the order of data index by a `PetscSection` is meaningful, and describes additional structure, such as points on a
26   line, grid, or lattice.  If the data is accessed from a different "orientation", then the image of the data under
27   access then undergoes a symmetry transformation.  A `PetscSectionSym` specifies these symmetries.  The types of
28   symmetries that can be specified are of the form R * P, where R is a diagonal matrix of scalars, and P is a permutation.
29 
30   Level: developer
31 
32 .seealso: `PetscSection`, `PetscSectionSymCreate()`, `PetscSectionSymDestroy()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`, `PetscSectionSetFieldSym()`,
33           `PetscSectionGetFieldSym()`, `PetscSectionGetSymPoints()`, `PetscSectionSymType`, `PetscSectionSymSetType()`, `PetscSectionSymGetType()`
34 S*/
35 typedef struct _p_PetscSectionSym *PetscSectionSym;
36 
37 /*J
38   PetscSectionSymType - String with the name of a `PetscSectionSym` type.
39 
40   Level: developer
41 
42   Note:
43   `PetscSectionSym` has no default implementation, but is used by `DM` in `PetscSectionSymCreateLabel()`.
44 
45 .seealso: `PetscSectionSymSetType()`, `PetscSectionSymGetType()`, `PetscSectionSym`, `PetscSectionSymCreate()`, `PetscSectionSymRegister()`
46 J*/
47 typedef const char *PetscSectionSymType;
48 
49 #endif
50