Changeset 21391
- Timestamp:
- 11/17/16 20:52:20 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r21350 r21391 2497 2497 IssmDouble load_love_k2 = -0.30922675; //degree 2 load Love number 2498 2498 IssmDouble m1, m2, m3; 2499 IssmDouble lati, longi, value;2499 IssmDouble lati, longi, radi, value; 2500 2500 2501 2501 /*Serialize vectors from previous iteration:*/ … … 2547 2547 */ 2548 2548 for(int i=0;i<vertices->Size();i++){ 2549 int sid; 2549 2550 //Vertex* vertex=(Vertex*)vertices->GetObjectByOffset(i); 2550 2551 Vertex* vertex=xDynamicCast<Vertex*>(vertices->GetObjectByOffset(i)); 2551 2552 lati=latitude[i]/180*PI; longi=longitude[i]/180*PI; 2552 sid=vertex->Sid(); 2553 2554 lati=latitude[sid]/180*PI; longi=longitude[sid]/180*PI; radi=radius[sid]; 2553 2555 2554 2556 /*only first order terms are considered now: */ 2555 value=((1.0+tide_love_k-tide_love_h)/9.81)*pow(omega*radi us[i],2.0)*2557 value=((1.0+tide_love_k-tide_love_h)/9.81)*pow(omega*radi,2.0)* 2556 2558 (-m3/6.0 + 0.5*m3*cos(2.0*lati) - 0.5*sin(2.*lati)*(m1*cos(longi)+m2*sin(longi))); 2557 2559 2558 pSgo_rot->SetValue( vertex->Sid(),value,INS_VAL); //INS_VAL ensures that you don't add several times2560 pSgo_rot->SetValue(sid,value,INS_VAL); //INS_VAL ensures that you don't add several times 2559 2561 } 2560 2562
Note:
See TracChangeset
for help on using the changeset viewer.