Actual source code: isimpl.h

  1: /* $Id: isimpl.h,v 1.27 2001/06/21 21:15:49 bsmith Exp $ */

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

  7: */

  9: #if !defined(_IS_H)
 10: #define _IS_H

 12:  #include petscis.h

 14: struct _ISOps {
 15:   int  (*getsize)(IS,int*),
 16:        (*getlocalsize)(IS,int*),
 17:        (*getindices)(IS,int**),
 18:        (*restoreindices)(IS,int**),
 19:        (*invertpermutation)(IS,int,IS*),
 20:        (*sortindices)(IS),
 21:        (*sorted)(IS,PetscTruth *),
 22:        (*duplicate)(IS,IS *),
 23:        (*destroy)(IS),
 24:        (*view)(IS,PetscViewer),
 25:        (*identity)(IS,PetscTruth*);
 26: };

 28: #if defined(__cplusplus)
 29: class ISOps {
 30:   public:
 31:     int getsize(int*) {return 0;};
 32: };
 33: #endif

 35: struct _p_IS {
 36:   PETSCHEADER(struct _ISOps)
 37: #if defined(__cplusplus)
 38:   ISOps        *cops;
 39: #endif
 40:   PetscTruth   isperm;          /* if is a permutation */
 41:   int          max,min;         /* range of possible values */
 42:   void         *data;
 43:   PetscTruth   isidentity;
 44: };


 47: #endif