xref: /petsc/include/petscistypes.h (revision db7814771ca77b190574494e87b584e981451db0)
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 
9*db781477SPatrick Sanan .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 
20bdaf1daeSBarry Smith    Note: mapping from local to global is scalable; but global
21bdaf1daeSBarry 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*db781477SPatrick Sanan .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 
43bdaf1daeSBarry Smith         When the coloring type is IS_COLORING_LOCAL the coloring is in the local ordering of the unknowns.
44bdaf1daeSBarry Smith     That is the matching the local (ghosted) vector; a local to global mapping must be applied to map
45bdaf1daeSBarry Smith     them to the global ordering.
46bdaf1daeSBarry Smith 
4701e13f73SMatthew G. Knepley     Developer Note: this is not a PetscObject
4801e13f73SMatthew G. Knepley 
49*db781477SPatrick Sanan .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 
58*db781477SPatrick Sanan .seealso: `PetscLayoutCreate()`, `PetscLayoutDestroy()`
5901e13f73SMatthew G. Knepley S*/
6001e13f73SMatthew G. Knepley typedef struct _n_PetscLayout* PetscLayout;
6101e13f73SMatthew G. Knepley 
6201e13f73SMatthew G. Knepley #endif
63