Ice Sheet System Model  4.18
Code documentation
ElementConnectivity.h
Go to the documentation of this file.
1 /*
2  ElementConnectivity.h
3 */
4 
5 #ifndef _ELEMENTCONNECTIVITY_H
6 #define _ELEMENTCONNECTIVITY_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 /*Header files: */
20 #include "../bindings.h"
21 #include "../../c/main/globals.h"
22 #include "../../c/toolkits/toolkits.h"
23 #include "../../c/modules/modules.h"
24 #include "../../c/shared/shared.h"
25 #include "../../c/shared/io/io.h"
26 
27 #undef __FUNCT__
28 #define __FUNCT__ "ElementConnectivity"
29 
30 #ifdef _HAVE_MATLAB_MODULES_
31 /* serial input macros: */
32 #define ELEMENTS prhs[0]
33 #define NODECONNECTIVITY prhs[1]
34 /* serial output macros: */
35 #define ELEMENTCONNECTIVITY (mxArray**)&plhs[0]
36 #endif
37 
38 #ifdef _HAVE_PYTHON_MODULES_
39 /* serial input macros: */
40 #define ELEMENTS PyTuple_GetItem(args,0)
41 #define NODECONNECTIVITY PyTuple_GetItem(args,1)
42 /* serial output macros: */
43 #define ELEMENTCONNECTIVITY output,0
44 #endif
45 
46 #ifdef _HAVE_JAVASCRIPT_MODULES_
47 /* serial input macros: */
48 #define ELEMENTS elementsin, nelsin,3
49 #define NODECONNECTIVITY nodeconnectivityin, nodsin, widthin
50 /* serial output macros: */
51 #define ELEMENTCONNECTIVITY pelementconnectivity,NULL,NULL
52 #define WRAPPER(modulename) extern "C" { int ElementConnectivityModule(double** pelementconnectivity, int* elementsin, int* nodeconnectivityin, int nelsin, int nodsin, int widthin)
53 #endif
54 
55 /* serial arg counts: */
56 #undef NLHS
57 #define NLHS 1
58 #undef NRHS
59 #define NRHS 2
60 
61 #endif /* _ELEMENTCONNECTIVITY_H */