Index: ../trunk-jpl/src/wrappers/python/Makefile.am =================================================================== --- ../trunk-jpl/src/wrappers/python/Makefile.am (revision 13863) +++ ../trunk-jpl/src/wrappers/python/Makefile.am (revision 13864) @@ -32,6 +32,7 @@ ElementConnectivity.la\ EnumToString.la\ InterpFromMeshToMesh2d.la\ + MeshProfileIntersection.la\ NodeConnectivity.la\ StringToEnum.la\ TriMesh.la\ @@ -107,6 +108,10 @@ ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h InterpFromMeshToMesh2d_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB) +MeshProfileIntersection_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\ + ../MeshProfileIntersection/MeshProfileIntersection.h +MeshProfileIntersection_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) + NodeConnectivity_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\ ../NodeConnectivity/NodeConnectivity.h NodeConnectivity_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) Index: ../trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp =================================================================== --- ../trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp (revision 13863) +++ ../trunk-jpl/src/wrappers/MeshProfileIntersection/MeshProfileIntersection.cpp (revision 13864) @@ -10,7 +10,7 @@ index,x,y is a triangulation filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments) output: - segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment + segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremities for a segment belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the mesh. */ @@ -25,7 +25,7 @@ _printLine_(" index,x,y is a triangulation"); _printLine_(" filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)"); _printLine_(" output:"); - _printLine_(" segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment "); + _printLine_(" segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremities for a segment "); _printLine_(" belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the "); _printLine_(" mesh."); }/*}}}*/ @@ -44,7 +44,7 @@ int dummy; //contours - mxArray* matlabstructure=NULL; + DataSet *domain = NULL; Contour** contours=NULL; int numcontours; Contour* contouri=NULL; @@ -56,12 +56,9 @@ /*Boot module: */ MODULEBOOT(); - /*checks on arguments on the matlab side: */ - CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&MeshProfileIntersectionUsage); + /*checks on arguments: */ + CHECKARGUMENTS(NLHS,NRHS,&MeshProfileIntersectionUsage); - /*First, call expread on filename to build a contour array in the matlab workspace: */ - mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread"); - /*Fetch inputs: */ //index FetchData(&double_index,&nel,&dummy,INDEX); @@ -77,18 +74,12 @@ FetchData(&y,&dummy,Y); //contours - numcontours=mxGetNumberOfElements(matlabstructure); + FetchData(&domain,FILENAME); + // MeshProfileIntersectionx should be modified to take DataSet directly (and perhaps SeqMat and SeqVec). + numcontours=domain->Size(); contours=xNew*>(numcontours); - for(i=0;i >(1); - //retrieve dimension of this contour. - contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods")); - //set pointers. - contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x")); - contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y")); - *(contours+i)=contouri; - } + for(i=0;i*)domain->GetObjectByOffset(i); /* Debugging of contours :{{{1*/ /*for(i=0;i