Actual source code: petscao.h

petsc-3.3-p7 2013-05-11
  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

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

 14:    Level: intermediate

 16:   Concepts: global numbering

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

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

 26:    Level: beginner

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

 36: /* Logging support */
 37: PETSC_EXTERN PetscClassId AO_CLASSID;

 39: PETSC_EXTERN PetscErrorCode AOInitializePackage(const char[]);

 41: PETSC_EXTERN PetscErrorCode AOCreate(MPI_Comm,AO*);
 42: PETSC_EXTERN PetscErrorCode AOSetIS(AO,IS,IS);
 43: PETSC_EXTERN PetscErrorCode AOSetFromOptions(AO);

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

 52: PETSC_EXTERN PetscErrorCode AOView(AO,PetscViewer);
 53: PETSC_EXTERN PetscErrorCode AODestroy(AO*);

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

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

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

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

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

 81: PETSC_EXTERN PetscErrorCode AOMappingHasApplicationIndex(AO, PetscInt, PetscBool  *);
 82: PETSC_EXTERN PetscErrorCode AOMappingHasPetscIndex(AO, PetscInt, PetscBool  *);

 84: /* ----------------------------------------------------*/
 85: #endif