Index: ../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp =================================================================== --- ../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp (revision 20502) +++ ../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp (revision 20503) @@ -1,49 +0,0 @@ -/*!\file TriaSearchx - */ - -#include "./TriaSearchx.h" - -#include "../../shared/shared.h" -#include "../../toolkits/toolkits.h" -#include "../../bamg/bamgobjects.h" - -using namespace bamg; -using namespace std; - -void TriaSearchx(double** ptria,int* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofnodes){ - - /*Output*/ - double* tria=NULL; - - /*allocate: */ - tria=xNew(numberofnodes); - - /*Intermediary*/ - R2 r; - I2 I; - int i; - Icoor2 dete[3]; - - /* read background mesh */ - Mesh Th(index,x,y,nods,nel); - Th.CreateSingleVertexToTriangleConnectivity(); - - for(i=0;i -#else - #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" -#endif - -/*For python modules: needs to come before header files inclusion*/ -#ifdef _HAVE_PYTHON_ -#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol -#endif - -#include "../bindings.h" -#include "../../c/main/globals.h" -#include "../../c/modules/modules.h" -#include "../../c/shared/shared.h" - -#undef __FUNCT__ -#define __FUNCT__ "TriaSearch" - -#ifdef _HAVE_MATLAB_MODULES_ -/* serial input macros: */ -#define INDEXHANDLE prhs[0] -#define XHANDLE prhs[1] -#define YHANDLE prhs[2] -#define X0HANDLE prhs[3] -#define Y0HANDLE prhs[4] - -/* serial output macros: */ -#define TRIA (mxArray**)&plhs[0] -#endif - -#ifdef _HAVE_PYTHON_MODULES_ -/* serial input macros: */ -#define INDEXHANDLE PyTuple _GetItem(args,0) -#define XHANDLE PyTuple _GetItem(args,1) -#define YHANDLE PyTuple _GetItem(args,2) -#define X0HANDLE PyTuple _GetItem(args,3) -#define Y0HANDLE PyTuple _GetItem(args,4) - -/* serial output macros: */ -#define TRIA output,0 -#endif - -/* serial arg counts: */ -#undef NLHS -#define NLHS 1 -#undef NRHS -#define NRHS 5 - -#endif Index: ../trunk-jpl/src/wrappers/TriaSearch/TriaSearch.cpp =================================================================== --- ../trunk-jpl/src/wrappers/TriaSearch/TriaSearch.cpp (revision 20502) +++ ../trunk-jpl/src/wrappers/TriaSearch/TriaSearch.cpp (revision 20503) @@ -1,68 +0,0 @@ -/*\file TriaSearch.c - *\brief: TriaSearch module. See TriaSearchx for more details. - */ -#include "./TriaSearch.h" - -void TriaSearchUsage(void){/*{{{*/ - _printf0_("TriaSearch- find triangle holding a point (x0,y0) in a mesh\n"); - _printf0_("\n"); - _printf0_(" Usage:\n"); - _printf0_(" tria=TriaSearch(index,x,y,x0,y0);\n"); - _printf0_(" index,x,y: mesh triangulatrion\n"); - _printf0_(" x0,y0: coordinates of the point for which we are trying to find a triangle\n"); - _printf0_(" x0,y0 can be an array of points\n"); - _printf0_("\n"); -}/*}}}*/ -WRAPPER(TriaSearch){ - - int i; - - /*input: */ - int* index=NULL; - int nel; - int dummy; - - double* x=NULL; - double* y=NULL; - int nods; - - double* x0=NULL; - double* y0=NULL; - int numberofnodes; - - /* output: */ - double* tria=NULL; - - /*Boot module: */ - MODULEBOOT(); - - /*checks on arguments on the matlab side: */ - CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&TriaSearchUsage); - - /*Input datasets: */ - FetchData(&index,&nel,&dummy,INDEXHANDLE); - FetchData(&x,&nods,XHANDLE); - FetchData(&y,&nods,YHANDLE); - FetchData(&x0,&numberofnodes,X0HANDLE); - FetchData(&y0,&numberofnodes,Y0HANDLE); - - /* Run core computations: */ - TriaSearchx(&tria,index,nel,x,y,nods,x0,y0,numberofnodes); - - /* c to matlab: */ - for(i=0;i(index); - xDelete(x); - xDelete(y); - xDelete(x0); - xDelete(y0); - xDelete(tria); - - /*end module: */ - MODULEEND(); -} Index: ../trunk-jpl/src/wrappers/matlab/Makefile.am =================================================================== --- ../trunk-jpl/src/wrappers/matlab/Makefile.am (revision 20502) +++ ../trunk-jpl/src/wrappers/matlab/Makefile.am (revision 20503) @@ -60,7 +60,6 @@ PointCloudFindNeighbors.la\ PropagateFlagsFromConnectivity.la\ StringToEnum.la\ - TriaSearch.la\ TriMesh.la\ TriMeshProcessRifts.la\ Scotch.la\ @@ -249,9 +248,6 @@ Shp2Kml_la_SOURCES = ../Shp2Kml/Shp2Kml.cpp Shp2Kml_la_LIBADD = ${deps} $(SHAPELIBLIB) $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB) -TriaSearch_la_SOURCES = ../TriaSearch/TriaSearch.cpp -TriaSearch_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB) - TriMesh_la_SOURCES = ../TriMesh/TriMesh.cpp TriMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(TRIANGLELIB) $(GSLLIB) $(PROJ4LIB)