Date: 2022-03-31T04:46:39+00:00

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: */
      6: #if !defined(PETSCAO_H)
      7: #define PETSCAO_H
      8: #include <petscis.h>

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

     13:    Level: intermediate

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

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

     23:    Level: beginner

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

     33: /* Logging support */
     34: PETSC_EXTERN PetscClassId AO_CLASSID;

     36: PETSC_EXTERN PetscErrorCode AOInitializePackage(void);

     38: PETSC_EXTERN PetscErrorCode AOCreate(MPI_Comm,AO*);
     39: PETSC_EXTERN PetscErrorCode AOSetIS(AO,IS,IS);
     40: PETSC_EXTERN PetscErrorCode AOSetFromOptions(AO);

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

     49: PETSC_EXTERN PetscErrorCode AOView(AO,PetscViewer);
     50: PETSC_EXTERN PetscErrorCode AOViewFromOptions(AO,PetscObject,const char[]);
     51: PETSC_EXTERN PetscErrorCode AODestroy(AO*);

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

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

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

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

     70: PETSC_EXTERN PetscErrorCode AOMappingHasApplicationIndex(AO, PetscInt, PetscBool  *);
     71: PETSC_EXTERN PetscErrorCode AOMappingHasPetscIndex(AO, PetscInt, PetscBool  *);

     73: /* ----------------------------------------------------*/
     74: #endif