Changeset 18857


Ignore:
Timestamp:
11/25/14 13:27:23 (10 years ago)
Author:
hongjuy
Message:

CHG: cleaner code for MigrateGroundingLine for Contact

File:
1 edited

Legend:

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

    r18855 r18857  
    12261226        density     = rho_ice/rho_water;
    12271227
    1228         if(migration_style == ContactEnum){
    1229                 for(i = 0;i < numvertices;i++) phi[i] = phi_ungrounding[vertices[i]->Pid()];
    1230                 this->AddInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum);
    1231 
    1232                 /*go through vertices, and update inputs, considering them to be TriaVertex type: */
    1233                 for(i = 0;i < numvertices;i++){
    1234                         /*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
    1235                         if(phi[i] >= 0.){
    1236                                         b[i]  = r[i];
    1237                         }
    1238                 }
    1239 
    1240                 /*Update inputs*/
    1241                 this->AddInput(BaseEnum,&b[0],P1Enum);
    1242                 return;
    1243         }
    1244 
    1245         this->AddInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum);
    1246 
    12471228        /*go through vertices, and update inputs, considering them to be TriaVertex type: */
    12481229        for(i=0;i<numvertices;i++){
     1230                /* Contact FS*/
     1231                if(migration_style == ContactEnum && phi_ungrounding[vertices[i]->Pid()]<10){
     1232                        phi[i]=phi_ungrounding[vertices[i]->Pid()];
     1233                        if(phi[i]>=0.) b[i]=r[i];
     1234                }
    12491235                /*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
    1250                 if(phi[i]<=0.){
     1236                else if(phi[i]<=0.){
    12511237                        if(b[i]<=r[i]){
    12521238                                b[i]        = r[i];
Note: See TracChangeset for help on using the changeset viewer.