Actual source code: petscao.h

petsc-3.5.2 2014-09-08
Report Typos and Errors
  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>

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

 13:    Level: intermediate

 15:   Concepts: global numbering

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

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

 25:    Level: beginner

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

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

 38: PETSC_EXTERN PetscErrorCode AOInitializePackage(void);

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

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

 51: PETSC_EXTERN PetscErrorCode AOView(AO,PetscViewer);
 52: PETSC_STATIC_INLINE PetscErrorCode AOViewFromOptions(AO A,const char prefix[],const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,prefix,name);}
 53: PETSC_EXTERN PetscErrorCode AODestroy(AO*);

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

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

 64: PETSC_EXTERN PetscErrorCode AOPetscToApplication(AO,PetscInt,PetscInt[]);
 65: PETSC_EXTERN PetscErrorCode AOApplicationToPetsc(AO,PetscInt,PetscInt[]);
 66: PETSC_EXTERN PetscErrorCode AOPetscToApplicationIS(AO,IS);
 67: PETSC_EXTERN PetscErrorCode AOApplicationToPetscIS(AO,IS);

 69: PETSC_EXTERN PetscErrorCode AOPetscToApplicationPermuteInt(AO, PetscInt, PetscInt[]);
 70: PETSC_EXTERN PetscErrorCode AOApplicationToPetscPermuteInt(AO, PetscInt, PetscInt[]);
 71: PETSC_EXTERN PetscErrorCode AOPetscToApplicationPermuteReal(AO, PetscInt, PetscReal[]);
 72: PETSC_EXTERN PetscErrorCode AOApplicationToPetscPermuteReal(AO, PetscInt, PetscReal[]);

 74: PETSC_EXTERN PetscErrorCode AOMappingHasApplicationIndex(AO, PetscInt, PetscBool  *);
 75: PETSC_EXTERN PetscErrorCode AOMappingHasPetscIndex(AO, PetscInt, PetscBool  *);

 77: /* ----------------------------------------------------*/
 78: #endif