Changeset 26692
- Timestamp:
- 12/02/21 06:49:14 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r26691 r26692 1247 1247 1248 1248 /*Weights*/ 1249 Gauss* gauss = NULL;1250 1249 IssmDouble loadweights_g[NUMVERTICES2D]; 1251 1250 IssmDouble total_weight = 0; … … 1292 1291 else _error_("case not possible"); 1293 1292 } 1294 if(trapezeisnegative) phi = 1 -f1*f2;1293 if(trapezeisnegative) phi = 1.-f1*f2; 1295 1294 else phi = f1*f2; 1296 1295 1297 1296 /*Compute weights*/ 1298 gauss = this->NewGauss(point,f1,f2,1-trapezeisnegative,2);1297 Gauss* gauss = this->NewGauss(point,f1,f2,1-trapezeisnegative,2); 1299 1298 1300 1299 total_weight = 0.0; … … 1305 1304 total_weight += gauss->weight; 1306 1305 } 1306 delete gauss; 1307 1307 1308 1308 /*Normalizing to phi such that weights provide coefficients for integration over subelement (for averaging:phi*weights)*/ 1309 if(total_weight>0.) for(int i=0;i<NUMVERTICES ;i++) weights[i] = weights[i]*phi/total_weight;1309 if(total_weight>0.) for(int i=0;i<NUMVERTICES2D;i++) weights[i] = weights[i]*phi/total_weight; 1310 1310 else for(int i=0;i<NUMVERTICES2D;i++) weights[i] = 0.0; 1311 1312 /*Cleanup*/1313 delete gauss;1314 1311 1315 1312 /*Assign output pointers*/ … … 2201 2198 lsf2d[i] = lsf[i]; 2202 2199 } 2203 GetFractionGeometry2D( weights,&phi,&point,&f1,&f2,&istrapneg,lsf2d);2200 GetFractionGeometry2D(&weights[0],&phi,&point,&f1,&f2,&istrapneg,lsf2d); 2204 2201 2205 2202 IssmDouble basetot;
Note:
See TracChangeset
for help on using the changeset viewer.