Changeset 22906
- Timestamp:
- 07/05/18 21:18:52 (7 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/bamggeom.js
r22901 r22906 21 21 for (var field in object) { 22 22 if (object.hasOwnProperty(field)) { 23 this .field = object.field;23 this[field] = object[field]; 24 24 } 25 25 } -
issm/trunk-jpl/src/m/classes/bamgmesh.js
r22901 r22906 21 21 for (var field in object) { 22 22 if (object.hasOwnProperty(field)) { 23 this .field = object.field;23 this[field] = object[field]; 24 24 } 25 25 } -
issm/trunk-jpl/src/m/mesh/bamg.js
r22901 r22906 458 458 bamg_options.coeff=options.getfieldvalue('coeff',1.); 459 459 bamg_options.cutoff=options.getfieldvalue('cutoff',Math.pow(10,-5)); 460 bamg_options.err=options.getfieldvalue('err', [[0.01]]);460 bamg_options.err=options.getfieldvalue('err',0.01); 461 461 bamg_options.errg=options.getfieldvalue('errg',0.1); 462 462 bamg_options.field=options.getfieldvalue('field',[]); … … 478 478 bamg_options.power=options.getfieldvalue('power',1.); 479 479 bamg_options.splitcorners=options.getfieldvalue('splitcorners',1); 480 bamg_options.verbose=options.getfieldvalue('verbose', 6);480 bamg_options.verbose=options.getfieldvalue('verbose',1); 481 481 //}}} 482 482 -
issm/trunk-jpl/src/wrappers/BamgMesher/BamgMesher.js
r22901 r22906 116 116 var pfieldSize = intsToHeap(size2d(bamgopts.field)); 117 117 var pfield = doublesToHeap(Array.prototype.concat.apply([], bamgopts.field)); 118 var perrSize = intsToHeap(size2d( bamgopts.err));119 var perr = doublesToHeap(Array.prototype.concat.apply([], bamgopts.err));118 var perrSize = intsToHeap(size2d([[bamgopts.err]])); 119 var perr = doublesToHeap(Array.prototype.concat.apply([], [[bamgopts.err]])); 120 120 121 121 //output -
issm/trunk-jpl/src/wrappers/javascript/io/FetchJavascriptData.cpp
r22896 r22906 58 58 void FetchData(double **pmatrix, int* pM, int* pN, int* matrixin, int M, int N){ 59 59 60 double* matrix=NULL; 61 62 if(pmatrix && matrixin){ 63 64 matrix=xNew<IssmPDouble>(M*N); 65 for(int i=0;i<M*N;i++)matrix[i]=(IssmPDouble)matrixin[i]; 66 if (pM)*pM=M; 67 if (pN)*pN=N; 68 *pmatrix=matrix; 69 } 60 double* outmatrix=NULL; 61 int outmatrix_rows,outmatrix_cols; 62 63 if(M == 0 || N == 0){ 64 /*Nothing to pick up. Just initialize matrix pointer to NULL: */ 65 outmatrix_rows=0; 66 outmatrix_cols=0; 67 outmatrix=NULL; 68 } 69 else if (pmatrix && matrixin){ 70 outmatrix_rows=M; 71 outmatrix_cols=N; 72 outmatrix=xNew<IssmPDouble>(M*N); 73 for(int i=0;i<M*N;i++)outmatrix[i]=(IssmPDouble)matrixin[i]; 74 } 75 76 /*Assign output pointers:*/ 77 *pmatrix=outmatrix; 78 if (pM)*pM=outmatrix_rows; 79 if (pN)*pN=outmatrix_cols; 70 80 } 71 81 /*}}}*/ … … 73 83 void FetchData(double **pmatrix, int* pM, int* pN, double* matrixin, int M, int N){ 74 84 75 double* matrix=NULL; 76 77 if(pmatrix && matrixin){ 78 79 matrix=xNew<IssmPDouble>(M*N); 80 for(int i=0;i<M*N;i++)matrix[i]=matrixin[i]; 81 if (pM)*pM=M; 82 if (pN)*pN=N; 83 *pmatrix=matrix; 84 } 85 double* outmatrix=NULL; 86 int outmatrix_rows,outmatrix_cols; 87 88 if(M == 0 || N == 0){ 89 /*Nothing to pick up. Just initialize matrix pointer to NULL: */ 90 outmatrix_rows=0; 91 outmatrix_cols=0; 92 outmatrix=NULL; 93 } 94 else if (pmatrix && matrixin){ 95 outmatrix_rows=M; 96 outmatrix_cols=N; 97 outmatrix=xNew<IssmPDouble>(M*N); xMemCpy<IssmPDouble>(outmatrix,matrixin,M*N); 98 } 99 100 /*Assign output pointers:*/ 101 *pmatrix=outmatrix; 102 if (pM)*pM=outmatrix_rows; 103 if (pN)*pN=outmatrix_cols; 85 104 } 86 105 /*}}}*/ … … 88 107 void FetchData(int **pmatrix, int* pM, int* pN, int* matrixin, int M, int N){ 89 108 90 int* matrix=NULL; 91 92 if(pmatrix && matrixin){ 93 94 matrix=xNew<int>(M*N);xMemCpy<int>(matrix,matrixin,M*N); 95 if (pM)*pM=M; 96 if (pN)*pN=N; 97 *pmatrix=matrix; 98 } 109 int* outmatrix=NULL; 110 int outmatrix_rows,outmatrix_cols; 111 112 if(M == 0 || N == 0){ 113 /*Nothing to pick up. Just initialize matrix pointer to NULL: */ 114 outmatrix_rows=0; 115 outmatrix_cols=0; 116 outmatrix=NULL; 117 } 118 else if (pmatrix && matrixin){ 119 outmatrix_rows=M; 120 outmatrix_cols=N; 121 outmatrix=xNew<int>(M*N); xMemCpy<int>(outmatrix,matrixin,M*N); 122 } 123 124 /*Assign output pointers:*/ 125 *pmatrix=outmatrix; 126 if (pM)*pM=outmatrix_rows; 127 if (pN)*pN=outmatrix_cols; 99 128 } 100 129 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.