Date: 2021-03-03T22:26:46+00:00

Actual source code: petscpartitioner.h
petsc-3.14.5 2021-03-03
Report Typos and Errors

      1: #if !defined(PETSCPARTITIONER_H)
      2: #define PETSCPARTITIONER_H

      4: #include <petscsection.h>

      6: /*S
      7:   PetscPartitioner - PETSc object that manages a graph partitioner

      9:   Level: intermediate

     11: .seealso: PetscPartitionerCreate(), PetscPartitionerSetType(), PetscPartitionerType
     12: S*/
     13: typedef struct _p_PetscPartitioner *PetscPartitioner;

     15: PETSC_EXTERN PetscClassId PETSCPARTITIONER_CLASSID;
     16: PETSC_EXTERN PetscErrorCode PetscPartitionerInitializePackage(void);
     17: PETSC_EXTERN PetscErrorCode PetscPartitionerFinalizePackage(void);

     19: /*J
     20:   PetscPartitionerType - String with the name of a PETSc graph partitioner

     22:   Level: beginner

     24: .seealso: PetscPartitionerSetType(), PetscPartitioner
     25: J*/
     26: typedef const char *PetscPartitionerType;
     27: #define PETSCPARTITIONERPARMETIS "parmetis"
     28: #define PETSCPARTITIONERPTSCOTCH "ptscotch"
     29: #define PETSCPARTITIONERCHACO    "chaco"
     30: #define PETSCPARTITIONERSIMPLE   "simple"
     31: #define PETSCPARTITIONERSHELL    "shell"
     32: #define PETSCPARTITIONERGATHER   "gather"

     34: PETSC_EXTERN PetscFunctionList PetscPartitionerList;
     35: PETSC_EXTERN PetscErrorCode PetscPartitionerRegister(const char[], PetscErrorCode (*)(PetscPartitioner));

     37: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate(MPI_Comm, PetscPartitioner*);
     38: PETSC_EXTERN PetscErrorCode PetscPartitionerDestroy(PetscPartitioner*);
     39: PETSC_EXTERN PetscErrorCode PetscPartitionerSetType(PetscPartitioner, PetscPartitionerType);
     40: PETSC_EXTERN PetscErrorCode PetscPartitionerGetType(PetscPartitioner, PetscPartitionerType*);
     41: PETSC_EXTERN PetscErrorCode PetscPartitionerSetUp(PetscPartitioner);
     42: PETSC_EXTERN PetscErrorCode PetscPartitionerReset(PetscPartitioner);
     43: PETSC_EXTERN PetscErrorCode PetscPartitionerSetFromOptions(PetscPartitioner);
     44: PETSC_EXTERN PetscErrorCode PetscPartitionerViewFromOptions(PetscPartitioner, PetscObject, const char[]);
     45: PETSC_EXTERN PetscErrorCode PetscPartitionerView(PetscPartitioner, PetscViewer);
     46: PETSC_EXTERN PetscErrorCode PetscPartitionerPartition(PetscPartitioner, PetscInt, PetscInt, PetscInt[], PetscInt[], PetscSection, PetscSection, PetscSection, IS*);

     48: PETSC_EXTERN PetscErrorCode PetscPartitionerShellSetPartition(PetscPartitioner, PetscInt, const PetscInt[], const PetscInt[]);
     49: PETSC_EXTERN PetscErrorCode PetscPartitionerShellSetRandom(PetscPartitioner, PetscBool);
     50: PETSC_EXTERN PetscErrorCode PetscPartitionerShellGetRandom(PetscPartitioner, PetscBool*);

     52: /* We should implement MatPartitioning with PetscPartitioner */
     53: #include <petscmat.h>
     54: #define PETSCPARTITIONERMATPARTITIONING "matpartitioning"
     55: PETSC_EXTERN PetscErrorCode PetscPartitionerMatPartitioningGetMatPartitioning(PetscPartitioner, MatPartitioning*);

     57: #endif