1*26bd1501SBarry Smith #if !defined(PETSCISTYPES_H) 2*26bd1501SBarry 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 Concepts: indexing, stride 1001e13f73SMatthew G. Knepley 1101e13f73SMatthew G. Knepley .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 2201e13f73SMatthew G. Knepley Note: mapping from Local to Global is scalable; but Global 2301e13f73SMatthew G. Knepley 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 3001e13f73SMatthew G. Knepley .seealso: ISLocalToGlobalMappingCreate() 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 4501e13f73SMatthew G. Knepley Developer Note: this is not a PetscObject 4601e13f73SMatthew G. Knepley 4701e13f73SMatthew G. Knepley .seealso: ISColoringCreate(), ISColoringGetIS(), ISColoringView(), ISColoringGetIS() 4801e13f73SMatthew G. Knepley S*/ 4901e13f73SMatthew G. Knepley typedef struct _n_ISColoring* ISColoring; 5001e13f73SMatthew G. Knepley 5101e13f73SMatthew G. Knepley /*S 5201e13f73SMatthew G. Knepley PetscLayout - defines layout of vectors and matrices across processes (which rows are owned by which processes) 5301e13f73SMatthew G. Knepley 5401e13f73SMatthew G. Knepley Level: developer 5501e13f73SMatthew G. Knepley 5601e13f73SMatthew G. Knepley 5701e13f73SMatthew G. Knepley .seealso: PetscLayoutCreate(), PetscLayoutDestroy() 5801e13f73SMatthew G. Knepley S*/ 5901e13f73SMatthew G. Knepley typedef struct _n_PetscLayout* PetscLayout; 6001e13f73SMatthew G. Knepley 6101e13f73SMatthew G. Knepley /*S 6201e13f73SMatthew G. Knepley PetscSection - Mapping from integers in a designated range to contiguous sets of integers. 6301e13f73SMatthew G. Knepley 6401e13f73SMatthew G. Knepley In contrast to IS, which maps from integers to single integers, the range of a PetscSection is in the space of 6501e13f73SMatthew G. Knepley contiguous sets of integers. These ranges are frequently interpreted as domains of other array-like objects, 6601e13f73SMatthew G. Knepley especially other PetscSections, Vecs, and ISs. The domain is set with PetscSectionSetChart() and does not need to 6701e13f73SMatthew G. Knepley start at 0. For each point in the domain of a PetscSection, the output set is represented through an offset and a 6801e13f73SMatthew G. Knepley count, which are set using PetscSectionSetOffset() and PetscSectionSetDof() respectively. Lookup is typically using 6901e13f73SMatthew G. Knepley accessors or routines like VecGetValuesSection(). 7001e13f73SMatthew G. Knepley 7101e13f73SMatthew G. Knepley Level: developer 7201e13f73SMatthew G. Knepley 7301e13f73SMatthew G. Knepley .seealso: PetscSectionCreate(), PetscSectionDestroy() 7401e13f73SMatthew G. Knepley S*/ 7501e13f73SMatthew G. Knepley typedef struct _p_PetscSection *PetscSection; 7601e13f73SMatthew G. Knepley 77b5a418daSToby Isaac /*S 78b5a418daSToby Isaac PetscSectionSym - Symmetries of the data referenced by a PetscSection. 79b5a418daSToby Isaac 80b5a418daSToby Isaac Often the order of data index by a PetscSection is meaningful, and describes additional structure, such as points on a 81b5a418daSToby Isaac line, grid, or lattice. If the data is accessed from a different "orientation", then the image of the data under 82b5a418daSToby Isaac access then undergoes a symmetry transformation. A PetscSectionSym specifies these symmetries. The types of 83b5a418daSToby 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. 84b5a418daSToby Isaac 85b5a418daSToby Isaac Level: developer 86b5a418daSToby Isaac 87b5a418daSToby Isaac .seealso: PetscSectionSymCreate(), PetscSectionSymDestroy(), PetscSectionSetSym(), PetscSectionGetSym(), PetscSectionSetFieldSym(), PetscSectionGetFieldSym(), PetscSectionGetSymPoints() 88b5a418daSToby Isaac S*/ 89b5a418daSToby Isaac typedef struct _p_PetscSectionSym *PetscSectionSym; 90b5a418daSToby Isaac 9101e13f73SMatthew G. Knepley #endif 92