Ice Sheet System Model  4.18
Code documentation
MeshPartition.h
Go to the documentation of this file.
1 /*
2  MeshPartition.h
3 */
4 
5 #ifndef _MESHPARTITION_H
6 #define _MESHPARTITION_H
7 
8 #ifdef HAVE_CONFIG_H
9  #include <config.h>
10 #else
11  #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
12 #endif
13 
14 /*For python modules: needs to come before header files inclusion*/
15 #ifdef _HAVE_PYTHON_
16 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
17 #endif
18 
19 #include "../bindings.h"
20 #include "../../c/main/globals.h"
21 #include "../../c/modules/modules.h"
22 #include "../../c/shared/shared.h"
23 
24 #undef __FUNCT__
25 #define __FUNCT__ "MeshPartition"
26 
27 #ifdef _HAVE_MATLAB_MODULES_
28 /* serial input macros: */
29 #define NUMBEROFVERTICES prhs[0]
30 #define ELEMENTS prhs[1]
31 #define NUMBEROFVERTICES2D prhs[2]
32 #define ELEMENTS2D prhs[3]
33 #define NUMBEROFLAYERS prhs[4]
34 #define MESHELEMENTTYPE prhs[5]
35 #define NUMAREAS prhs[6]
36 /* serial output macros: */
37 #define ELEMENTPARTITIONING (mxArray**)&plhs[0]
38 #define NODEPARTITIONING (mxArray**)&plhs[1]
39 #endif
40 
41 #ifdef _HAVE_PYTHON_MODULES_
42 /* serial input macros: */
43 #define NUMBEROFVERTICES PyTuple_GetItem(args,0)
44 #define ELEMENTS PyTuple_GetItem(args,1)
45 #define NUMBEROFVERTICES2D PyTuple_GetItem(args,2)
46 #define ELEMENTS2D PyTuple_GetItem(args,3)
47 #define NUMBEROFLAYERS PyTuple_GetItem(args,4)
48 #define MESHELEMENTTYPE PyTuple_GetItem(args,5)
49 #define NUMAREAS PyTuple_GetItem(args,6)
50 /* serial output macros: */
51 #define ELEMENTPARTITIONING output,0
52 #define NODEPARTITIONING output,1
53 #endif
54 
55 /* serial arg counts: */
56 #undef NLHS
57 #define NLHS 2
58 #undef NRHS
59 #define NRHS 7
60 
61 #endif /* _MESHPARTITION_H */