xref: /petsc/include/petscistypes.h (revision bdaf1dae91ea9917a0704a3ac28f1f904c8fd5f5)
126bd1501SBarry Smith #if !defined(PETSCISTYPES_H)
226bd1501SBarry Smith #define PETSCISTYPES_H
301e13f73SMatthew G. Knepley 
401e13f73SMatthew G. Knepley /*S
501e13f73SMatthew G. Knepley      IS - Abstract PETSc object that allows indexing.
601e13f73SMatthew G. Knepley 
701e13f73SMatthew G. Knepley    Level: beginner
801e13f73SMatthew G. Knepley 
901e13f73SMatthew G. Knepley .seealso:  ISCreateGeneral(), ISCreateBlock(), ISCreateStride(), ISGetIndices(), ISDestroy()
1001e13f73SMatthew G. Knepley S*/
1101e13f73SMatthew G. Knepley typedef struct _p_IS* IS;
1201e13f73SMatthew G. Knepley 
1301e13f73SMatthew G. Knepley /*S
1401e13f73SMatthew G. Knepley    ISLocalToGlobalMapping - mappings from an arbitrary
1501e13f73SMatthew G. Knepley       local ordering from 0 to n-1 to a global PETSc ordering
1601e13f73SMatthew G. Knepley       used by a vector or matrix.
1701e13f73SMatthew G. Knepley 
1801e13f73SMatthew G. Knepley    Level: intermediate
1901e13f73SMatthew G. Knepley 
20*bdaf1daeSBarry Smith    Note: mapping from local to global is scalable; but global
21*bdaf1daeSBarry Smith   to local may not be if the range of global values represented locally
2201e13f73SMatthew G. Knepley   is very large.
2301e13f73SMatthew G. Knepley 
2401e13f73SMatthew G. Knepley    Note: the ISLocalToGlobalMapping is actually a private object; it is included
2501e13f73SMatthew G. Knepley   here for the inline function ISLocalToGlobalMappingApply() to allow it to be inlined since
2601e13f73SMatthew G. Knepley   it is used so often.
2701e13f73SMatthew G. Knepley 
28*bdaf1daeSBarry Smith .seealso:  ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingApply(), ISLocalToGlobalMappingDestroy()
2901e13f73SMatthew G. Knepley S*/
3001e13f73SMatthew G. Knepley typedef struct _p_ISLocalToGlobalMapping* ISLocalToGlobalMapping;
3101e13f73SMatthew G. Knepley 
3201e13f73SMatthew G. Knepley /*S
3301e13f73SMatthew G. Knepley      ISColoring - sets of IS's that define a coloring
3401e13f73SMatthew G. Knepley               of the underlying indices
3501e13f73SMatthew G. Knepley 
3601e13f73SMatthew G. Knepley    Level: intermediate
3701e13f73SMatthew G. Knepley 
3801e13f73SMatthew G. Knepley     Notes:
3901e13f73SMatthew G. Knepley         One should not access the *is records below directly because they may not yet
4001e13f73SMatthew G. Knepley     have been created. One should use ISColoringGetIS() to make sure they are
4101e13f73SMatthew G. Knepley     created when needed.
4201e13f73SMatthew G. Knepley 
43*bdaf1daeSBarry Smith         When the coloring type is IS_COLORING_LOCAL the coloring is in the local ordering of the unknowns.
44*bdaf1daeSBarry Smith     That is the matching the local (ghosted) vector; a local to global mapping must be applied to map
45*bdaf1daeSBarry Smith     them to the global ordering.
46*bdaf1daeSBarry Smith 
4701e13f73SMatthew G. Knepley     Developer Note: this is not a PetscObject
4801e13f73SMatthew G. Knepley 
49*bdaf1daeSBarry Smith .seealso:  ISColoringCreate(), ISColoringGetIS(), ISColoringView()
5001e13f73SMatthew G. Knepley S*/
5101e13f73SMatthew G. Knepley typedef struct _n_ISColoring* ISColoring;
5201e13f73SMatthew G. Knepley 
5301e13f73SMatthew G. Knepley /*S
5401e13f73SMatthew G. Knepley      PetscLayout - defines layout of vectors and matrices across processes (which rows are owned by which processes)
5501e13f73SMatthew G. Knepley 
5601e13f73SMatthew G. Knepley    Level: developer
5701e13f73SMatthew G. Knepley 
5801e13f73SMatthew G. Knepley 
5901e13f73SMatthew G. Knepley .seealso:  PetscLayoutCreate(), PetscLayoutDestroy()
6001e13f73SMatthew G. Knepley S*/
6101e13f73SMatthew G. Knepley typedef struct _n_PetscLayout* PetscLayout;
6201e13f73SMatthew G. Knepley 
6301e13f73SMatthew G. Knepley /*S
6401e13f73SMatthew G. Knepley   PetscSection - Mapping from integers in a designated range to contiguous sets of integers.
6501e13f73SMatthew G. Knepley 
6601e13f73SMatthew G. Knepley   In contrast to IS, which maps from integers to single integers, the range of a PetscSection is in the space of
6701e13f73SMatthew G. Knepley   contiguous sets of integers. These ranges are frequently interpreted as domains of other array-like objects,
6801e13f73SMatthew G. Knepley   especially other PetscSections, Vecs, and ISs. The domain is set with PetscSectionSetChart() and does not need to
6901e13f73SMatthew G. Knepley   start at 0. For each point in the domain of a PetscSection, the output set is represented through an offset and a
7001e13f73SMatthew G. Knepley   count, which are set using PetscSectionSetOffset() and PetscSectionSetDof() respectively. Lookup is typically using
7101e13f73SMatthew G. Knepley   accessors or routines like VecGetValuesSection().
7201e13f73SMatthew G. Knepley 
7301e13f73SMatthew G. Knepley   Level: developer
7401e13f73SMatthew G. Knepley 
7501e13f73SMatthew G. Knepley .seealso:  PetscSectionCreate(), PetscSectionDestroy()
7601e13f73SMatthew G. Knepley S*/
7701e13f73SMatthew G. Knepley typedef struct _p_PetscSection *PetscSection;
7801e13f73SMatthew G. Knepley 
79b5a418daSToby Isaac /*S
80b5a418daSToby Isaac   PetscSectionSym - Symmetries of the data referenced by a PetscSection.
81b5a418daSToby Isaac 
82b5a418daSToby Isaac   Often the order of data index by a PetscSection is meaningful, and describes additional structure, such as points on a
83b5a418daSToby Isaac   line, grid, or lattice.  If the data is accessed from a different "orientation", then the image of the data under
84b5a418daSToby Isaac   access then undergoes a symmetry transformation.  A PetscSectionSym specifies these symmetries.  The types of
85b5a418daSToby Isaac   symmetries that can be specified are of the form R * P, where R is a diagonal matrix of scalars, and P is a permutation.
86b5a418daSToby Isaac 
87b5a418daSToby Isaac   Level: developer
88b5a418daSToby Isaac 
89b5a418daSToby Isaac .seealso: PetscSectionSymCreate(), PetscSectionSymDestroy(), PetscSectionSetSym(), PetscSectionGetSym(), PetscSectionSetFieldSym(), PetscSectionGetFieldSym(), PetscSectionGetSymPoints()
90b5a418daSToby Isaac S*/
91b5a418daSToby Isaac typedef struct _p_PetscSectionSym *PetscSectionSym;
92b5a418daSToby Isaac 
9301e13f73SMatthew G. Knepley #endif
94