Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 15958) +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 15959) @@ -7338,7 +7338,7 @@ /*go through vertices, and update inputs, considering them to be TriaVertex type: */ for(i=0;i0 bed_hydro=-density*h[i]; if (bed_hydro>r[i]){ /*Unground only if the element is connected to the ice shelf*/ @@ -7409,7 +7409,15 @@ this->inputs->AddInput(new TriaInput(BedEnum,&b[0],P1Enum)); /*Recalculate phi*/ - for(i=0;i(sheet_ungrounding[nodes[i]->Sid()])){ + phi[i]=h[i]+r[i]/density; + } + } + else phi[i]=h[i]+r[i]/density; + } this->inputs->AddInput(new TriaInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum)); } /*}}}*/ Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 15958) +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 15959) @@ -11298,7 +11298,15 @@ this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum,floatingelement)); /*Recalculate phi*/ - for(i=0;i(sheet_ungrounding[nodes[i]->Sid()])){ + phi[i]=h[i]+r[i]/density; + } + } + else phi[i]=h[i]+r[i]/density; + } this->inputs->AddInput(new PentaInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum)); this->InputExtrude(MaskGroundediceLevelsetEnum,ElementEnum);