Actual source code: petscao.h

      1: /*
      2:   An application ordering is mapping between an application-centric
      3:   ordering (the ordering that is "natural" for the application) and
      4:   the parallel ordering that PETSc uses.
      5: */
     8:  #include petscis.h
     9:  #include petscmat.h

     12: typedef enum {AO_BASIC=0, AO_ADVANCED=1, AO_MAPPING=2} AOType;

     14: /*S
     15:      AO - Abstract PETSc object that manages mapping between different global numbering

     17:    Level: intermediate

     19:   Concepts: global numbering

     21: .seealso:  AOCreateBasic(), AOCreateBasicIS(), AOPetscToApplication(), AOView()
     22: S*/
     23: typedef struct _p_AO* AO;

     25: /* Logging support */

     28: EXTERN PetscErrorCode  DMInitializePackage(const char[]);

     30: EXTERN PetscErrorCode  AOCreateBasic(MPI_Comm,PetscInt,const PetscInt[],const PetscInt[],AO*);
     31: EXTERN PetscErrorCode  AOCreateBasicIS(IS,IS,AO*);

     33: EXTERN PetscErrorCode  AOCreateMapping(MPI_Comm,PetscInt,const PetscInt[],const PetscInt[],AO*);
     34: EXTERN PetscErrorCode  AOCreateMappingIS(IS,IS,AO*);

     36: EXTERN PetscErrorCode  AOView(AO,PetscViewer);
     37: EXTERN PetscErrorCode  AODestroy(AO);

     39: EXTERN PetscErrorCode  AORegister(const char [], const char [], const char [], PetscErrorCode (*)(AO));
     40: #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
     41: #define AORegisterDynamic(a,b,c,d) AORegister(a,b,c,0)
     42: #else
     43: #define AORegisterDynamic(a,b,c,d) AORegister(a,b,c,d)
     44: #endif

     46: EXTERN PetscErrorCode  AOPetscToApplication(AO,PetscInt,PetscInt[]);
     47: EXTERN PetscErrorCode  AOApplicationToPetsc(AO,PetscInt,PetscInt[]);
     48: EXTERN PetscErrorCode  AOPetscToApplicationIS(AO,IS);
     49: EXTERN PetscErrorCode  AOApplicationToPetscIS(AO,IS);

     51: EXTERN PetscErrorCode  AOPetscToApplicationPermuteInt(AO, PetscInt, PetscInt[]);
     52: EXTERN PetscErrorCode  AOApplicationToPetscPermuteInt(AO, PetscInt, PetscInt[]);
     53: EXTERN PetscErrorCode  AOPetscToApplicationPermuteReal(AO, PetscInt, PetscReal[]);
     54: EXTERN PetscErrorCode  AOApplicationToPetscPermuteReal(AO, PetscInt, PetscReal[]);

     56: EXTERN PetscErrorCode  AOMappingHasApplicationIndex(AO, PetscInt, PetscTruth *);
     57: EXTERN PetscErrorCode  AOMappingHasPetscIndex(AO, PetscInt, PetscTruth *);

     59: /* ----------------------------------------------------*/
     61: #endif