Changeset 15959


Ignore:
Timestamp:
08/26/13 15:43:03 (12 years ago)
Author:
seroussi
Message:

BUG: fixed crazy logic of soft grounding line for levelset update

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r15954 r15959  
    1129911299
    1130011300        /*Recalculate phi*/
    11301         for(i=0;i<NUMVERTICES;i++) phi[i]=h[i]+r[i]/density;
     11301        for(i=0;i<NUMVERTICES;i++){
     11302                if(migration_style==SoftMigrationEnum){
     11303                        bed_hydro=-density*h[i];
     11304                        if(phi[i]<0. || bed_hydro<=r[i] || reCast<bool>(sheet_ungrounding[nodes[i]->Sid()])){
     11305                                phi[i]=h[i]+r[i]/density;
     11306                        }
     11307                }
     11308                else phi[i]=h[i]+r[i]/density;
     11309        }
    1130211310        this->inputs->AddInput(new PentaInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum));
    1130311311        this->InputExtrude(MaskGroundediceLevelsetEnum,ElementEnum);
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r15956 r15959  
    73397339        for(i=0;i<NUMVERTICES;i++){
    73407340                /*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
    7341                 if(phi[i]<=0){
     7341                if(phi[i]<=0.){
    73427342                        if(b[i]<=r[i]){
    73437343                                b[i]        = r[i];
     
    73517351                /*Ice sheet: if hydrostatic bed above bathymetry, ice sheet starts to unground, elso do nothing */
    73527352                /*Change only if AgressiveMigration or if the ice sheet is in contact with the ocean*/
    7353                 else{
     7353                else{ // phi>0
    73547354                        bed_hydro=-density*h[i];
    73557355                        if (bed_hydro>r[i]){
     
    74107410
    74117411        /*Recalculate phi*/
    7412         for(i=0;i<NUMVERTICES;i++) phi[i]=h[i]+r[i]/density;
     7412        for(i=0;i<NUMVERTICES;i++){
     7413                if(migration_style==SoftMigrationEnum){
     7414                        bed_hydro=-density*h[i];
     7415                        if(phi[i]<0. || bed_hydro<=r[i] || reCast<bool>(sheet_ungrounding[nodes[i]->Sid()])){
     7416                                phi[i]=h[i]+r[i]/density;
     7417                        }
     7418                }
     7419                else phi[i]=h[i]+r[i]/density;
     7420        }
    74137421        this->inputs->AddInput(new TriaInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum));
    74147422}
Note: See TracChangeset for help on using the changeset viewer.