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
 10: PETSC_EXTERN_CXX_BEGIN

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

 15:    Level: intermediate

 17:   Concepts: global numbering

 19: .seealso:  AOCreateBasic(), AOCreateBasicIS(), AOPetscToApplication(), AOView(), AOApplicationToPetsc()
 20: S*/
 21: typedef struct _p_AO* AO;

 23: /*J
 24:     AOType - String with the name of a PETSc application ordering or the creation function
 25:        with an optional dynamic library name.

 27:    Level: beginner

 29: .seealso: AOSetType(), AO
 30: J*/
 31: #define AOType char*
 32: #define AOBASIC               "basic"
 33: #define AOADVANCED            "advanced"
 34: #define AOMAPPING             "mapping"
 35: #define AOMEMORYSCALABLE      "memoryscalable"

 37: /* Logging support */
 38: extern PetscClassId  AO_CLASSID;

 40: extern PetscErrorCode  AOInitializePackage(const char[]);

 42: extern PetscErrorCode  AOCreate(MPI_Comm,AO*);
 43: extern PetscErrorCode  AOSetIS(AO,IS,IS);
 44: extern PetscErrorCode  AOSetFromOptions(AO);

 46: extern PetscErrorCode  AOCreateBasic(MPI_Comm,PetscInt,const PetscInt[],const PetscInt[],AO*);
 47: extern PetscErrorCode  AOCreateBasicIS(IS,IS,AO*);
 48: extern PetscErrorCode  AOCreateMemoryScalable(MPI_Comm,PetscInt,const PetscInt[],const PetscInt[],AO*);
 49: extern PetscErrorCode  AOCreateMemoryScalableIS(IS,IS,AO*);
 50: extern PetscErrorCode  AOCreateMapping(MPI_Comm,PetscInt,const PetscInt[],const PetscInt[],AO*);
 51: extern PetscErrorCode  AOCreateMappingIS(IS,IS,AO*);

 53: extern PetscErrorCode  AOView(AO,PetscViewer);
 54: extern PetscErrorCode  AODestroy(AO*);

 56: /* Dynamic creation and loading functions */
 57: extern PetscFList AOList;
 58: extern PetscBool  AORegisterAllCalled;
 59: extern PetscErrorCode  AOSetType(AO, const AOType);
 60: extern PetscErrorCode  AOGetType(AO, const AOType *);

 62: extern PetscErrorCode  AORegister(const char [], const char [], const char [], PetscErrorCode (*)(AO));
 63: extern PetscErrorCode  AORegisterAll(const char []);
 64: extern PetscErrorCode  AORegisterDestroy(void);

 66: #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
 67: #define AORegisterDynamic(a,b,c,d) AORegister(a,b,c,0)
 68: #else
 69: #define AORegisterDynamic(a,b,c,d) AORegister(a,b,c,d)
 70: #endif

 72: extern PetscErrorCode  AOPetscToApplication(AO,PetscInt,PetscInt[]);
 73: extern PetscErrorCode  AOApplicationToPetsc(AO,PetscInt,PetscInt[]);
 74: extern PetscErrorCode  AOPetscToApplicationIS(AO,IS);
 75: extern PetscErrorCode  AOApplicationToPetscIS(AO,IS);

 77: extern PetscErrorCode  AOPetscToApplicationPermuteInt(AO, PetscInt, PetscInt[]);
 78: extern PetscErrorCode  AOApplicationToPetscPermuteInt(AO, PetscInt, PetscInt[]);
 79: extern PetscErrorCode  AOPetscToApplicationPermuteReal(AO, PetscInt, PetscReal[]);
 80: extern PetscErrorCode  AOApplicationToPetscPermuteReal(AO, PetscInt, PetscReal[]);

 82: extern PetscErrorCode  AOMappingHasApplicationIndex(AO, PetscInt, PetscBool  *);
 83: extern PetscErrorCode  AOMappingHasPetscIndex(AO, PetscInt, PetscBool  *);

 85: /* ----------------------------------------------------*/
 86: PETSC_EXTERN_CXX_END
 87: #endif