source:
issm/oecreview/Archive/13393-13976/ISSM-13863-13864.diff@
21726
Last change on this file since 21726 was 13980, checked in by , 12 years ago | |
---|---|
File size: 4.1 KB |
-
../trunk-jpl/src/wrappers/python/Makefile.am
32 32 ElementConnectivity.la\ 33 33 EnumToString.la\ 34 34 InterpFromMeshToMesh2d.la\ 35 MeshProfileIntersection.la\ 35 36 NodeConnectivity.la\ 36 37 StringToEnum.la\ 37 38 TriMesh.la\ … … 107 108 ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h 108 109 InterpFromMeshToMesh2d_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) 109 110 111 MeshProfileIntersection_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\ 112 ../MeshProfileIntersection/MeshProfileIntersection.h 113 MeshProfileIntersection_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) 114 110 115 NodeConnectivity_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\ 111 116 ../NodeConnectivity/NodeConnectivity.h 112 117 NodeConnectivity_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) -
../trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp
10 10 index,x,y is a triangulation 11 11 filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments) 12 12 output: 13 segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremiti s for a segment13 segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremities for a segment 14 14 belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the 15 15 mesh. 16 16 */ … … 25 25 _printLine_(" index,x,y is a triangulation"); 26 26 _printLine_(" filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)"); 27 27 _printLine_(" output:"); 28 _printLine_(" segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremiti s for a segment ");28 _printLine_(" segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremities for a segment "); 29 29 _printLine_(" belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the "); 30 30 _printLine_(" mesh."); 31 31 }/*}}}*/ … … 44 44 int dummy; 45 45 46 46 //contours 47 mxArray* matlabstructure=NULL;47 DataSet *domain = NULL; 48 48 Contour<double>** contours=NULL; 49 49 int numcontours; 50 50 Contour<double>* contouri=NULL; … … 56 56 /*Boot module: */ 57 57 MODULEBOOT(); 58 58 59 /*checks on arguments on the matlab side: */60 C heckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&MeshProfileIntersectionUsage);59 /*checks on arguments: */ 60 CHECKARGUMENTS(NLHS,NRHS,&MeshProfileIntersectionUsage); 61 61 62 /*First, call expread on filename to build a contour array in the matlab workspace: */63 mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");64 65 62 /*Fetch inputs: */ 66 63 //index 67 64 FetchData(&double_index,&nel,&dummy,INDEX); … … 77 74 FetchData(&y,&dummy,Y); 78 75 79 76 //contours 80 numcontours=mxGetNumberOfElements(matlabstructure); 77 FetchData(&domain,FILENAME); 78 // MeshProfileIntersectionx should be modified to take DataSet directly (and perhaps SeqMat and SeqVec). 79 numcontours=domain->Size(); 81 80 contours=xNew<Contour<double>*>(numcontours); 82 for(i=0;i<numcontours;i++){ 83 //allocate 84 contouri=xNew<Contour<double> >(1); 85 //retrieve dimension of this contour. 86 contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods")); 87 //set pointers. 88 contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x")); 89 contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y")); 90 *(contours+i)=contouri; 91 } 81 for(i=0;i<numcontours;i++) 82 *(contours+i)=(Contour<double>*)domain->GetObjectByOffset(i); 92 83 93 84 /* Debugging of contours :{{{1*/ 94 85 /*for(i=0;i<numcontours;i++){
Note:
See TracBrowser
for help on using the repository browser.