Changeset 398


Ignore:
Timestamp:
05/13/09 15:45:43 (16 years ago)
Author:
Mathieu Morlighem
Message:

bad gradient sign

File:
1 edited

Legend:

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

    r391 r398  
    16741674                gauss_l1l2l3[2]=*(third_gauss_area_coord+ig);
    16751675
    1676                
    1677                 /*Compute velocities at gaussian point: */
    1678                 GetParameterValue(&velocity_x, &vx_list[0],gauss_l1l2l3);
    1679                 GetParameterValue(&velocity_y, &vy_list[0],gauss_l1l2l3);
    1680                 #ifdef _DEBUG_
    1681                         printf("Velocity: %lf %lf\n", velocity_x,velocity_y);
    1682                 #endif
    1683        
    1684                 /*Compute obs_velocities at gaussian point: */
    1685                 GetParameterValue(&obs_velocity_x, &obs_vx_list[0],gauss_l1l2l3);
    1686                 GetParameterValue(&obs_velocity_y, &obs_vy_list[0],gauss_l1l2l3);
    1687                 #ifdef _DEBUG_
    1688                         printf("Observed velocity: %g %g\n", obs_velocity_x,obs_velocity_y);
    1689                 #endif
    1690 
    16911676                /* Get Jacobian determinant: */
    16921677                GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss_l1l2l3);
     
    19481933                /*Build gradje_g_gaussian vector (actually -dJ/ddrag): */
    19491934                for (i=0;i<numgrids;i++){
    1950                         grade_g_gaussian[i]=2*drag*alpha_complement*( (lambda*vx+mu*vy))*Jdet*gauss_weight*l1l2l3[i];
     1935                        grade_g_gaussian[i]=-2*drag*alpha_complement*((lambda*vx+mu*vy))*Jdet*gauss_weight*l1l2l3[i];
    19511936                }
    19521937               
Note: See TracChangeset for help on using the changeset viewer.