Changeset 11969
- Timestamp:
- 04/12/12 21:09:43 (13 years ago)
- Location:
- issm/trunk-jpl/src/mex/TriMesh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/mex/TriMesh/TriMesh.cpp
r11932 r11969 5 5 #include "./TriMesh.h" 6 6 7 WRAPPER(TriMesh , char* DOMAINOUTLINE, double AREA, bool ORDER){7 WRAPPER(TriMesh){ 8 8 9 9 /* input: */ … … 33 33 FetchData(&order,ORDER); 34 34 35 35 36 /*Read domain outline: */ 36 37 domain=DomainOutlineRead(domainname,false); … … 38 39 /*call x core: */ 39 40 TriMeshx(&index,&x,&y,&segments,&segmentmarkerlist,domain,area,order); 40 41 42 41 43 /*write outputs: */ 42 44 WriteData(INDEX,index); … … 56 58 /*end module: */ 57 59 MODULEEND(); 60 58 61 } 59 62 60 void TriMeshUsage(void) 63 void TriMeshUsage(void) //{{{1 61 64 { 62 65 printf("\n"); … … 70 73 printf("\n"); 71 74 } 72 73 74 #ifdef _HAVE_PYTHON_ 75 BOOST_PYTHON_MODULE(TriMesh){ 76 boost::python::numeric::array::set_module_and_type( "numpy", "ndarray"); 77 def("TriMesh",TriMesh); 78 } 79 #endif 75 //}}} -
issm/trunk-jpl/src/mex/TriMesh/TriMesh.h
r11932 r11969 13 13 #endif 14 14 15 /*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/ 16 #ifdef _HAVE_PYTHON_ 17 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol 18 #endif 19 15 20 #include "../../c/include/globals.h" 21 #include "../../c/toolkits/toolkits.h" 16 22 #include "../../c/include/include.h" 17 23 #include "../../c/modules/modules.h" … … 35 41 36 42 #endif 43 #ifdef _HAVE_PYTHON_ 44 /* serial input macros: */ 45 #define DOMAINOUTLINE PyTuple_GetItem(args,0) 46 #define AREA PyTuple_GetItem(args,1) 47 #define ORDER PyTuple_GetItem(args,2) 48 49 /* serial output macros: */ 50 #define INDEX output,0 51 #define X output,1 52 #define Y output,2 53 #define SEGMENTS output,3 54 #define SEGMENTMARKERLIST output,4 55 #endif 37 56 38 57 /* local prototypes: */
Note:
See TracChangeset
for help on using the changeset viewer.