Changeset 10278


Ignore:
Timestamp:
10/24/11 16:05:13 (13 years ago)
Author:
Mathieu Morlighem
Message:

Added MacAyeal for Bal H

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r10277 r10278  
    52895289        h=sqrt(2*this->GetArea());
    52905290
    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 
    53045291        /*Start looping on the number of gaussian points:*/
    53055292        gauss=new GaussTria(2);
     
    53385325
    53395326                if(stabilization==1){
     5327                        /*Streamline upwinding*/
    53405328                        vel=sqrt(pow(vx,2.)+pow(vy,2.));
    53415329                        K[0][0]=h/(2*vel)*vx*vx;
     
    53435331                        K[0][1]=h/(2*vel)*vx*vy;
    53445332                        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){
    53455344                        KDL[0][0]=DL_scalar*K[0][0];
    53465345                        KDL[1][0]=DL_scalar*K[1][0];
    53475346                        KDL[0][1]=DL_scalar*K[0][1];
    53485347                        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 
    53535348                        TripleMultiply( &Bprime[0][0],2,numdof,1,
    53545349                                                &KDL[0][0],2,2,0,
Note: See TracChangeset for help on using the changeset viewer.