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,PetscInt**);
 16:   PetscErrorCode (*restoreindices)(IS,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: };

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


 35: #endif