[16134] | 1 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 15958)
|
---|
| 4 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 15959)
|
---|
| 5 | @@ -7338,7 +7338,7 @@
|
---|
| 6 | /*go through vertices, and update inputs, considering them to be TriaVertex type: */
|
---|
| 7 | for(i=0;i<NUMVERTICES;i++){
|
---|
| 8 | /*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
|
---|
| 9 | - if(phi[i]<=0){
|
---|
| 10 | + if(phi[i]<=0.){
|
---|
| 11 | if(b[i]<=r[i]){
|
---|
| 12 | b[i] = r[i];
|
---|
| 13 | s[i] = b[i]+h[i];
|
---|
| 14 | @@ -7350,7 +7350,7 @@
|
---|
| 15 | }
|
---|
| 16 | /*Ice sheet: if hydrostatic bed above bathymetry, ice sheet starts to unground, elso do nothing */
|
---|
| 17 | /*Change only if AgressiveMigration or if the ice sheet is in contact with the ocean*/
|
---|
| 18 | - else{
|
---|
| 19 | + else{ // phi>0
|
---|
| 20 | bed_hydro=-density*h[i];
|
---|
| 21 | if (bed_hydro>r[i]){
|
---|
| 22 | /*Unground only if the element is connected to the ice shelf*/
|
---|
| 23 | @@ -7409,7 +7409,15 @@
|
---|
| 24 | this->inputs->AddInput(new TriaInput(BedEnum,&b[0],P1Enum));
|
---|
| 25 |
|
---|
| 26 | /*Recalculate phi*/
|
---|
| 27 | - for(i=0;i<NUMVERTICES;i++) phi[i]=h[i]+r[i]/density;
|
---|
| 28 | + for(i=0;i<NUMVERTICES;i++){
|
---|
| 29 | + if(migration_style==SoftMigrationEnum){
|
---|
| 30 | + bed_hydro=-density*h[i];
|
---|
| 31 | + if(phi[i]<0. || bed_hydro<=r[i] || reCast<bool>(sheet_ungrounding[nodes[i]->Sid()])){
|
---|
| 32 | + phi[i]=h[i]+r[i]/density;
|
---|
| 33 | + }
|
---|
| 34 | + }
|
---|
| 35 | + else phi[i]=h[i]+r[i]/density;
|
---|
| 36 | + }
|
---|
| 37 | this->inputs->AddInput(new TriaInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum));
|
---|
| 38 | }
|
---|
| 39 | /*}}}*/
|
---|
| 40 | Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp
|
---|
| 41 | ===================================================================
|
---|
| 42 | --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 15958)
|
---|
| 43 | +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 15959)
|
---|
| 44 | @@ -11298,7 +11298,15 @@
|
---|
| 45 | this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum,floatingelement));
|
---|
| 46 |
|
---|
| 47 | /*Recalculate phi*/
|
---|
| 48 | - for(i=0;i<NUMVERTICES;i++) phi[i]=h[i]+r[i]/density;
|
---|
| 49 | + for(i=0;i<NUMVERTICES;i++){
|
---|
| 50 | + if(migration_style==SoftMigrationEnum){
|
---|
| 51 | + bed_hydro=-density*h[i];
|
---|
| 52 | + if(phi[i]<0. || bed_hydro<=r[i] || reCast<bool>(sheet_ungrounding[nodes[i]->Sid()])){
|
---|
| 53 | + phi[i]=h[i]+r[i]/density;
|
---|
| 54 | + }
|
---|
| 55 | + }
|
---|
| 56 | + else phi[i]=h[i]+r[i]/density;
|
---|
| 57 | + }
|
---|
| 58 | this->inputs->AddInput(new PentaInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum));
|
---|
| 59 | this->InputExtrude(MaskGroundediceLevelsetEnum,ElementEnum);
|
---|
| 60 |
|
---|