Changeset 1051
- Timestamp:
- 06/22/09 14:46:26 (16 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Friction.h
r394 r1051 27 27 28 28 Friction* NewFriction(void); 29 int 30 void 29 int FrictionInit(Friction* friction); 30 void DeleteFriction(Friction** pfriction); 31 31 void FrictionGetAlpha2(double* alpha2, Friction* friction); 32 32 void FrictionGetAlphaComplement(double* alpha_complement, Friction* friction); -
issm/trunk/src/c/objects/Matice.cpp
r983 r1051 195 195 196 196 #undef __FUNCT__ 197 #define __FUNCT__ "MatIce::GetViscosity 2"198 void Matice::GetViscosity 2(double* pviscosity2, double* epsilon){197 #define __FUNCT__ "MatIce::GetViscosityComplement" 198 void Matice::GetViscosityComplement(double* pviscosity_complement, double* epsilon){ 199 199 200 200 /*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: … … 212 212 213 213 /*output: */ 214 double viscosity 2;214 double viscosity_complement; 215 215 216 216 /*input strain rate: */ … … 228 228 A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+exx*eyy; 229 229 if(A==0){ 230 /*Maximum viscosity 2for 0 shear areas: */231 viscosity 2=4.5*pow(10,17);230 /*Maximum viscosity_complement for 0 shear areas: */ 231 viscosity_complement=4.5*pow(10,17); 232 232 } 233 233 else{ 234 234 e=(n-1)/2/n; 235 235 236 viscosity 2=1/(2*pow(A,e));236 viscosity_complement=1/(2*pow(A,e)); 237 237 } 238 238 } 239 239 else{ 240 viscosity 2=4.5*pow(10,17);240 viscosity_complement=4.5*pow(10,17); 241 241 } 242 242 243 243 #ifdef _DEBUG_ 244 _printf_(" Viscosity2%lf\n",mu2);244 _printf_("viscosity_complement %lf\n",mu2); 245 245 #endif 246 246 247 247 /*Return: */ 248 *pviscosity 2=viscosity2;248 *pviscosity_complement=viscosity_complement; 249 249 } 250 250 -
issm/trunk/src/c/objects/Matice.h
r983 r1051 34 34 void SetB(double B_param); 35 35 void GetViscosity2d(double* pviscosity, double* pepsilon); 36 void GetViscosity2(double* pviscosity2, double* pepsilon);37 36 void GetViscosity3d(double* pviscosity3d, double* pepsilon); 38 37 void GetViscosity3dStokes(double* pviscosity3d, double* epsilon); 38 void GetViscosityComplement(double* pviscosity_complement, double* pepsilon); 39 39 Object* copy(); 40 40 double GetB(); -
issm/trunk/src/c/objects/Tria.cpp
r1047 r1051 2451 2451 2452 2452 /* parameters: */ 2453 double viscosity 2;2453 double viscosity_complement; 2454 2454 double dvx[NDOF2]; 2455 2455 double dvy[NDOF2]; … … 2509 2509 GetStrainRate(&epsilon[0],&vxvy_list[0][0],&xyz_list[0][0],gauss_l1l2l3); 2510 2510 2511 /*Get viscosity 2: */2512 matice->GetViscosity 2(&viscosity2, &epsilon[0]);2511 /*Get viscosity complement: */ 2512 matice->GetViscosityComplement(&viscosity_complement, &epsilon[0]); 2513 2513 2514 2514 /*Get dvx, dvy, dadjx and dadjx: */ … … 2524 2524 GetNodalFunctions(l1l2l3, gauss_l1l2l3); 2525 2525 #ifdef _DEBUG_ 2526 _printf_("viscosity 2 %g thickness %g dvx [%g %g] dvy [%g %g] dadjx [%g %g] dadjy[%g %g]\n",viscosity2,thickness,dvx[0],dvx[1],dvy[0],dvy[1],dadjx[0],dadjx[1],dadjy[0],dadjy[1]);2526 _printf_("viscositycomp %g thickness %g dvx [%g %g] dvy [%g %g] dadjx [%g %g] dadjy[%g %g]\n",viscosity_complement,thickness,dvx[0],dvx[1],dvy[0],dvy[1],dadjx[0],dadjx[1],dadjy[0],dadjy[1]); 2527 2527 #endif 2528 2528 2529 2529 /*Build gradje_g_gaussian vector (actually -dJ/dB): */ 2530 2530 for (i=0;i<numgrids;i++){ 2531 grade_g_gaussian[i]=-viscosity 2*thickness*( (2*dvx[0]+dvy[1])*2*dadjx[0]+(dvx[1]+dvy[0])*(dadjx[1]+dadjy[0])+(2*dvy[1]+dvx[0])*2*dadjy[1])*Jdet*gauss_weight*l1l2l3[i];2531 grade_g_gaussian[i]=-viscosity_complement*thickness*( (2*dvx[0]+dvy[1])*2*dadjx[0]+(dvx[1]+dvy[0])*(dadjx[1]+dadjy[0])+(2*dvy[1]+dvx[0])*2*dadjy[1])*Jdet*gauss_weight*l1l2l3[i]; 2532 2532 } 2533 2533
Note:
See TracChangeset
for help on using the changeset viewer.