Changeset 18222
- Timestamp:
- 07/07/14 20:23:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r18147 r18222 1207 1207 1208 1208 IssmDouble weight,thicknessobs,thickness,potential; 1209 IssmDouble vx,vy,vxbar,vybar,vxobs,vyobs,vxbarobs,vybarobs,nux,nuy; 1209 1210 IssmDouble Jdet; 1210 1211 IssmDouble* xyz_list = NULL; … … 1223 1224 Input* thicknessobs_input=element->GetInput(InversionThicknessObsEnum); _assert_(thicknessobs_input); 1224 1225 Input* potential_input =element->GetInput(PotentialEnum); _assert_(potential_input); 1226 Input* vxobs_input =element->GetInput(BalancethicknessVxObsEnum); _assert_(vxobs_input); 1227 Input* vyobs_input =element->GetInput(BalancethicknessVyObsEnum); _assert_(vyobs_input); 1228 Input* vx_input =element->GetInput(VxEnum); _assert_(vx_input); 1229 Input* vy_input =element->GetInput(VyEnum); _assert_(vy_input); 1230 Input* nux_input = element->GetInput(BalancethicknessNuxEnum); _assert_(nux_input); 1231 Input* nuy_input = element->GetInput(BalancethicknessNuyEnum); _assert_(nuy_input); 1225 1232 1226 1233 /* Start looping on the number of gaussian points: */ … … 1238 1245 thicknessobs_input->GetInputValue(&thicknessobs,gauss); 1239 1246 potential_input->GetInputValue(&potential,gauss); 1240 gauss->GaussPoint(ig); 1241 1247 vxobs_input->GetInputValue(&vxobs,gauss); 1248 vyobs_input->GetInputValue(&vyobs,gauss); 1249 vx_input->GetInputValue(&vxbar,gauss); 1250 vy_input->GetInputValue(&vybar,gauss); 1251 nux_input->GetInputValue(&nux,gauss); 1252 nuy_input->GetInputValue(&nuy,gauss); 1253 1254 vxbarobs = nux*vxobs; 1255 vybarobs = nuy*vyobs; 1256 1257 /*J = (H^2 - Hobs^2)^2*/ 1242 1258 //J +=0.5*(thickness*thickness - thicknessobs*thicknessobs)*(thickness*thickness - thicknessobs*thicknessobs)*weight*Jdet*gauss->weight; 1243 J +=.5*potential*potential*weight*Jdet*gauss->weight; 1259 /*J = phi^2*/ 1260 //J +=.5*potential*potential*weight*Jdet*gauss->weight; OK 1261 /*J = (ubar - nux*uobs)^2*/ 1262 J +=0.5*((vxbarobs - vxbar)*(vxbarobs - vxbar) + (vybarobs - vybar)*(vybarobs - vybar))*weight*Jdet*gauss->weight; 1244 1263 } 1245 1264
Note:
See TracChangeset
for help on using the changeset viewer.