Changeset 15396 for issm/trunk/src/c/modules/InterpFromMesh2dx
- Timestamp:
- 07/02/13 09:24:16 (12 years ago)
- Location:
- issm/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:ignore
-
old new 1 par 2 ad 3 proj-* 1 4 projects 2 5 autom4te.cache
-
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 14311,14313,14316-14506,14508-15387,15390-15392
- Property svn:ignore
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
r13975 r15396 5 5 #include "./InterpFromMesh2dx.h" 6 6 #include "../../shared/shared.h" 7 #include "../../include/include.h"8 7 #include "../../toolkits/toolkits.h" 9 #include "../../classes/ objects/objects.h"10 #include "../ modules.h"8 #include "../../classes/classes.h" 9 #include "../ContourToNodesx/ContourToNodesx.h" 11 10 12 int InterpFromMesh2dx( SeqVec<IssmPDouble>** pdata_prime,11 int InterpFromMesh2dx(IssmSeqVec<IssmPDouble>** pdata_prime, 13 12 double* index_data, double* x_data, double* y_data, int nods_data,int nels_data, double* data, int data_length, 14 13 double* x_prime, double* y_prime, int nods_prime, … … 16 15 17 16 /*Output*/ 18 SeqVec<IssmPDouble>* data_prime=NULL;17 IssmSeqVec<IssmPDouble>* data_prime=NULL; 19 18 20 19 /*Intermediary*/ … … 26 25 27 26 /*contours: */ 28 SeqVec<IssmPDouble> *vec_incontour = NULL;29 27 double *incontour = NULL; 30 28 … … 70 68 71 69 /*Initialize output*/ 72 data_prime=new SeqVec<IssmPDouble>(nods_prime);70 data_prime=new IssmSeqVec<IssmPDouble>(nods_prime); 73 71 if(num_default_values){ 74 72 if(num_default_values==1)for (i=0;i<nods_prime;i++) data_prime->SetValue(i,default_values[0],INS_VAL); … … 78 76 /*Build indices of contour: */ 79 77 if(numcontours){ 80 ContourToNodesx( &vec_incontour,x_prime,y_prime,nods_prime,contours,numcontours,1); 81 incontour=vec_incontour->ToMPISerial(); 78 ContourToNodesx( &incontour,x_prime,y_prime,nods_prime,contours,numcontours,1); 82 79 } 83 80 else{ … … 112 109 xDelete<double>(incontour); 113 110 *pdata_prime=data_prime; 111 return 1; 114 112 } -
issm/trunk/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.h
r13975 r15396 6 6 #define _INTERPFROMMESH2DX_H 7 7 8 #include "../../classes/ objects/objects.h"8 #include "../../classes/classes.h" 9 9 #include "../../toolkits/toolkits.h" 10 10 … … 22 22 double ymin,ymax; 23 23 int nods_prime; 24 SeqVec<IssmPDouble> *data_prime;24 IssmSeqVec<IssmPDouble> *data_prime; 25 25 double *x_prime; 26 26 double *y_prime; … … 31 31 } InterpFromMesh2dxThreadStruct; 32 32 33 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,33 int InterpFromMesh2dx(IssmSeqVec<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 34 double* default_values,int num_default_values,Contour<IssmPDouble>** contours,int numcontours); 35 35 -
issm/trunk/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp
r13975 r15396 32 32 double ymax = gate->ymax; 33 33 int nods_prime = gate->nods_prime; 34 SeqVec<IssmPDouble>* data_prime = gate->data_prime;34 IssmSeqVec<IssmPDouble>* data_prime = gate->data_prime; 35 35 double *x_prime = gate->x_prime; 36 36 double *y_prime = gate->y_prime; … … 47 47 /*display current iteration*/ 48 48 if (debug && my_thread==0 && fmod((double)i,(double)100)==0) 49 _print String_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%");49 _printf_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%"); 50 50 51 51 /*if there is no point inside the domain, go to next iteration*/ … … 99 99 } 100 100 if(debug && my_thread==0) 101 _print Line_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");101 _printf_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%\n"); 102 102 return NULL; 103 103 }
Note:
See TracChangeset
for help on using the changeset viewer.