xref: /petsc/include/petscsectiontypes.h (revision 6524c165f7ddaf30fd7457737f668f984c8ababf)
1*6524c165SJacob Faibussowitsch #ifndef PETSCSECTIONTYPES_H
2ea844a1aSMatthew Knepley #define PETSCSECTIONTYPES_H
3ea844a1aSMatthew Knepley 
4ac09b921SBarry Smith /* SUBMANSEC = PetscSection */
5ac09b921SBarry Smith 
6ea844a1aSMatthew Knepley /*S
7ea844a1aSMatthew Knepley   PetscSection - Mapping from integers in a designated range to contiguous sets of integers.
8ea844a1aSMatthew Knepley 
987497f52SBarry Smith   In contrast to `IS`, which maps from integers to single integers, the range of a `PetscSection` is in the space of
10ea844a1aSMatthew Knepley   contiguous sets of integers. These ranges are frequently interpreted as domains of other array-like objects,
1187497f52SBarry Smith   especially other `PetscSection`, `Vec`s, and `IS`s. The domain is set with `PetscSectionSetChart()` and does not need to
1287497f52SBarry Smith   start at 0. For each point in the domain of a `PetscSection`, the output set is represented through an offset and a
1387497f52SBarry Smith   count, which are set using `PetscSectionSetOffset()` and `PetscSectionSetDof()` respectively. Lookup is typically using
1487497f52SBarry Smith   accessors or routines like `VecGetValuesSection()`.
15ea844a1aSMatthew Knepley 
16ea844a1aSMatthew Knepley   Level: beginner
17ea844a1aSMatthew Knepley 
18db781477SPatrick Sanan .seealso: `PetscSectionCreate()`, `PetscSectionDestroy()`, `PetscSectionSym`
19ea844a1aSMatthew Knepley S*/
20ea844a1aSMatthew Knepley typedef struct _p_PetscSection *PetscSection;
21ea844a1aSMatthew Knepley 
22ea844a1aSMatthew Knepley /*S
2387497f52SBarry Smith   PetscSectionSym - Symmetries of the data referenced by a `PetscSection`.
24ea844a1aSMatthew Knepley 
2587497f52SBarry Smith   Often the order of data index by a `PetscSection` is meaningful, and describes additional structure, such as points on a
26ea844a1aSMatthew Knepley   line, grid, or lattice.  If the data is accessed from a different "orientation", then the image of the data under
2787497f52SBarry Smith   access then undergoes a symmetry transformation.  A `PetscSectionSym` specifies these symmetries.  The types of
28ea844a1aSMatthew Knepley   symmetries that can be specified are of the form R * P, where R is a diagonal matrix of scalars, and P is a permutation.
29ea844a1aSMatthew Knepley 
30ea844a1aSMatthew Knepley   Level: developer
31ea844a1aSMatthew Knepley 
32db781477SPatrick Sanan .seealso: `PetscSection`, `PetscSectionSymCreate()`, `PetscSectionSymDestroy()`, `PetscSectionSetSym()`, `PetscSectionGetSym()`, `PetscSectionSetFieldSym()`,
33db781477SPatrick Sanan           `PetscSectionGetFieldSym()`, `PetscSectionGetSymPoints()`, `PetscSectionSymType`, `PetscSectionSymSetType()`, `PetscSectionSymGetType()`
34ea844a1aSMatthew Knepley S*/
35ea844a1aSMatthew Knepley typedef struct _p_PetscSectionSym *PetscSectionSym;
36ea844a1aSMatthew Knepley 
37ea844a1aSMatthew Knepley /*J
3887497f52SBarry Smith   PetscSectionSymType - String with the name of a `PetscSectionSym` type.
39ea844a1aSMatthew Knepley 
40ea844a1aSMatthew Knepley   Level: developer
41ea844a1aSMatthew Knepley 
4287497f52SBarry Smith   Note:
4387497f52SBarry Smith   `PetscSectionSym` has no default implementation, but is used by `DM` in `PetscSectionSymCreateLabel()`.
44ea844a1aSMatthew Knepley 
45db781477SPatrick Sanan .seealso: `PetscSectionSymSetType()`, `PetscSectionSymGetType()`, `PetscSectionSym`, `PetscSectionSymCreate()`, `PetscSectionSymRegister()`
46ea844a1aSMatthew Knepley J*/
47ea844a1aSMatthew Knepley typedef const char *PetscSectionSymType;
48ea844a1aSMatthew Knepley 
49ea844a1aSMatthew Knepley #endif
50