Changeset 13864
- Timestamp:
- 11/01/12 11:04:25 (12 years ago)
- Location:
- issm/trunk-jpl/src/wrappers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp
r13236 r13864 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. … … 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."); … … 45 45 46 46 //contours 47 mxArray* matlabstructure=NULL;47 DataSet *domain = NULL; 48 48 Contour<double>** contours=NULL; 49 49 int numcontours; … … 57 57 MODULEBOOT(); 58 58 59 /*checks on arguments on the matlab side: */ 60 CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&MeshProfileIntersectionUsage); 61 62 /*First, call expread on filename to build a contour array in the matlab workspace: */ 63 mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread"); 59 /*checks on arguments: */ 60 CHECKARGUMENTS(NLHS,NRHS,&MeshProfileIntersectionUsage); 64 61 65 62 /*Fetch inputs: */ … … 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*/ -
issm/trunk-jpl/src/wrappers/python/Makefile.am
r13831 r13864 33 33 EnumToString.la\ 34 34 InterpFromMeshToMesh2d.la\ 35 MeshProfileIntersection.la\ 35 36 NodeConnectivity.la\ 36 37 StringToEnum.la\ … … 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
Note:
See TracChangeset
for help on using the changeset viewer.