Actual source code: petscao.h
1: #ifndef PETSCAO_H
2: #define PETSCAO_H
4: #include <petscis.h>
6: /* SUBMANSEC = AO */
8: /*S
9: AO - Abstract PETSc object that manages mapping between different global numbering
11: Level: intermediate
13: Notes:
14: An application ordering is mapping between an application-centric
15: ordering (the ordering that is "natural" for the application) and
16: the parallel ordering that PETSc uses.
18: .seealso: `AOCreateBasic()`, `AOCreateBasicIS()`, `AOPetscToApplication()`, `AOView()`, `AOApplicationToPetsc()`, `AOType`, `AOSetType()`
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: typedef const char *AOType;
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(void);
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 AOViewFromOptions(AO, PetscObject, const char[]);
54: PETSC_EXTERN PetscErrorCode AODestroy(AO *);
56: /* Dynamic creation and loading functions */
57: PETSC_EXTERN PetscFunctionList AOList;
58: PETSC_EXTERN PetscErrorCode AOSetType(AO, AOType);
59: PETSC_EXTERN PetscErrorCode AOGetType(AO, AOType *);
61: PETSC_EXTERN PetscErrorCode AORegister(const char[], PetscErrorCode (*)(AO));
63: PETSC_EXTERN PetscErrorCode AOPetscToApplication(AO, PetscInt, PetscInt[]);
64: PETSC_EXTERN PetscErrorCode AOApplicationToPetsc(AO, PetscInt, PetscInt[]);
65: PETSC_EXTERN PetscErrorCode AOPetscToApplicationIS(AO, IS);
66: PETSC_EXTERN PetscErrorCode AOApplicationToPetscIS(AO, IS);
68: PETSC_EXTERN PetscErrorCode AOPetscToApplicationPermuteInt(AO, PetscInt, PetscInt[]);
69: PETSC_EXTERN PetscErrorCode AOApplicationToPetscPermuteInt(AO, PetscInt, PetscInt[]);
70: PETSC_EXTERN PetscErrorCode AOPetscToApplicationPermuteReal(AO, PetscInt, PetscReal[]);
71: PETSC_EXTERN PetscErrorCode AOApplicationToPetscPermuteReal(AO, PetscInt, PetscReal[]);
73: PETSC_EXTERN PetscErrorCode AOMappingHasApplicationIndex(AO, PetscInt, PetscBool *);
74: PETSC_EXTERN PetscErrorCode AOMappingHasPetscIndex(AO, PetscInt, PetscBool *);
76: /* ----------------------------------------------------*/
77: #endif