Changeset 437


Ignore:
Timestamp:
05/15/09 08:06:47 (16 years ago)
Author:
Mathieu Morlighem
Message:

Now CM should work with macayeal 3d... to be tested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Penta.cpp

    r394 r437  
    11111111        Tria* tria=NULL;
    11121112       
    1113         /*Bail out if this element does not touch the surface: */
    1114         if (onsurface){
     1113        /*Bail out if this element if:
     1114         * -> Non collapsed and not on the surface
     1115         * -> collapsed (2d model) and not on bed) */
     1116        if ((!collapse && !onsurface) || (collapse && !onbed)){
     1117                return;
     1118        }
     1119        else if (collapse){
     1120
     1121                /*This element should be collapsed into a tria element at its base. Create this tria element,
     1122                 * and compute Du*/
     1123                tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     1124                tria->Du(du_g,u_g,u_g_obs,inputs,analysis_type);
     1125                delete tria;
    11151126                return;
    11161127        }
    11171128        else{
    11181129               
    1119                 tria=(Tria*)SpawnTria(3,4,5); //grids 0, 1 and 2 make the new tria.
     1130                tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
    11201131                tria->Du(du_g,u_g,u_g_obs,inputs,analysis_type);
    11211132                delete tria;
     
    11701181        Tria* tria=NULL;
    11711182       
    1172         /*Bail out if this element does not touch the surface: */
    1173         if (!onsurface){
     1183        /*Bail out if this element if:
     1184         * -> Non collapsed and not on the surface
     1185         * -> collapsed (2d model) and not on bed) */
     1186        if ((!collapse && !onsurface) || (collapse && !onbed)){
    11741187                return 0;
    11751188        }
     1189        else if (collapse){
     1190
     1191                /*This element should be collapsed into a tria element at its base. Create this tria element,
     1192                 * and compute Misfit*/
     1193                tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face).
     1194                J=tria->Misfit( velocity,obs_velocity,inputs,analysis_type);
     1195                delete tria;
     1196                return J;
     1197        }
    11761198        else{
    11771199
    1178                 /*use the Tria::CreateMisfit routine, on a Tria Element which is made of the 3 upper grids at the surface of the ice sheet. : */
    1179                 tria=(Tria*)SpawnTria(3,4,5);
     1200                tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
    11801201                J=tria->Misfit( velocity,obs_velocity,inputs,analysis_type);
    11811202                delete tria;
Note: See TracChangeset for help on using the changeset viewer.