8 _printf0_(
"INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid\n");
10 _printf0_(
" This function is a multi-threaded mex file that interpolates a field\n");
11 _printf0_(
" defined on a triangular mesh onto a regular grid\n");
14 _printf0_(
" grid=InterpFromMeshToGrid(index,x,y,data,x_grid,y_grid,default_value)\n");
16 _printf0_(
" index,x,y: delaunay triangulation defining the mesh.\n");
17 _printf0_(
" meshdata: vertex values of data to be interpolated.\n");
18 _printf0_(
" xgrid,ygrid: parameters that define the grid\n");
19 _printf0_(
" default_value: value of points located out of the mesh.\n");
29 double* meshdata=NULL;
33 int nlines,ncols,test;
37 double* griddata=NULL;
43 #ifdef _HAVE_MATLAB_MODULES_
49 if(test!=3)
_error_(
"size not supported yet");
52 if(test!=nods)
_error_(
"size not supported yet");
53 FetchData(&meshdata,&meshdata_length,MESHDATA);
59 InterpFromMeshToGridx(&griddata,index,x,y,nods,nel,meshdata,meshdata_length,xgrid,ygrid,nlines,ncols,default_value);
62 WriteData(GRIDDATA,griddata,nlines,ncols);
68 xDelete<double>(meshdata);
69 xDelete<double>(griddata);
70 xDelete<double>(xgrid);
71 xDelete<double>(ygrid);