xref: /petsc/include/petscistypes.h (revision 6524c165f7ddaf30fd7457737f668f984c8ababf)
1*6524c165SJacob Faibussowitsch #ifndef PETSCISTYPES_H
226bd1501SBarry Smith #define PETSCISTYPES_H
301e13f73SMatthew G. Knepley 
4ac09b921SBarry Smith /* SUBMANSEC = IS */
5ac09b921SBarry Smith 
601e13f73SMatthew G. Knepley /*S
787497f52SBarry Smith      IS - Abstract PETSc object that used for efficient indexing
801e13f73SMatthew G. Knepley 
901e13f73SMatthew G. Knepley    Level: beginner
1001e13f73SMatthew G. Knepley 
11db781477SPatrick Sanan .seealso: `ISCreateGeneral()`, `ISCreateBlock()`, `ISCreateStride()`, `ISGetIndices()`, `ISDestroy()`
1201e13f73SMatthew G. Knepley S*/
1301e13f73SMatthew G. Knepley typedef struct _p_IS *IS;
1401e13f73SMatthew G. Knepley 
1501e13f73SMatthew G. Knepley /*S
1601e13f73SMatthew G. Knepley    ISLocalToGlobalMapping - mappings from an arbitrary
1701e13f73SMatthew G. Knepley       local ordering from 0 to n-1 to a global PETSc ordering
1801e13f73SMatthew G. Knepley       used by a vector or matrix.
1901e13f73SMatthew G. Knepley 
2001e13f73SMatthew G. Knepley    Level: intermediate
2101e13f73SMatthew G. Knepley 
2287497f52SBarry Smith    Notes:
2387497f52SBarry Smith    Mapping from local to global is scalable; but global
24bdaf1daeSBarry Smith    to local may not be if the range of global values represented locally
2501e13f73SMatthew G. Knepley    is very large.
2601e13f73SMatthew G. Knepley 
2787497f52SBarry Smith    `ISLocalToGlobalMapping` is actually a private object; it is included
2887497f52SBarry Smith    here for the inline function `ISLocalToGlobalMappingApply()` to allow it to be inlined since
2901e13f73SMatthew G. Knepley    it is used so often.
3001e13f73SMatthew G. Knepley 
31db781477SPatrick Sanan .seealso: `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingApply()`, `ISLocalToGlobalMappingDestroy()`
3201e13f73SMatthew G. Knepley S*/
3301e13f73SMatthew G. Knepley typedef struct _p_ISLocalToGlobalMapping *ISLocalToGlobalMapping;
3401e13f73SMatthew G. Knepley 
3501e13f73SMatthew G. Knepley /*S
3687497f52SBarry Smith      ISColoring - sets of IS's that define a coloring of something, such as a graph defined by a sparse matrix
3701e13f73SMatthew G. Knepley 
3801e13f73SMatthew G. Knepley    Level: intermediate
3901e13f73SMatthew G. Knepley 
4001e13f73SMatthew G. Knepley     Notes:
4101e13f73SMatthew G. Knepley     One should not access the *is records below directly because they may not yet
4287497f52SBarry Smith     have been created. One should use `ISColoringGetIS()` to make sure they are
4301e13f73SMatthew G. Knepley     created when needed.
4401e13f73SMatthew G. Knepley 
4587497f52SBarry Smith     When the coloring type is `IS_COLORING_LOCAL` the coloring is in the local ordering of the unknowns.
46bdaf1daeSBarry Smith     That is the matching the local (ghosted) vector; a local to global mapping must be applied to map
47bdaf1daeSBarry Smith     them to the global ordering.
48bdaf1daeSBarry Smith 
4987497f52SBarry Smith     Developer Note:
5087497f52SBarry Smith     This is not a `PetscObject`
5101e13f73SMatthew G. Knepley 
52db781477SPatrick Sanan .seealso: `ISColoringCreate()`, `ISColoringGetIS()`, `ISColoringView()`
5301e13f73SMatthew G. Knepley S*/
5401e13f73SMatthew G. Knepley typedef struct _n_ISColoring *ISColoring;
5501e13f73SMatthew G. Knepley 
5601e13f73SMatthew G. Knepley /*S
5701e13f73SMatthew G. Knepley      PetscLayout - defines layout of vectors and matrices across processes (which rows are owned by which processes)
5801e13f73SMatthew G. Knepley 
5901e13f73SMatthew G. Knepley    Level: developer
6001e13f73SMatthew G. Knepley 
61db781477SPatrick Sanan .seealso: `PetscLayoutCreate()`, `PetscLayoutDestroy()`
6201e13f73SMatthew G. Knepley S*/
6301e13f73SMatthew G. Knepley typedef struct _n_PetscLayout *PetscLayout;
6401e13f73SMatthew G. Knepley 
6501e13f73SMatthew G. Knepley #endif
66