xref: /petsc/include/petscistypes.h (revision ac09b9214d23ea9ad238aa607de9fa447fd4e91b)
126bd1501SBarry Smith #if !defined(PETSCISTYPES_H)
226bd1501SBarry Smith #define PETSCISTYPES_H
301e13f73SMatthew G. Knepley 
4*ac09b921SBarry Smith /* SUBMANSEC = IS */
5*ac09b921SBarry Smith 
601e13f73SMatthew G. Knepley /*S
701e13f73SMatthew G. Knepley      IS - Abstract PETSc object that allows 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 
22bdaf1daeSBarry Smith    Note: mapping from local to global is scalable; but global
23bdaf1daeSBarry Smith   to local may not be if the range of global values represented locally
2401e13f73SMatthew G. Knepley   is very large.
2501e13f73SMatthew G. Knepley 
2601e13f73SMatthew G. Knepley    Note: the ISLocalToGlobalMapping is actually a private object; it is included
2701e13f73SMatthew G. Knepley   here for the inline function ISLocalToGlobalMappingApply() to allow it to be inlined since
2801e13f73SMatthew G. Knepley   it is used so often.
2901e13f73SMatthew G. Knepley 
30db781477SPatrick Sanan .seealso: `ISLocalToGlobalMappingCreate()`, `ISLocalToGlobalMappingApply()`, `ISLocalToGlobalMappingDestroy()`
3101e13f73SMatthew G. Knepley S*/
3201e13f73SMatthew G. Knepley typedef struct _p_ISLocalToGlobalMapping* ISLocalToGlobalMapping;
3301e13f73SMatthew G. Knepley 
3401e13f73SMatthew G. Knepley /*S
3501e13f73SMatthew G. Knepley      ISColoring - sets of IS's that define a coloring
3601e13f73SMatthew G. Knepley               of the underlying indices
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
4201e13f73SMatthew G. Knepley     have been created. One should use ISColoringGetIS() to make sure they are
4301e13f73SMatthew G. Knepley     created when needed.
4401e13f73SMatthew G. Knepley 
45bdaf1daeSBarry 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 
4901e13f73SMatthew G. Knepley     Developer Note: this is not a PetscObject
5001e13f73SMatthew G. Knepley 
51db781477SPatrick Sanan .seealso: `ISColoringCreate()`, `ISColoringGetIS()`, `ISColoringView()`
5201e13f73SMatthew G. Knepley S*/
5301e13f73SMatthew G. Knepley typedef struct _n_ISColoring* ISColoring;
5401e13f73SMatthew G. Knepley 
5501e13f73SMatthew G. Knepley /*S
5601e13f73SMatthew G. Knepley      PetscLayout - defines layout of vectors and matrices across processes (which rows are owned by which processes)
5701e13f73SMatthew G. Knepley 
5801e13f73SMatthew G. Knepley    Level: developer
5901e13f73SMatthew G. Knepley 
60db781477SPatrick Sanan .seealso: `PetscLayoutCreate()`, `PetscLayoutDestroy()`
6101e13f73SMatthew G. Knepley S*/
6201e13f73SMatthew G. Knepley typedef struct _n_PetscLayout* PetscLayout;
6301e13f73SMatthew G. Knepley 
6401e13f73SMatthew G. Knepley #endif
65