Changeset 10278
- Timestamp:
- 10/24/11 16:05:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r10277 r10278 5289 5289 h=sqrt(2*this->GetArea()); 5290 5290 5291 ///*Create Artificial diffusivity once for all if requested*/5292 //if(stabilization){5293 // gauss=new GaussTria();5294 // gauss->GaussCenter();5295 // GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss);5296 // delete gauss;5297 5298 // vxaverage_input->GetInputAverage(&vx);5299 // vyaverage_input->GetInputAverage(&vy);5300 // K[0][0]=pow(Jdettria,(double).5)/2.0*fabs(vx);5301 // K[1][1]=pow(Jdettria,(double).5)/2.0*fabs(vy);5302 //}5303 5304 5291 /*Start looping on the number of gaussian points:*/ 5305 5292 gauss=new GaussTria(2); … … 5338 5325 5339 5326 if(stabilization==1){ 5327 /*Streamline upwinding*/ 5340 5328 vel=sqrt(pow(vx,2.)+pow(vy,2.)); 5341 5329 K[0][0]=h/(2*vel)*vx*vx; … … 5343 5331 K[0][1]=h/(2*vel)*vx*vy; 5344 5332 K[1][1]=h/(2*vel)*vy*vy; 5333 } 5334 else if(stabilization==2){ 5335 /*MacAyeal*/ 5336 vxaverage_input->GetInputAverage(&vx); 5337 vyaverage_input->GetInputAverage(&vy); 5338 K[0][0]=h/2.0*fabs(vx) /sqrt(2*sqrt(3)); // the second part should not be there 5339 K[0][1]=0.; 5340 K[1][0]=0.; 5341 K[1][1]=h/2.0*fabs(vy) /sqrt(2*sqrt(3)); // the second part should not be there 5342 } 5343 if(stabilization==1 || stabilization==2){ 5345 5344 KDL[0][0]=DL_scalar*K[0][0]; 5346 5345 KDL[1][0]=DL_scalar*K[1][0]; 5347 5346 KDL[0][1]=DL_scalar*K[0][1]; 5348 5347 KDL[1][1]=DL_scalar*K[1][1]; 5349 5350 //KDL[0][0]=DL_scalar*K[0][0];5351 //KDL[1][1]=DL_scalar*K[1][1];5352 5353 5348 TripleMultiply( &Bprime[0][0],2,numdof,1, 5354 5349 &KDL[0][0],2,2,0,
Note:
See TracChangeset
for help on using the changeset viewer.