source: issm/oecreview/Archive/15392-16133/ISSM-15958-15959.diff

Last change on this file was 16134, checked in by Mathieu Morlighem, 12 years ago

Added Archive/15392-16133

File size: 2.3 KB
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    73387338        /*go through vertices, and update inputs, considering them to be TriaVertex type: */
    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];
    73447344                                s[i]        = b[i]+h[i];
     
    73507350                }
    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]){
    73567356                                /*Unground only if the element is connected to the ice shelf*/
     
    74097409        this->inputs->AddInput(new TriaInput(BedEnum,&b[0],P1Enum));
    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}
    74157423/*}}}*/
  • ../trunk-jpl/src/c/classes/Elements/Penta.cpp

     
    1129811298   this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum,floatingelement));
    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);
    1130411312
Note: See TracBrowser for help on using the repository browser.