Changeset 437
- Timestamp:
- 05/15/09 08:06:47 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Penta.cpp
r394 r437 1111 1111 Tria* tria=NULL; 1112 1112 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; 1115 1126 return; 1116 1127 } 1117 1128 else{ 1118 1129 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). 1120 1131 tria->Du(du_g,u_g,u_g_obs,inputs,analysis_type); 1121 1132 delete tria; … … 1170 1181 Tria* tria=NULL; 1171 1182 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)){ 1174 1187 return 0; 1175 1188 } 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 } 1176 1198 else{ 1177 1199 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). 1180 1201 J=tria->Misfit( velocity,obs_velocity,inputs,analysis_type); 1181 1202 delete tria;
Note:
See TracChangeset
for help on using the changeset viewer.