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: */
     8:  #include petscis.h
     9:  #include petscmat.h

     12: typedef enum {AO_BASIC=0, AO_ADVANCED, AO_MAPPING, AO_NEW} AOType;

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

     17:    Level: intermediate

     19:   Concepts: global numbering

     21: .seealso:  AOCreateBasic(), AOCreateBasicIS(), AOPetscToApplication(), AOView()
     22: S*/
     23: typedef struct _p_AO* AO;

     25: /* Logging support */

     29: EXTERN PetscErrorCode DMInitializePackage(const char[]);

     31: EXTERN PetscErrorCode AOCreateBasic(MPI_Comm,PetscInt,const PetscInt[],const PetscInt[],AO*);
     32: EXTERN PetscErrorCode AOCreateBasicIS(IS,IS,AO*);

     34: EXTERN PetscErrorCode AOCreateMapping(MPI_Comm,PetscInt,const PetscInt[],const PetscInt[],AO*);
     35: EXTERN PetscErrorCode AOCreateMappingIS(IS,IS,AO*);

     37: EXTERN PetscErrorCode AOView(AO,PetscViewer);
     38: EXTERN PetscErrorCode AODestroy(AO);

     40: EXTERN PetscErrorCode AORegister_Private(const char [], const char [], const char [], PetscErrorCode (*)(AO));
     41: #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
     42: #define AORegister(a,b,c,d) AORegister_Private(a,b,c,0)
     43: #else
     44: #define AORegister(a,b,c,d) AORegister_Private(a,b,c,d)
     45: #endif

     47: EXTERN PetscErrorCode AOPetscToApplication(AO,PetscInt,PetscInt[]);
     48: EXTERN PetscErrorCode AOApplicationToPetsc(AO,PetscInt,PetscInt[]);
     49: EXTERN PetscErrorCode AOPetscToApplicationIS(AO,IS);
     50: EXTERN PetscErrorCode AOApplicationToPetscIS(AO,IS);

     52: EXTERN PetscErrorCode AOPetscToApplicationPermuteInt(AO, PetscInt, PetscInt[]);
     53: EXTERN PetscErrorCode AOApplicationToPetscPermuteInt(AO, PetscInt, PetscInt[]);
     54: EXTERN PetscErrorCode AOPetscToApplicationPermuteReal(AO, PetscInt, PetscReal[]);
     55: EXTERN PetscErrorCode AOApplicationToPetscPermuteReal(AO, PetscInt, PetscReal[]);

     57: EXTERN PetscErrorCode AOMappingHasApplicationIndex(AO, PetscInt, PetscTruth *);
     58: EXTERN PetscErrorCode AOMappingHasPetscIndex(AO, PetscInt, PetscTruth *);

     60: /* ----------------------------------------------------*/

     62: typedef enum {AODATA_BASIC=0,AODATA_ADVANCED=1} AODataType;

     64: /*S
     65:      AOData - Abstract PETSc object that manages complex parallel data structures intended to
     66:          hold grid information, etc

     68:    Level: advanced

     70: .seealso:  AODataCreateBasic()
     71: S*/
     72: typedef struct _p_AOData* AOData;

     74: EXTERN PetscErrorCode AODataCreateBasic(MPI_Comm,AOData *);
     75: EXTERN PetscErrorCode AODataView(AOData,PetscViewer);
     76: EXTERN PetscErrorCode AODataDestroy(AOData);
     77: EXTERN PetscErrorCode AODataLoadBasic(PetscViewer,AOData *);
     78: EXTERN PetscErrorCode AODataGetInfo(AOData,PetscInt*,char ***);

     80: EXTERN PetscErrorCode AODataKeyAdd(AOData,const char[],PetscInt,PetscInt);
     81: EXTERN PetscErrorCode AODataKeyRemove(AOData,const char[]);

     83: EXTERN PetscErrorCode AODataKeySetLocalToGlobalMapping(AOData,const char[],ISLocalToGlobalMapping);
     84: EXTERN PetscErrorCode AODataKeyGetLocalToGlobalMapping(AOData,const char[],ISLocalToGlobalMapping*);
     85: EXTERN PetscErrorCode AODataKeyRemap(AOData,const char[],AO);

     87: EXTERN PetscErrorCode AODataKeyExists(AOData,const char[],PetscTruth*);
     88: EXTERN PetscErrorCode AODataKeyGetInfo(AOData,const char[],PetscInt *,PetscInt*,PetscInt*,char***);
     89: EXTERN PetscErrorCode AODataKeyGetOwnershipRange(AOData,const char[],PetscInt *,PetscInt*);

     91: EXTERN PetscErrorCode AODataKeyGetNeighbors(AOData,const char[],PetscInt,PetscInt*,IS *);
     92: EXTERN PetscErrorCode AODataKeyGetNeighborsIS(AOData,const char[],IS,IS *);
     93: EXTERN PetscErrorCode AODataKeyGetAdjacency(AOData,const char[],Mat*);

     95: EXTERN PetscErrorCode AODataKeyGetActive(AOData,const char[],const char[],PetscInt,PetscInt *,PetscInt,IS*);
     96: EXTERN PetscErrorCode AODataKeyGetActiveIS(AOData,const char[],const char[],IS,PetscInt,IS*);
     97: EXTERN PetscErrorCode AODataKeyGetActiveLocal(AOData,const char[],const char[],PetscInt,PetscInt *,PetscInt,IS*);
     98: EXTERN PetscErrorCode AODataKeyGetActiveLocalIS(AOData,const char[],const char[],IS,PetscInt,IS*);

    100: EXTERN PetscErrorCode AODataKeyPartition(AOData,const char[]);

    102: EXTERN PetscErrorCode AODataSegmentAdd(AOData,const char[],const char[],PetscInt,PetscInt,PetscInt *,void *,PetscDataType);
    103: EXTERN PetscErrorCode AODataSegmentRemove(AOData,const char[],const char[]);
    104: EXTERN PetscErrorCode AODataSegmentAddIS(AOData,const char[],const char[],PetscInt,IS,void *,PetscDataType);

    106: EXTERN PetscErrorCode AODataSegmentExists(AOData,const char[],const char[],PetscTruth*);
    107: EXTERN PetscErrorCode AODataSegmentGetInfo(AOData,const char[],const char[],PetscInt *,PetscDataType*);

    109: EXTERN PetscErrorCode AODataSegmentGet(AOData,const char[],const char[],PetscInt,PetscInt*,void **);
    110: EXTERN PetscErrorCode AODataSegmentRestore(AOData,const char[],const char[],PetscInt,PetscInt*,void **);
    111: EXTERN PetscErrorCode AODataSegmentGetIS(AOData,const char[],const char[],IS,void **);
    112: EXTERN PetscErrorCode AODataSegmentRestoreIS(AOData,const char[],const char[],IS,void **);

    114: EXTERN PetscErrorCode AODataSegmentGetLocal(AOData,const char[],const char[],PetscInt,PetscInt*,void **);
    115: EXTERN PetscErrorCode AODataSegmentRestoreLocal(AOData,const char[],const char[],PetscInt,PetscInt*,void **);
    116: EXTERN PetscErrorCode AODataSegmentGetLocalIS(AOData,const char[],const char[],IS,void **);
    117: EXTERN PetscErrorCode AODataSegmentRestoreLocalIS(AOData,const char[],const char[],IS,void **);

    119: EXTERN PetscErrorCode AODataSegmentGetReduced(AOData,const char[],const char[],PetscInt,PetscInt*,IS *);
    120: EXTERN PetscErrorCode AODataSegmentGetReducedIS(AOData,const char[],const char[],IS,IS *);
    121: EXTERN PetscErrorCode AODataSegmentGetExtrema(AOData,const char[],const char[],void *,void *);

    123: EXTERN PetscErrorCode AODataSegmentPartition(AOData,const char[],const char[]);

    125: EXTERN PetscErrorCode AODataPartitionAndSetupLocal(AOData,const char[],const char[],IS*,IS*,ISLocalToGlobalMapping*);
    126: EXTERN PetscErrorCode AODataAliasAdd(AOData,const char[],const char[]);

    128:
    129: typedef struct _p_AOData2dGrid *AOData2dGrid;
    130: EXTERN PetscErrorCode AOData2dGridAddNode(AOData2dGrid, PetscReal, PetscReal, PetscInt *);
    131: EXTERN PetscErrorCode AOData2dGridInput(AOData2dGrid,PetscDraw);
    132: EXTERN PetscErrorCode AOData2dGridFlipCells(AOData2dGrid);
    133: EXTERN PetscErrorCode AOData2dGridComputeNeighbors(AOData2dGrid);
    134: EXTERN PetscErrorCode AOData2dGridComputeVertexBoundary(AOData2dGrid);
    135: EXTERN PetscErrorCode AOData2dGridDraw(AOData2dGrid,PetscDraw);
    136: EXTERN PetscErrorCode AOData2dGridDestroy(AOData2dGrid);
    137: EXTERN PetscErrorCode AOData2dGridCreate(AOData2dGrid*);
    138: EXTERN PetscErrorCode AOData2dGridToAOData(AOData2dGrid,AOData*);

    141: #endif