xref: /petsc/include/petscistypes.h (revision 01e13f7363797b80262b2aca243ce72bcaa53640)
1*01e13f73SMatthew G. Knepley #if !defined(_PETSCSITYPES_H)
2*01e13f73SMatthew G. Knepley #define _PETSCISTYPES_H
3*01e13f73SMatthew G. Knepley 
4*01e13f73SMatthew G. Knepley /*S
5*01e13f73SMatthew G. Knepley      IS - Abstract PETSc object that allows indexing.
6*01e13f73SMatthew G. Knepley 
7*01e13f73SMatthew G. Knepley    Level: beginner
8*01e13f73SMatthew G. Knepley 
9*01e13f73SMatthew G. Knepley   Concepts: indexing, stride
10*01e13f73SMatthew G. Knepley 
11*01e13f73SMatthew G. Knepley .seealso:  ISCreateGeneral(), ISCreateBlock(), ISCreateStride(), ISGetIndices(), ISDestroy()
12*01e13f73SMatthew G. Knepley S*/
13*01e13f73SMatthew G. Knepley typedef struct _p_IS* IS;
14*01e13f73SMatthew G. Knepley 
15*01e13f73SMatthew G. Knepley /*S
16*01e13f73SMatthew G. Knepley    ISLocalToGlobalMapping - mappings from an arbitrary
17*01e13f73SMatthew G. Knepley       local ordering from 0 to n-1 to a global PETSc ordering
18*01e13f73SMatthew G. Knepley       used by a vector or matrix.
19*01e13f73SMatthew G. Knepley 
20*01e13f73SMatthew G. Knepley    Level: intermediate
21*01e13f73SMatthew G. Knepley 
22*01e13f73SMatthew G. Knepley    Note: mapping from Local to Global is scalable; but Global
23*01e13f73SMatthew G. Knepley   to Local may not be if the range of global values represented locally
24*01e13f73SMatthew G. Knepley   is very large.
25*01e13f73SMatthew G. Knepley 
26*01e13f73SMatthew G. Knepley    Note: the ISLocalToGlobalMapping is actually a private object; it is included
27*01e13f73SMatthew G. Knepley   here for the inline function ISLocalToGlobalMappingApply() to allow it to be inlined since
28*01e13f73SMatthew G. Knepley   it is used so often.
29*01e13f73SMatthew G. Knepley 
30*01e13f73SMatthew G. Knepley .seealso:  ISLocalToGlobalMappingCreate()
31*01e13f73SMatthew G. Knepley S*/
32*01e13f73SMatthew G. Knepley typedef struct _p_ISLocalToGlobalMapping* ISLocalToGlobalMapping;
33*01e13f73SMatthew G. Knepley 
34*01e13f73SMatthew G. Knepley /*S
35*01e13f73SMatthew G. Knepley      ISColoring - sets of IS's that define a coloring
36*01e13f73SMatthew G. Knepley               of the underlying indices
37*01e13f73SMatthew G. Knepley 
38*01e13f73SMatthew G. Knepley    Level: intermediate
39*01e13f73SMatthew G. Knepley 
40*01e13f73SMatthew G. Knepley     Notes:
41*01e13f73SMatthew G. Knepley         One should not access the *is records below directly because they may not yet
42*01e13f73SMatthew G. Knepley     have been created. One should use ISColoringGetIS() to make sure they are
43*01e13f73SMatthew G. Knepley     created when needed.
44*01e13f73SMatthew G. Knepley 
45*01e13f73SMatthew G. Knepley     Developer Note: this is not a PetscObject
46*01e13f73SMatthew G. Knepley 
47*01e13f73SMatthew G. Knepley .seealso:  ISColoringCreate(), ISColoringGetIS(), ISColoringView(), ISColoringGetIS()
48*01e13f73SMatthew G. Knepley S*/
49*01e13f73SMatthew G. Knepley typedef struct _n_ISColoring* ISColoring;
50*01e13f73SMatthew G. Knepley 
51*01e13f73SMatthew G. Knepley /*S
52*01e13f73SMatthew G. Knepley      PetscLayout - defines layout of vectors and matrices across processes (which rows are owned by which processes)
53*01e13f73SMatthew G. Knepley 
54*01e13f73SMatthew G. Knepley    Level: developer
55*01e13f73SMatthew G. Knepley 
56*01e13f73SMatthew G. Knepley 
57*01e13f73SMatthew G. Knepley .seealso:  PetscLayoutCreate(), PetscLayoutDestroy()
58*01e13f73SMatthew G. Knepley S*/
59*01e13f73SMatthew G. Knepley typedef struct _n_PetscLayout* PetscLayout;
60*01e13f73SMatthew G. Knepley 
61*01e13f73SMatthew G. Knepley /*S
62*01e13f73SMatthew G. Knepley   PetscSection - Mapping from integers in a designated range to contiguous sets of integers.
63*01e13f73SMatthew G. Knepley 
64*01e13f73SMatthew G. Knepley   In contrast to IS, which maps from integers to single integers, the range of a PetscSection is in the space of
65*01e13f73SMatthew G. Knepley   contiguous sets of integers. These ranges are frequently interpreted as domains of other array-like objects,
66*01e13f73SMatthew G. Knepley   especially other PetscSections, Vecs, and ISs. The domain is set with PetscSectionSetChart() and does not need to
67*01e13f73SMatthew G. Knepley   start at 0. For each point in the domain of a PetscSection, the output set is represented through an offset and a
68*01e13f73SMatthew G. Knepley   count, which are set using PetscSectionSetOffset() and PetscSectionSetDof() respectively. Lookup is typically using
69*01e13f73SMatthew G. Knepley   accessors or routines like VecGetValuesSection().
70*01e13f73SMatthew G. Knepley 
71*01e13f73SMatthew G. Knepley   Level: developer
72*01e13f73SMatthew G. Knepley 
73*01e13f73SMatthew G. Knepley .seealso:  PetscSectionCreate(), PetscSectionDestroy()
74*01e13f73SMatthew G. Knepley S*/
75*01e13f73SMatthew G. Knepley typedef struct _p_PetscSection *PetscSection;
76*01e13f73SMatthew G. Knepley 
77*01e13f73SMatthew G. Knepley #endif
78