Changeset 13229
- Timestamp:
- 09/04/12 09:25:24 (13 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 2 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/matrix/Vector.h
r13216 r13229 26 26 public: 27 27 28 int type; 28 29 #ifdef _HAVE_PETSC_ 29 30 PetscVec* pvector; 30 31 #endif 31 32 SeqVec<doubletype>* svector; 32 int type;33 34 33 35 34 /*Vector constructors, destructors */ … … 82 81 #else 83 82 Vector(doubletype* serial_vec,int M,int in_type=SeqVecType){ 83 //} for vim 84 84 #endif 85 85 -
issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp
r13220 r13229 11 11 #include "./ContourToMeshx.h" 12 12 13 int ContourToMeshx( Vector<double>** pin_nod,Vector<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) {13 int ContourToMeshx(SeqVec<double>** pin_nod,SeqVec<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) { 14 14 15 15 int noerr=1; … … 30 30 31 31 /*output: */ 32 Vector<double>* in_nod=NULL; 33 Vector<double>* in_elem=NULL; 34 35 in_nod=new Vector<double>(nods); 36 in_elem=new Vector<double>(nel); 32 SeqVec<double>* in_nod=NULL; 33 SeqVec<double>* in_elem=NULL; 34 in_nod = new SeqVec<double>(nods); 35 in_elem = new SeqVec<double>(nel); 37 36 38 37 /*initialize thread parameters: */ -
issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h
r13220 r13229 13 13 typedef struct{ 14 14 15 DataSet *contours;16 int nods;17 int edgevalue;18 Vector<double>*in_nod;19 double *x;20 double *y;15 DataSet *contours; 16 int nods; 17 int edgevalue; 18 SeqVec<double> *in_nod; 19 double *x; 20 double *y; 21 21 22 22 } ContourToMeshxThreadStruct; … … 24 24 25 25 /* local prototypes: */ 26 int ContourToMeshx( Vector<double>** pin_nods,Vector<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue);26 int ContourToMeshx(SeqVec<double>** pin_nods,SeqVec<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue); 27 27 28 28 void* ContourToMeshxt(void* vContourToMeshxThreadStruct); 29 29 30 31 30 #endif /* _CONTOURTOMESHX_H */ 32 -
issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp
r13220 r13229 33 33 double* x=NULL; 34 34 double* y=NULL; 35 Vector<double>* in_nod=NULL; 36 35 SeqVec<double>* in_nod=NULL; 37 36 38 37 /*recover handle and gate: */ … … 60 59 61 60 return NULL; 62 63 61 } -
issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp
r13220 r13229 4 4 #include "./ContourToNodesx.h" 5 5 6 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue){6 int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue){ 7 7 8 8 int i; … … 17 17 18 18 /*output: */ 19 Vector<IssmPDouble>* flags=NULL; 20 21 flags=new Vector<IssmPDouble>(nods); 19 SeqVec<IssmPDouble>* flags=NULL; 20 flags=new SeqVec<IssmPDouble>(nods); 22 21 23 22 /*Loop through all contours: */ … … 39 38 } 40 39 41 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){40 int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){ 42 41 43 42 int i; … … 52 51 53 52 /*output: */ 54 Vector<IssmPDouble>* flags=NULL; 55 56 flags=new Vector<IssmPDouble>(nods); 53 SeqVec<IssmPDouble>* flags=NULL; 54 flags=new SeqVec<IssmPDouble>(nods); 57 55 58 56 /*Loop through all contours: */ … … 69 67 /*Assign output pointers: */ 70 68 *pflags=flags; 71 72 69 return 1; 73 70 } -
issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h
r13220 r13229 2 2 ContourToNodesx.h 3 3 */ 4 5 4 6 5 #ifndef _CONTOURTONODESX_H … … 11 10 12 11 /* local prototypes: */ 13 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue);14 int ContourToNodesx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue);12 int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue); 13 int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue); 15 14 16 15 #endif /* _CONTOURTONODESX_H */ 17 -
issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
r13220 r13229 17 17 18 18 /*InterpFromGridToMeshx{{{*/ 19 int InterpFromGridToMeshx( Vector<IssmPDouble>** pdata_mesh,double* x_in, int x_rows, double* y_in, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods,double default_value, int interpenum){19 int InterpFromGridToMeshx(SeqVec<IssmPDouble>** pdata_mesh,double* x_in, int x_rows, double* y_in, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods,double default_value, int interpenum){ 20 20 21 21 /*output: */ 22 Vector<IssmPDouble>* data_mesh=NULL;22 SeqVec<IssmPDouble>* data_mesh=NULL; 23 23 24 24 /*Intermediary*/ … … 47 47 48 48 /*Allocate output vector: */ 49 data_mesh=new Vector<IssmPDouble>(nods);49 data_mesh=new SeqVec<IssmPDouble>(nods); 50 50 51 51 /*Find out what kind of coordinates (x_in,y_in) have been given is input*/ … … 120 120 121 121 /*recover parameters :*/ 122 double *x_mesh = gate->x_mesh;123 double *y_mesh = gate->y_mesh;124 int x_rows = gate->x_rows;125 int y_rows = gate->y_rows;126 double *x = gate->x;127 double *y = gate->y;128 int nods = gate->nods;129 Vector<IssmPDouble>*data_mesh= gate->data_mesh;130 double *data = gate->data;131 double default_value = gate->default_value;132 int interpenum = gate->interp;133 int M = gate->M;134 int N = gate->N;122 double *x_mesh = gate->x_mesh; 123 double *y_mesh = gate->y_mesh; 124 int x_rows = gate->x_rows; 125 int y_rows = gate->y_rows; 126 double *x = gate->x; 127 double *y = gate->y; 128 int nods = gate->nods; 129 SeqVec<IssmPDouble>*data_mesh = gate->data_mesh; 130 double *data = gate->data; 131 double default_value = gate->default_value; 132 int interpenum = gate->interp; 133 int M = gate->M; 134 int N = gate->N; 135 135 136 136 bool debug = M*N>1? true:false; -
issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.h
r13220 r13229 12 12 /*threading: */ 13 13 typedef struct{ 14 double* x;15 int x_rows;16 double* y;17 int y_rows;18 double* data;19 double default_value;20 int interp;21 int M;22 int N;23 int nods;24 double* x_mesh;25 double* y_mesh;26 Vector<IssmPDouble>*data_mesh;14 double* x; 15 int x_rows; 16 double* y; 17 int y_rows; 18 double* data; 19 double default_value; 20 int interp; 21 int M; 22 int N; 23 int nods; 24 double* x_mesh; 25 double* y_mesh; 26 SeqVec<IssmPDouble>* data_mesh; 27 27 } InterpFromGridToMeshxThreadStruct; 28 28 29 int InterpFromGridToMeshx( Vector<IssmPDouble>** pdata_mesh,double* x, int x_rows, double* y, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods, double default_value, int interpenum=BilinearInterpEnum);29 int InterpFromGridToMeshx(SeqVec<IssmPDouble>** pdata_mesh,double* x, int x_rows, double* y, int y_rows, double* data, int M, int N, double* x_mesh, double* y_mesh, int nods, double default_value, int interpenum=BilinearInterpEnum); 30 30 void* InterpFromGridToMeshxt(void* vInterpFromGridToMeshxThreadStruct); 31 31 bool findindices(int* pn,int* pm,double* x,int x_rows, double* y,int y_rows, double xgrid,double ygrid); -
issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
r13220 r13229 10 10 #include "../modules.h" 11 11 12 int InterpFromMesh2dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime, 13 double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours){ 12 int InterpFromMesh2dx(SeqVec<IssmPDouble>** pdata_prime, 13 double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, 14 double* x_prime, double* y_prime, int nods_prime, 15 double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours){ 14 16 15 17 /*Output*/ 16 Vector<IssmPDouble>* data_prime=NULL;18 SeqVec<IssmPDouble>* data_prime=NULL; 17 19 18 20 /*Intermediary*/ 19 int i,j;20 int interpolation_type;21 bool debug;21 int i,j; 22 int interpolation_type; 23 bool debug; 22 24 double area; 23 25 double area_1,area_2,area_3; … … 27 29 28 30 /*contours: */ 29 Vector<IssmPDouble>* vec_incontour=NULL;30 double * incontour=NULL;31 SeqVec<IssmPDouble> *vec_incontour = NULL; 32 double *incontour = NULL; 31 33 32 34 /*threading: */ … … 71 73 72 74 /*Initialize output*/ 73 data_prime=new Vector<IssmPDouble>(nods_prime,false,SeqVecType);75 data_prime=new SeqVec<IssmPDouble>(nods_prime); 74 76 if(num_default_values){ 75 77 if(num_default_values==1)for (i=0;i<nods_prime;i++) data_prime->SetValue(i,default_values[0],INS_VAL); -
issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.h
r13220 r13229 9 9 #include "../../toolkits/toolkits.h" 10 10 11 12 11 /*threading: */ 13 12 typedef struct{ 14 13 15 int interpolation_type;16 bool debug;17 int nels_data;18 double *index_data;19 double *x_data;20 double *y_data;21 double *data;22 double xmin,xmax;23 double ymin,ymax;24 int nods_prime;25 Vector<IssmPDouble>*data_prime;26 double *x_prime;27 double *y_prime;28 double *default_values;29 int num_default_values;30 double *incontour;14 int interpolation_type; 15 bool debug; 16 int nels_data; 17 double *index_data; 18 double *x_data; 19 double *y_data; 20 double *data; 21 double xmin,xmax; 22 double ymin,ymax; 23 int nods_prime; 24 SeqVec<IssmPDouble> *data_prime; 25 double *x_prime; 26 double *y_prime; 27 double *default_values; 28 int num_default_values; 29 double *incontour; 31 30 32 31 33 32 } InterpFromMesh2dxThreadStruct; 34 33 35 int InterpFromMesh2dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime,34 int InterpFromMesh2dx(SeqVec<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, int nods_prime, 36 35 double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours); 37 36 … … 39 38 40 39 #endif /* _INTERPFROMMESH2DX_H */ 41 -
issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp
r13220 r13229 20 20 21 21 /*recover parameters :*/ 22 int interpolation_type = gate->interpolation_type;23 bool debug = gate->debug;24 int nels_data = gate->nels_data;25 double *index_data = gate->index_data;26 double *x_data = gate->x_data;27 double *y_data = gate->y_data;28 double *data = gate->data;29 double xmin = gate->xmin;30 double xmax = gate->xmax;31 double ymin = gate->ymin;32 double ymax = gate->ymax;33 int nods_prime = gate->nods_prime;34 Vector<IssmPDouble>* data_prime= gate->data_prime;35 double *x_prime = gate->x_prime;36 double *y_prime = gate->y_prime;37 double *default_values = gate->default_values;38 int num_default_values = gate->num_default_values;39 double *incontour = gate->incontour;22 int interpolation_type = gate->interpolation_type; 23 bool debug = gate->debug; 24 int nels_data = gate->nels_data; 25 double *index_data = gate->index_data; 26 double *x_data = gate->x_data; 27 double *y_data = gate->y_data; 28 double *data = gate->data; 29 double xmin = gate->xmin; 30 double xmax = gate->xmax; 31 double ymin = gate->ymin; 32 double ymax = gate->ymax; 33 int nods_prime = gate->nods_prime; 34 SeqVec<IssmPDouble>* data_prime = gate->data_prime; 35 double *x_prime = gate->x_prime; 36 double *y_prime = gate->y_prime; 37 double *default_values = gate->default_values; 38 int num_default_values = gate->num_default_values; 39 double *incontour = gate->incontour; 40 40 41 41 /*partition loop across threads: */ -
issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
r13220 r13229 7 7 #include "../../include/include.h" 8 8 9 int InterpFromMeshToMesh3dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value) {9 int InterpFromMeshToMesh3dx( SeqVec<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value) { 10 10 11 11 /*Output*/ 12 Vector<IssmPDouble>* data_prime=NULL;12 SeqVec<IssmPDouble>* data_prime=NULL; 13 13 14 14 /*Intermediary*/ … … 54 54 55 55 /*Initialize output*/ 56 data_prime=new Vector<IssmPDouble>(nods_prime);56 data_prime=new SeqVec<IssmPDouble>(nods_prime); 57 57 for (i=0;i<nods_prime;i++) data_prime->SetValue(i,default_value,INS_VAL); 58 58 -
issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.h
r13220 r13229 9 9 #include "../../classes/objects/objects.h" 10 10 11 int InterpFromMeshToMesh3dx( Vector<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value);11 int InterpFromMeshToMesh3dx(SeqVec<IssmPDouble>** pdata_prime,double* index_data, double* x_data, double* y_data, double* z_data, int nods_data,int nels_data, double* data, int data_length, double* x_prime, double* y_prime, double* z_prime, int nods_prime,double default_value); 12 12 13 13 #endif /* _INTERPFROMMESHTOMESH3DX_H */ 14 -
issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp
r13220 r13229 4 4 #include "./PointCloudFindNeighborsx.h" 5 5 6 int PointCloudFindNeighborsx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread){6 int PointCloudFindNeighborsx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread){ 7 7 8 8 /*output: */ 9 Vector<IssmPDouble>* flags=NULL;10 flags=new Vector<IssmPDouble>(nods);9 SeqVec<IssmPDouble>* flags=NULL; 10 flags=new SeqVec<IssmPDouble>(nods); 11 11 12 12 /*threading: */ -
issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.h
r13220 r13229 11 11 12 12 /* local prototypes: */ 13 int PointCloudFindNeighborsx( Vector<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread);13 int PointCloudFindNeighborsx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, double mindistance,double multithread); 14 14 15 15 /*threading: */ … … 20 20 int nods; 21 21 double mindistance; 22 Vector<IssmPDouble>* flags; 23 22 SeqVec<IssmPDouble>* flags; 24 23 25 24 } PointCloudFindNeighborsThreadStruct; -
issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp
r13220 r13229 17 17 int nods; 18 18 double mindistance; 19 Vector<IssmPDouble>* flags;19 SeqVec<IssmPDouble>* flags; 20 20 21 21 /*recover handle and gate: */ -
issm/trunk-jpl/src/c/shared/Exp/exp.h
r13220 r13229 3 3 */ 4 4 5 6 5 #ifndef _EXP_H_ 7 6 #define _EXP_H_ … … 15 14 int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue); 16 15 17 18 16 /*IsInPoly {{{*/ 19 17 template <class doubletype> 20 int IsInPoly( Vector<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){18 int IsInPoly(SeqVec<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){ 21 19 22 20 int i; … … 57 55 } 58 56 return 1; 59 }/*}}}*/60 /*IsOutsidePoly {{{*/61 template <class doubletype>62 int IsOutsidePoly(Vector<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){63 64 int i,j;65 double x0,y0;66 doubletype value;67 double xmin=xc[0];68 double xmax=xc[0];69 double ymin=yc[0];70 double ymax=yc[0];71 72 /*Get extrema*/73 for (i=1;i<numvertices;i++){74 if(xc[i]<xmin) xmin=xc[i];75 if(xc[i]>xmax) xmax=xc[i];76 if(yc[i]<ymin) ymin=yc[i];77 if(yc[i]>ymax) ymax=yc[i];78 }79 80 /*Go through all vertices of the mesh:*/81 for (i=i0;i<i1;i++){82 83 //Get current value of value[i] -> do not change it if != 084 in->GetValue(&value,i);85 if (reCast<bool,doubletype>(value)){86 /*this vertex already is inside one of the contours, continue*/87 continue;88 }89 90 /*pick up vertex (x[i],y[i]) and figure out if located inside contour (xc,yc)*/91 x0=x[i]; y0=y[i];92 if(x0<xmin || x0>xmax || y0<ymin || y0>ymax){93 value=1;94 }95 else{96 value=1-pnpoly(numvertices,xc,yc,x0,y0,edgevalue);97 }98 in->SetValue(i,value,INS_VAL);99 }100 return 1;101 57 }/*}}}*/ 102 58 /*DomainOutlineRead{{{*/ … … 244 200 } /*}}}*/ 245 201 246 247 248 249 202 #endif -
issm/trunk-jpl/src/c/toolkits/issm/SeqVec.h
r13216 r13229 41 41 } 42 42 /*}}}*/ 43 /*FUNCTION SeqVec(int M){{{*/ 44 SeqVec(int pM){ 45 46 this->M=pM; 47 this->vector=NULL; 48 if(this->M) this->vector=xNewZeroInit<doubletype>(pM); 49 } 50 /*}}}*/ 43 51 /*FUNCTION SeqVec(int M,bool fromlocalsize){{{*/ 44 52 SeqVec(int pM,bool fromlocalsize){ -
issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
r13220 r13229 37 37 38 38 /* output: */ 39 Vector<double> *in_nod = NULL;40 Vector<double> *in_elem = NULL;39 SeqVec<double> *in_nod = NULL; 40 SeqVec<double> *in_elem = NULL; 41 41 42 42 /*Boot module: */ -
issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp
r13220 r13229 29 29 30 30 /* required input: */ 31 double* x=NULL;32 double* y=NULL;33 31 int edgevalue; 34 char* interptype=NULL; 32 double *x = NULL; 33 double *y = NULL; 34 char *interptype = NULL; 35 35 36 36 /* output: */ 37 Vector<double>* flags=NULL;37 SeqVec<double> *flags = NULL; 38 38 int nods; 39 39 40 //contours 41 mxArray* matlabstructure=NULL; 40 /*contours*/ 42 41 int numcontours; 43 Contour<double>** contours=NULL; 44 Contour<double>* contouri=NULL; 42 mxArray *matlabstructure = NULL; 43 Contour<double> **contours = NULL; 44 Contour<double> *contouri = NULL; 45 45 46 46 /*Boot module: */ … … 49 49 /*checks on arguments on the matlab side: */ 50 50 CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ContourToNodesUsage); 51 52 51 53 52 /*Fetch inputs: */ … … 56 55 FetchData(&edgevalue,EDGEVALUEHANDLE); 57 56 58 //Fetch contours 59 57 /*Fetch contours*/ 60 58 if(mxIsChar(FILENAME)){ 61 59 /*Call expread on filename to build a contour array in the matlab workspace: */ 62 mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME,"expread");60 mexCallMATLAB(1,&matlabstructure,1,(mxArray**)&FILENAME,"expread"); 63 61 } 64 62 else{ … … 80 78 } 81 79 82 /* Debugging of contours :{{{1*/83 /*for(i=0;i<numcontours;i++){84 _printLine_("\nContour echo: contour number " << i+1 << " / " << numcontours);85 contouri=*(contours+i);86 _printLine_(" Number of nodes " << contouri->nods);87 for (j=0;j<contouri->nods;j++){88 _printLine_(" " << *(contouri->x+j) << "f " << *(contouri->y+j) << "f");89 }90 }*/91 /*}}}*/92 93 80 /*Run interpolation routine: */ 94 81 ContourToNodesx(&flags,x,y,nods,contours,numcontours,edgevalue); … … 99 86 /*end module: */ 100 87 MODULEEND(); 101 102 88 } 103 89 -
issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
r13216 r13229 25 25 26 26 /*input: */ 27 double * x=NULL;28 double * y=NULL;27 double *x = NULL; 28 double *y = NULL; 29 29 int x_rows,y_rows; 30 double * data=NULL;30 double *data = NULL; 31 31 int data_rows,data_cols; 32 double * x_mesh=NULL;33 double * y_mesh=NULL;32 double *x_mesh = NULL; 33 double *y_mesh = NULL; 34 34 int x_mesh_rows,y_mesh_rows; 35 35 double default_value; … … 37 37 38 38 /* output: */ 39 Vector<double>* data_mesh=NULL;39 SeqVec<double>* data_mesh=NULL; 40 40 41 41 /*Boot module: */ … … 43 43 44 44 /*checks on arguments on the matlab side: */ 45 //CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InterpFromGridToMeshUsage);46 45 if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){ 47 46 InterpFromGridToMeshUsage(); -
issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
r13220 r13229 1 1 /*!\file InterpFromMesh2d.c 2 2 * \brief: data interpolation from a list of (x,y,values) into mesh vertices 3 4 InterpFromMesh2d.c5 6 usage:7 data_mesh=InterpFromMesh2d(index,x,y,data,x_mesh,y_mesh);8 9 where:10 11 input:12 x,y: coordinates of matrix data13 data - matrix holding the data to be interpolated onto the mesh.14 x_mesh,y_mesh: coordinates of the mesh vertices onto which we interpolate.15 16 output:17 data_mesh: vector of mesh interpolated data.18 19 3 */ 20 4 … … 48 32 int num_default_values=0; 49 33 50 / /contours51 mxArray* matlabstructure=NULL;52 Contour<double>** contours=NULL;53 int numcontours;54 Contour<double>* contouri=NULL;55 int i;34 /*contours*/ 35 int i; 36 mxArray *matlabstructure = NULL; 37 Contour<double> **contours=NULL; 38 int numcontours; 39 Contour<double> *contouri=NULL; 56 40 57 41 /*Intermediary*/ … … 61 45 62 46 /* output: */ 63 Vector<double>* data_prime=NULL;47 SeqVec<double> *data_prime = NULL; 64 48 65 49 /*Boot module: */ -
issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
r13216 r13229 55 55 56 56 /* output: */ 57 Vector<double>* data_prime=NULL;57 SeqVec<double>* data_prime=NULL; 58 58 59 59 /*Boot module: */ … … 96 96 } 97 97 98 void InterpFromMeshToMesh3dUsage(void) 99 { 98 void InterpFromMeshToMesh3dUsage(void){ 100 99 _pprintLine_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point"); 101 100 _pprintLine_(""); -
issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp
r13216 r13229 10 10 11 11 /* required input: */ 12 double * x=NULL;13 double * y=NULL;12 double *x = NULL; 13 double *y = NULL; 14 14 int nods; 15 15 double mindistance; … … 17 17 18 18 /* output: */ 19 Vector<double>* flags=NULL;19 SeqVec<double> *flags = NULL; 20 20 21 21 /*Boot module: */
Note:
See TracChangeset
for help on using the changeset viewer.