Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 15972) +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 15973) @@ -7302,6 +7302,7 @@ void Tria::MigrateGroundingLine(IssmDouble* phi_ungrounding){ int i,migration_style; + bool oldfloating; bool floatingelement = false; bool groundedelement = false; IssmDouble bed_hydro,yts,gl_melting_rate; @@ -7319,9 +7320,10 @@ GetInputListOnVertices(&b[0],BedEnum); GetInputListOnVertices(&r[0],BathymetryEnum); GetInputListOnVertices(&phi[0],MaskGroundediceLevelsetEnum); - rho_water = matpar->GetRhoWater(); - rho_ice = matpar->GetRhoIce(); - density = rho_ice/rho_water; + rho_water = matpar->GetRhoWater(); + rho_ice = matpar->GetRhoIce(); + density = rho_ice/rho_water; + oldfloating = this->IsFloating(); //figure out if element is floating before we start to change everything /*go through vertices, and update inputs, considering them to be TriaVertex type: */ for(i=0;iIsFloating() && floatingelement==true){ + if(!oldfloating && floatingelement==true){ for(i=0;iinputs->AddInput(new TriaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum)); } Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 15972) +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 15973) @@ -11189,6 +11189,7 @@ void Penta::MigrateGroundingLine(IssmDouble* phi_ungrounding){ int i,migration_style; + bool oldfloating; bool floatingelement = false; bool groundedelement = false; IssmDouble bed_hydro,yts,gl_melting_rate; @@ -11208,9 +11209,10 @@ GetInputListOnVertices(&b[0],BedEnum); GetInputListOnVertices(&r[0],BathymetryEnum); GetInputListOnVertices(&phi[0],MaskGroundediceLevelsetEnum); - rho_water = matpar->GetRhoWater(); - rho_ice = matpar->GetRhoIce(); - density = rho_ice/rho_water; + rho_water = matpar->GetRhoWater(); + rho_ice = matpar->GetRhoIce(); + density = rho_ice/rho_water; + oldfloating = this->IsFloating(); //figure out if the element is floating before starting to change everything /*go through vertices, and update inputs, considering them to be PentaVertex type: */ for(i=0;iIsFloating() && floatingelement==true){ + if(!oldfloating && floatingelement==true){ for(i=0;iinputs->AddInput(new PentaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum)); }