Changeset 15041
- Timestamp:
- 05/17/13 11:30:17 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r15040 r15041 6067 6067 IssmDouble xyz_list[NUMVERTICES][3]; 6068 6068 IssmDouble xyz_list_tria[NUMVERTICES2D][3]={0.0}; 6069 IssmDouble slope[3]={0.0,0.0,0.0};6070 IssmDouble MAXSLOPE=.06; // 6 %6071 IssmDouble MOUNTAINKEXPONENT=10;6072 6069 IssmDouble L[2][numdof]; 6073 6070 IssmDouble DL[2][2] ={{ 0,0 },{0,0}}; //for basal drag … … 6099 6096 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<2;j++) xyz_list_tria[i][j]=xyz_list[i][j]; 6100 6097 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 6101 Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);6102 6098 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 6103 6099 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 6115 6111 /*Friction: */ 6116 6112 friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum); 6117 6118 // If we have a slope > 6% for this element, it means we are on a mountain. In this particular case,6119 //velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */6120 surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss);6121 slope_magnitude=sqrt(pow(slope[0],2)+pow(slope[1],2));6122 6123 if (slope_magnitude>MAXSLOPE){6124 alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);6125 }6126 6113 6127 6114 GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss); … … 6905 6892 IssmDouble slope_magnitude,alpha2,Jdet; 6906 6893 IssmDouble phi=1.0; 6907 IssmDouble slope[3]={0.0,0.0,0.0};6908 IssmDouble MAXSLOPE=.06; // 6 %6909 IssmDouble MOUNTAINKEXPONENT=10;6910 6894 IssmDouble L[2][numdof]; 6911 6895 IssmDouble DL[2][2]={{ 0,0 },{0,0}}; //for basal drag … … 6944 6928 GetL(&L[0][0], gauss,NDOF2); 6945 6929 6946 surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss);6947 6930 friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum); 6948 slope_magnitude=sqrt(pow(slope[0],2)+pow(slope[1],2));6949 6931 if(migration_style==SubelementMigrationEnum) alpha2=phi*alpha2; 6950 6951 // If we have a slope > 6% for this element, it means we are on a mountain. In this particular case,6952 //velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */6953 if (slope_magnitude>MAXSLOPE){6954 alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);6955 }6956 6932 6957 6933 DL_scalar=alpha2*gauss->weight*Jdet; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r15040 r15041 3319 3319 int analysis_type,migration_style; 3320 3320 int gausspoints=2; 3321 IssmDouble MAXSLOPE = .06; // 6 % 3322 IssmDouble MOUNTAINKEXPONENT = 10; 3323 IssmDouble slope_magnitude,alpha2; 3321 IssmDouble alpha2; 3324 3322 IssmDouble Jdet; 3325 3323 IssmDouble phi=1.0; … … 3363 3361 gauss->GaussPoint(ig); 3364 3362 3365 // If we have a slope > 6% for this element, it means we are on a mountain. In this particular case, 3366 //velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */ 3367 surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss); 3368 slope_magnitude=sqrt(slope[0]*slope[0]+slope[1]*slope[1]); 3369 if(slope_magnitude>MAXSLOPE) alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT); 3370 else friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum); 3363 friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum); 3371 3364 if(migration_style==SubelementMigrationEnum) alpha2=phi*alpha2; 3372 3365 if(migration_style==SubelementMigration2Enum){
Note:
See TracChangeset
for help on using the changeset viewer.