Changeset 8657
- Timestamp:
- 06/17/11 13:20:05 (14 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/c/objects/Elements/Penta.cpp ¶
r8655 r8657 4596 4596 4597 4597 /*Build alpha_complement_list: */ 4598 if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum );4598 if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum); 4599 4599 else alpha_complement=0; 4600 4600 … … 4662 4662 /*Build frictoin element, needed later: */ 4663 4663 inputs->GetParameterValue(&drag_type,DragTypeEnum); 4664 friction=new Friction(" 2d",inputs,matpar,analysis_type);4664 friction=new Friction("3d",inputs,matpar,analysis_type); 4665 4665 4666 4666 /* Start looping on the number of gaussian points: */ … … 4671 4671 4672 4672 /*Recover alpha_complement and drag: */ 4673 if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum );4673 if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum); 4674 4674 else alpha_complement=0; 4675 4675 drag_input->GetParameterValue(&drag,gauss); -
TabularUnified issm/trunk/src/c/objects/Elements/Tria.cpp ¶
r8654 r8657 3084 3084 3085 3085 /*Build alpha_complement_list: */ 3086 if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum );3086 if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum); 3087 3087 else alpha_complement=0; 3088 3088 -
TabularUnified issm/trunk/src/c/objects/Loads/Friction.cpp ¶
r8654 r8657 71 71 double alpha2; 72 72 73 74 73 /*Recover parameters: */ 75 74 inputs->GetParameterValue(&drag_p,DragPEnum); … … 136 135 double alpha2; 137 136 138 139 137 /*Recover parameters: */ 140 138 inputs->GetParameterValue(&drag_p,DragPEnum); … … 185 183 } 186 184 /*}}}*/ 187 /*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum ) {{{1*/188 void Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum ){185 /*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum) {{{1*/ 186 void Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum){ 189 187 190 188 /* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. … … 194 192 /*diverse: */ 195 193 int i; 194 double r,s; 195 double vx,vy,vz,vmag; 196 double drag_p,drag_q; 196 197 double Neff; 197 double r,s;198 double vx;199 double vy;200 double vmag;201 double drag_p,drag_q;202 198 double drag_coefficient; 203 199 double bed,thickness; … … 217 213 rho_water=matpar->GetRhoWater(); 218 214 219 220 215 //compute r and q coefficients: */ 221 216 r=drag_q/drag_p; … … 232 227 233 228 //We need the velocity magnitude to evaluate the basal stress: 234 this->GetParameterValue(&vx, gauss,vxenum); 235 this->GetParameterValue(&vy, gauss,vyenum); 236 vmag=sqrt(pow(vx,2)+pow(vy,2)); 229 if(strcmp(element_type,"2d")==0){ 230 this->GetParameterValue(&vx, gauss,vxenum); 231 this->GetParameterValue(&vy, gauss,vyenum); 232 vmag=sqrt(pow(vx,2)+pow(vy,2)); 233 } 234 else if (strcmp(element_type,"3d")==0){ 235 this->GetParameterValue(&vx, gauss,vxenum); 236 this->GetParameterValue(&vy, gauss,vyenum); 237 this->GetParameterValue(&vz, gauss,vzenum); 238 vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2)); 239 } 240 else _error_("element_type %s not supported yet",element_type); 237 241 238 242 /*Checks that s-1>0 if v=0*/ … … 245 249 } 246 250 /*}}}*/ 247 /*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum ) {{{1*/248 void Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum ){251 /*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum) {{{1*/ 252 void Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){ 249 253 250 254 /* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. … … 254 258 /*diverse: */ 255 259 int i; 260 double r,s; 261 double vx,vy,vz,vmag; 262 double drag_p,drag_q; 256 263 double Neff; 257 double r,s;258 double vx;259 double vy;260 double vmag;261 double drag_p,drag_q;262 264 double drag_coefficient; 263 265 double bed,thickness; … … 277 279 rho_water=matpar->GetRhoWater(); 278 280 279 280 281 //compute r and q coefficients: */ 281 282 r=drag_q/drag_p; … … 292 293 293 294 //We need the velocity magnitude to evaluate the basal stress: 294 this->GetParameterValue(&vx, gauss,vxenum); 295 this->GetParameterValue(&vy, gauss,vyenum); 296 vmag=sqrt(pow(vx,2)+pow(vy,2)); 295 if(strcmp(element_type,"2d")==0){ 296 this->GetParameterValue(&vx, gauss,vxenum); 297 this->GetParameterValue(&vy, gauss,vyenum); 298 vmag=sqrt(pow(vx,2)+pow(vy,2)); 299 } 300 else if (strcmp(element_type,"3d")==0){ 301 this->GetParameterValue(&vx, gauss,vxenum); 302 this->GetParameterValue(&vy, gauss,vyenum); 303 this->GetParameterValue(&vz, gauss,vzenum); 304 vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2)); 305 } 306 else _error_("element_type %s not supported yet",element_type); 297 307 298 308 /*Checks that s-1>0 if v=0*/ -
TabularUnified issm/trunk/src/c/objects/Loads/Friction.h ¶
r8654 r8657 29 29 void GetAlpha2(double* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum); 30 30 void GetAlpha2(double* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum); 31 void GetAlphaComplement(double* alpha_complement, GaussTria* gauss,int vxenum,int vyenum );32 void GetAlphaComplement(double* alpha_complement, GaussPenta* gauss,int vxenum,int vyenum );31 void GetAlphaComplement(double* alpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum); 32 void GetAlphaComplement(double* alpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum); 33 33 void GetParameterValue(double* pvalue,GaussTria* gauss,int enum_type); 34 34 void GetParameterValue(double* pvalue,GaussPenta* gauss,int enum_type);
Note:
See TracChangeset
for help on using the changeset viewer.