Changeset 483 for issm/trunk/src/c/objects/Friction.cpp
- Timestamp:
- 05/18/09 16:55:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Friction.cpp
r394 r483 72 72 double velocity_x[numgrids]; 73 73 double velocity_y[numgrids]; 74 double velocity_z[numgrids]; 74 75 double velocity_mag[numgrids]; 75 76 … … 90 91 91 92 //We need the velocity magnitude to evaluate the basal stress: 92 velocity_x[i]=*(friction->velocities+2*i+0); //velocities of size numgridsx2 93 velocity_y[i]=*(friction->velocities+2*i+1); 94 velocity_mag[i]=sqrt(pow(velocity_x[i],2)+pow(velocity_y[i],2)); 93 if(strcmp(friction->element_type,"2d")){ 94 velocity_x[i]=*(friction->velocities+2*i+0); //velocities of size numgridsx2 95 velocity_y[i]=*(friction->velocities+2*i+1); 96 velocity_mag[i]=sqrt(pow(velocity_x[i],2)+pow(velocity_y[i],2)); 97 } 98 else{ 99 velocity_x[i]=*(friction->velocities+3*i+0); //velocities of size numgridsx3 100 velocity_y[i]=*(friction->velocities+3*i+1); 101 velocity_z[i]=*(friction->velocities+3*i+2); 102 velocity_mag[i]=sqrt(pow(velocity_x[i],2)+pow(velocity_y[i],2)+pow(velocity_z[i],2)); 103 } 95 104 96 105 alpha2[i]=pow(friction->K[i],2)*pow(Neff[i],r)*pow(velocity_mag[i],(s-1));
Note:
See TracChangeset
for help on using the changeset viewer.