Changeset 21261 for issm/trunk-jpl/src/c/classes/FemModel.cpp
- Timestamp:
- 10/12/16 12:16:21 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r21159 r21261 625 625 break; 626 626 627 case EsaSolutionEnum: 628 analyses_temp[numanalyses++]=EsaAnalysisEnum; 629 break; 630 627 631 case SealevelriseSolutionEnum: 628 632 analyses_temp[numanalyses++]=SealevelriseAnalysisEnum; … … 638 642 639 643 case TransientSolutionEnum:{ 640 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslr,is gia;644 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslr,isesa,isgia; 641 645 iomodel->FindConstant(&isSIA,"md.flowequation.isSIA"); 642 646 iomodel->FindConstant(&isFS,"md.flowequation.isFS"); … … 651 655 iomodel->FindConstant(&issmb,"md.transient.issmb"); 652 656 iomodel->FindConstant(&isslr,"md.transient.isslr"); 657 iomodel->FindConstant(&isesa,"md.transient.isesa"); 653 658 iomodel->FindConstant(&isgia,"md.transient.isgia"); 654 659 if(isstressbalance){ … … 694 699 if(isslr){ 695 700 analyses_temp[numanalyses++]=SealevelriseAnalysisEnum; 701 } 702 if(isesa){ 703 analyses_temp[numanalyses++]=EsaAnalysisEnum; 696 704 } 697 705 if(isgia){ … … 2291 2299 /*}}}*/ 2292 2300 #endif 2301 #ifdef _HAVE_ESA_ 2302 void FemModel::EsaGeodetic(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz){/*{{{*/ 2303 2304 IssmDouble eartharea=0; 2305 IssmDouble eartharea_cpu=0; 2306 2307 int ns,nsmax; 2308 2309 /*Go through elements, and add contribution from each element to the deflection vector wg:*/ 2310 ns = elements->Size(); 2311 2312 /*First, figure out the surface area of Earth: */ 2313 for(int i=0;i<ns;i++){ 2314 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 2315 eartharea_cpu += element->GetAreaSpherical(); 2316 } 2317 ISSM_MPI_Reduce (&eartharea_cpu,&eartharea,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,0,IssmComm::GetComm() ); 2318 ISSM_MPI_Bcast(&eartharea,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 2319 2320 /*Figure out max of ns: */ 2321 ISSM_MPI_Reduce(&ns,&nsmax,1,ISSM_MPI_INT,ISSM_MPI_MAX,0,IssmComm::GetComm()); 2322 ISSM_MPI_Bcast(&nsmax,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 2323 2324 /*Call the esa geodetic core: */ 2325 for(int i=0;i<nsmax;i++){ 2326 if(i<ns){ 2327 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 2328 element->EsaGeodetic(pUp,pNorth,pEast,latitude,longitude,radius,xx,yy,zz,eartharea); 2329 } 2330 if(i%100==0){ 2331 pUp->Assemble(); 2332 pNorth->Assemble(); 2333 pEast->Assemble(); 2334 } 2335 } 2336 2337 /*One last time: */ 2338 pUp->Assemble(); 2339 pNorth->Assemble(); 2340 pEast->Assemble(); 2341 2342 /*Free ressources:*/ 2343 xDelete<IssmDouble>(latitude); 2344 xDelete<IssmDouble>(longitude); 2345 xDelete<IssmDouble>(radius); 2346 xDelete<IssmDouble>(xx); 2347 xDelete<IssmDouble>(yy); 2348 xDelete<IssmDouble>(zz); 2349 } 2350 /*}}}*/ 2351 #endif 2293 2352 #ifdef _HAVE_SEALEVELRISE_ 2294 2353 void FemModel::SealevelriseEustatic(Vector<IssmDouble>* pSgi, IssmDouble* peustatic, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius) { /*{{{*/
Note:
See TracChangeset
for help on using the changeset viewer.