[13980] | 1 | Index: ../trunk-jpl/src/wrappers/python/Makefile.am
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/wrappers/python/Makefile.am (revision 13863)
|
---|
| 4 | +++ ../trunk-jpl/src/wrappers/python/Makefile.am (revision 13864)
|
---|
| 5 | @@ -32,6 +32,7 @@
|
---|
| 6 | ElementConnectivity.la\
|
---|
| 7 | EnumToString.la\
|
---|
| 8 | InterpFromMeshToMesh2d.la\
|
---|
| 9 | + MeshProfileIntersection.la\
|
---|
| 10 | NodeConnectivity.la\
|
---|
| 11 | StringToEnum.la\
|
---|
| 12 | TriMesh.la\
|
---|
| 13 | @@ -107,6 +108,10 @@
|
---|
| 14 | ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
|
---|
| 15 | InterpFromMeshToMesh2d_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB)
|
---|
| 16 |
|
---|
| 17 | +MeshProfileIntersection_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\
|
---|
| 18 | + ../MeshProfileIntersection/MeshProfileIntersection.h
|
---|
| 19 | +MeshProfileIntersection_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
|
---|
| 20 | +
|
---|
| 21 | NodeConnectivity_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
|
---|
| 22 | ../NodeConnectivity/NodeConnectivity.h
|
---|
| 23 | NodeConnectivity_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
|
---|
| 24 | Index: ../trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp
|
---|
| 25 | ===================================================================
|
---|
| 26 | --- ../trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp (revision 13863)
|
---|
| 27 | +++ ../trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp (revision 13864)
|
---|
| 28 | @@ -10,7 +10,7 @@
|
---|
| 29 | index,x,y is a triangulation
|
---|
| 30 | filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)
|
---|
| 31 | output:
|
---|
| 32 | - segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment
|
---|
| 33 | + segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremities for a segment
|
---|
| 34 | belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the
|
---|
| 35 | mesh.
|
---|
| 36 | */
|
---|
| 37 | @@ -25,7 +25,7 @@
|
---|
| 38 | _printLine_(" index,x,y is a triangulation");
|
---|
| 39 | _printLine_(" filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)");
|
---|
| 40 | _printLine_(" output:");
|
---|
| 41 | - _printLine_(" segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment ");
|
---|
| 42 | + _printLine_(" segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremities for a segment ");
|
---|
| 43 | _printLine_(" belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the ");
|
---|
| 44 | _printLine_(" mesh.");
|
---|
| 45 | }/*}}}*/
|
---|
| 46 | @@ -44,7 +44,7 @@
|
---|
| 47 | int dummy;
|
---|
| 48 |
|
---|
| 49 | //contours
|
---|
| 50 | - mxArray* matlabstructure=NULL;
|
---|
| 51 | + DataSet *domain = NULL;
|
---|
| 52 | Contour<double>** contours=NULL;
|
---|
| 53 | int numcontours;
|
---|
| 54 | Contour<double>* contouri=NULL;
|
---|
| 55 | @@ -56,12 +56,9 @@
|
---|
| 56 | /*Boot module: */
|
---|
| 57 | MODULEBOOT();
|
---|
| 58 |
|
---|
| 59 | - /*checks on arguments on the matlab side: */
|
---|
| 60 | - CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&MeshProfileIntersectionUsage);
|
---|
| 61 | + /*checks on arguments: */
|
---|
| 62 | + CHECKARGUMENTS(NLHS,NRHS,&MeshProfileIntersectionUsage);
|
---|
| 63 |
|
---|
| 64 | - /*First, call expread on filename to build a contour array in the matlab workspace: */
|
---|
| 65 | - mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
|
---|
| 66 | -
|
---|
| 67 | /*Fetch inputs: */
|
---|
| 68 | //index
|
---|
| 69 | FetchData(&double_index,&nel,&dummy,INDEX);
|
---|
| 70 | @@ -77,18 +74,12 @@
|
---|
| 71 | FetchData(&y,&dummy,Y);
|
---|
| 72 |
|
---|
| 73 | //contours
|
---|
| 74 | - numcontours=mxGetNumberOfElements(matlabstructure);
|
---|
| 75 | + FetchData(&domain,FILENAME);
|
---|
| 76 | + // MeshProfileIntersectionx should be modified to take DataSet directly (and perhaps SeqMat and SeqVec).
|
---|
| 77 | + numcontours=domain->Size();
|
---|
| 78 | contours=xNew<Contour<double>*>(numcontours);
|
---|
| 79 | - for(i=0;i<numcontours;i++){
|
---|
| 80 | - //allocate
|
---|
| 81 | - contouri=xNew<Contour<double> >(1);
|
---|
| 82 | - //retrieve dimension of this contour.
|
---|
| 83 | - contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
|
---|
| 84 | - //set pointers.
|
---|
| 85 | - contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
|
---|
| 86 | - contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
|
---|
| 87 | - *(contours+i)=contouri;
|
---|
| 88 | - }
|
---|
| 89 | + for(i=0;i<numcontours;i++)
|
---|
| 90 | + *(contours+i)=(Contour<double>*)domain->GetObjectByOffset(i);
|
---|
| 91 |
|
---|
| 92 | /* Debugging of contours :{{{1*/
|
---|
| 93 | /*for(i=0;i<numcontours;i++){
|
---|