Actual source code: petscdmnetwork.h
petsc-3.6.4 2016-04-12
1: /*
2: DMNetwork, for parallel unstructured network problems.
3: */
7: #include <petscdm.h>
9: /*
10: DMNetworkComponentGenericDataType - This is the data type that PETSc uses for storing the component data.
11: For compatibility with PetscSF, which is used for data distribution, its declared as PetscInt.
12: To get the user-specific data type, one needs to cast it to the appropriate type.
13: */
14: typedef PetscInt DMNetworkComponentGenericDataType;
16: PETSC_EXTERN PetscErrorCode DMNetworkCreate(MPI_Comm, DM*);
17: PETSC_EXTERN PetscErrorCode DMNetworkSetSizes(DM, PetscInt, PetscInt, PetscInt, PetscInt);
18: PETSC_EXTERN PetscErrorCode DMNetworkSetEdgeList(DM, int[]);
19: PETSC_EXTERN PetscErrorCode DMNetworkLayoutSetUp(DM);
20: PETSC_EXTERN PetscErrorCode DMNetworkRegisterComponent(DM, const char*, PetscInt, PetscInt*);
21: PETSC_EXTERN PetscErrorCode DMNetworkGetVertexRange(DM, PetscInt*, PetscInt*);
22: PETSC_EXTERN PetscErrorCode DMNetworkGetEdgeRange(DM, PetscInt*, PetscInt*);
23: PETSC_EXTERN PetscErrorCode DMNetworkAddComponent(DM, PetscInt, PetscInt, void*);
24: PETSC_EXTERN PetscErrorCode DMNetworkGetNumComponents(DM, PetscInt, PetscInt*);
25: PETSC_EXTERN PetscErrorCode DMNetworkGetComponentTypeOffset(DM, PetscInt, PetscInt, PetscInt*, PetscInt*);
26: PETSC_EXTERN PetscErrorCode DMNetworkGetVariableOffset(DM, PetscInt, PetscInt*);
27: PETSC_EXTERN PetscErrorCode DMNetworkGetVariableGlobalOffset(DM, PetscInt, PetscInt*);
28: PETSC_EXTERN PetscErrorCode DMNetworkAddNumVariables(DM, PetscInt, PetscInt);
29: PETSC_EXTERN PetscErrorCode DMNetworkSetNumVariables(DM, PetscInt, PetscInt);
30: PETSC_EXTERN PetscErrorCode DMNetworkGetComponentDataArray(DM, DMNetworkComponentGenericDataType**);
31: PETSC_EXTERN PetscErrorCode DMNetworkDistribute(DM, PetscInt,DM*);
32: PETSC_EXTERN PetscErrorCode DMNetworkGetSupportingEdges(DM, PetscInt, PetscInt*, const PetscInt*[]);
33: PETSC_EXTERN PetscErrorCode DMNetworkGetConnectedNodes(DM, PetscInt, const PetscInt*[]);
34: PETSC_EXTERN PetscErrorCode DMNetworkIsGhostVertex(DM, PetscInt, PetscBool*);
37: #endif