Changeset 17865
- Timestamp:
- 04/28/14 15:49:38 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/gauss/GaussTetra.cpp
r17854 r17865 33 33 /*FUNCTION GaussTetra::GaussTetra(int order) {{{*/ 34 34 GaussTetra::GaussTetra(int order){ 35 35 36 /*Get gauss points*/ 36 37 GaussLegendreTetra(&numgauss,&coords1,&coords2,&coords3,&coords4,&weights,order); 37 for(int i=0;i<numgauss;i++) this->weights[i]=this->weights[i]/6.; //FIXME: double check that 38 39 /*Rescale weights if necessary*/ 40 IssmDouble sumweights = 0.; 41 for(int i=0;i<numgauss;i++) sumweights += this->weights[i]; 42 if(sumweights==1.){ 43 for(int i=0;i<numgauss;i++) this->weights[i] = this->weights[i]/6.; /*rescale volume to 1/6*/ 44 } 45 46 /*Check final weights in debugging mode*/ 47 #ifdef _ISSM_DEBUG_ 48 sumweights = 0.; for(int i=0;i<numgauss;i++) sumweights += this->weights[i]; 49 _assert_(sumweights>1./6.-1e-10); 50 _assert_(sumweights<1./6.+1e-10); 51 #endif 38 52 39 53 /*Initialize static fields as undefinite*/ -
issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
r17543 r17865 1425 1425 (*pl3 )[i]=l3p [iord-1][i]; 1426 1426 (*pl4 )[i]=l4p [iord-1][i]; 1427 (*pwgt)[i]=wgtp[iord-1][i] *2./3.*SQRT2;1427 (*pwgt)[i]=wgtp[iord-1][i]; 1428 1428 } 1429 1429 }
Note:
See TracChangeset
for help on using the changeset viewer.