Actual source code: dmnetworkimpl.h
petsc-3.6.3 2015-12-03
1: #if !defined(_NETWORKIMPL_H)
2: #define _NETWORKIMPL_H
4: #include <petscmat.h> /*I "petscmat.h" I*/
5: #include <petscdmnetwork.h> /*I "petscdmnetwork.h" I*/
6: #include petsc/private/dmimpl.h
8: #define MAX_DATA_AT_POINT 14
10: typedef struct _p_DMNetworkComponentHeader *DMNetworkComponentHeader;
11: struct _p_DMNetworkComponentHeader {
12: PetscInt ndata;
13: PetscInt size[MAX_DATA_AT_POINT];
14: PetscInt key[MAX_DATA_AT_POINT];
15: PetscInt offset[MAX_DATA_AT_POINT];
16: };
18: typedef struct _p_DMNetworkComponentValue *DMNetworkComponentValue;
19: struct _p_DMNetworkComponentValue {
20: void* data[MAX_DATA_AT_POINT];
21: };
23: typedef struct {
24: char name[20];
25: PetscInt size;
26: }DMNetworkComponent;
28: typedef struct {
29: PetscInt refct; /* reference count */
30: PetscInt NEdges; /* Number of global edges */
31: PetscInt NNodes; /* Number of global nodes */
32: PetscInt nEdges; /* Number of local edges */
33: PetscInt nNodes; /* Number of local nodes */
34: int *edges; /* Edge list */
35: PetscInt pStart,pEnd; /* Start and end indices for topological points */
36: PetscInt vStart,vEnd; /* Start and end indices for vertices */
37: PetscInt eStart,eEnd; /* Start and end indices for edges */
38: DM plex; /* DM created from Plex */
39: PetscSection DataSection; /* Section for managing parameter distribution */
40: PetscSection DofSection; /* Section for managing data distribution */
41: PetscSection GlobalDofSection; /* Global Dof section */
42: PetscInt ncomponent; /* Number of components */
43: DMNetworkComponent component[10]; /* List of components */
44: DMNetworkComponentHeader header;
45: DMNetworkComponentValue cvalue;
46: PetscInt dataheadersize;
47: DMNetworkComponentGenericDataType *componentdataarray; /* Array to hold the data */
48: } DM_Network;
50: #endif /* _NETWORKIMPL_H */