Ice Sheet System Model
4.18
Code documentation
src
wrappers
Triangle
Triangle.h
Go to the documentation of this file.
1
/*
2
Triangle.h
3
*/
4
5
#ifndef _TRIANGLE_H
6
#define _TRIANGLE_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
#ifdef _HAVE_JAVASCRIPT_MODULES_
20
#undef _DO_NOT_LOAD_GLOBALS_
/*only module where this needs to be undefined, so as to
21
not include IssmComm several times in the javascript Modle construct.*/
22
#endif
23
24
/*Header files: */
25
#include "../bindings.h"
26
#include "../../c/main/globals.h"
27
#include "../../c/toolkits/toolkits.h"
28
#include "../../c/modules/modules.h"
29
#include "../../c/shared/shared.h"
30
#include "../../c/shared/io/io.h"
31
32
#undef __FUNCT__
33
#define __FUNCT__ "Triangle"
34
35
#ifdef _HAVE_MATLAB_MODULES_
36
/* serial input macros: */
37
#define DOMAINOUTLINE prhs[0]
38
#define RIFTSOUTLINE prhs[1]
39
#define AREA prhs[2]
40
/* serial output macros: */
41
#define INDEX (mxArray**)&plhs[0]
42
#define X (mxArray**)&plhs[1]
43
#define Y (mxArray**)&plhs[2]
44
#define SEGMENTS (mxArray**)&plhs[3]
45
#define SEGMENTMARKERLIST (mxArray**)&plhs[4]
46
#endif
47
48
#ifdef _HAVE_PYTHON_MODULES_
49
/* serial input macros: */
50
#define DOMAINOUTLINE PyTuple_GetItem(args,0)
51
#define RIFTSOUTLINE PyTuple_GetItem(args,1)
52
#define AREA PyTuple_GetItem(args,2)
53
/* serial output macros: */
54
#define INDEX output,0
55
#define X output,1
56
#define Y output,2
57
#define SEGMENTS output,3
58
#define SEGMENTMARKERLIST output,4
59
#endif
60
61
#ifdef _HAVE_JAVASCRIPT_MODULES_
62
/* serial input macros: */
63
#define DOMAINOUTLINE domainx,domainy,domainnods
64
#define RIFTSOUTLINE NULL,NULL,0
65
#define AREA areain
66
/* serial output macros: */
67
#define INDEX pindex,pnel
68
#define X px,pnods
69
#define Y py,pnods
70
#define SEGMENTS psegments,pnsegs
71
#define SEGMENTMARKERLIST psegmentmarkers,pnsegs
72
#define WRAPPER(modulename) extern "C" { int TriangleModule(double** pindex, double** px, double** py, int* pnel, int* pnods, double** psegments, double** psegmentmarkers, int* pnsegs, double* domainx, double* domainy, int domainnods, double areain)
73
#define _DO_NOT_LOAD_GLOBALS_//we only load globals for TriangleModule.js, not other modules!
74
#endif
75
76
77
/* serial arg counts: */
78
#undef NLHS
79
#define NLHS 5
80
#undef NRHS
81
#define NRHS 3
82
83
#endif
/* _TRIANGLE_H */
Generated on Thu Jul 2 2020 08:09:16 for Ice Sheet System Model by
1.8.19