Actual source code: petscao.h

petsc-3.7.3 2016-08-01
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,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,obj,name);}
 53: PETSC_EXTERN PetscErrorCode AODestroy(AO*);

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

 60: PETSC_EXTERN PetscErrorCode AORegister(const char [], PetscErrorCode (*)(AO));

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

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

 72: PETSC_EXTERN PetscErrorCode AOMappingHasApplicationIndex(AO, PetscInt, PetscBool  *);
 73: PETSC_EXTERN PetscErrorCode AOMappingHasPetscIndex(AO, PetscInt, PetscBool  *);

 75: /* ----------------------------------------------------*/
 76: #endif