Actual source code: isimpl.h

  1: /*
  2:     Index sets for scatter-gather type operations in vectors
  3: and matrices. 

  5: */

  7: #if !defined(_IS_H)
  8: #define _IS_H

 10:  #include petscis.h

 12: struct _ISOps {
 13:   PetscErrorCode (*getsize)(IS,PetscInt*);
 14:   PetscErrorCode (*getlocalsize)(IS,PetscInt*);
 15:   PetscErrorCode (*getindices)(IS,const PetscInt*[]);
 16:   PetscErrorCode (*restoreindices)(IS,const PetscInt*[]);
 17:   PetscErrorCode (*invertpermutation)(IS,PetscInt,IS*);
 18:   PetscErrorCode (*sortindices)(IS);
 19:   PetscErrorCode (*sorted)(IS,PetscTruth *);
 20:   PetscErrorCode (*duplicate)(IS,IS *);
 21:   PetscErrorCode (*destroy)(IS);
 22:   PetscErrorCode (*view)(IS,PetscViewer);
 23:   PetscErrorCode (*identity)(IS,PetscTruth*);
 24:   PetscErrorCode (*copy)(IS,IS);
 25: };

 27: struct _p_IS {
 28:   PETSCHEADER(struct _ISOps);
 29:   PetscTruth   isperm;          /* if is a permutation */
 30:   PetscInt     max,min;         /* range of possible values */
 31:   void         *data;
 32:   PetscTruth   isidentity;
 33: };


 36: #endif