Changeset 11558


Ignore:
Timestamp:
02/28/12 09:11:09 (13 years ago)
Author:
Mathieu Morlighem
Message:

Fixed streamline upwinding in case vel=0

File:
1 edited

Legend:

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

    r11508 r11558  
    524524                if(stabilization==2){
    525525                        /*Streamline upwinding*/
    526                         vel=sqrt(pow(vx,2.)+pow(vy,2.));
     526                        vel=sqrt(pow(vx,2.)+pow(vy,2.))+1.e-8;
    527527                        K[0][0]=h/(2*vel)*vx*vx;
    528528                        K[1][0]=h/(2*vel)*vy*vx;
     
    36673667        //      vy_input->GetInputValue(&vy,gauss);
    36683668        //      grade_g[iv]=-2*drag*alpha_complement*((lambda*vx+mu*vy));
    3669         //      VecSetValues(gradient,NUMVERTICES,doflist1,(const double*)grade_g,INSERT_VALUES);
    36703669        //}
     3670        //VecSetValues(gradient,NUMVERTICES,doflist1,(const double*)grade_g,INSERT_VALUES);
    36713671        /*End Analytical gradient*/
    36723672
Note: See TracChangeset for help on using the changeset viewer.