Changeset 815 for XIOS/trunk/src/node/domain.cpp
- Timestamp:
- 01/26/16 18:18:58 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/domain.cpp
r813 r815 465 465 lon_g.resize(ni_glo) ; 466 466 lat_g.resize(nj_glo) ; 467 468 467 468 469 469 int* ibegin_g = new int[client->clientSize] ; 470 470 int* jbegin_g = new int[client->clientSize] ; … … 480 480 v=nj ; 481 481 MPI_Allgather(&v,1,MPI_INT,nj_g,1,MPI_INT,client->intraComm) ; 482 482 483 483 MPI_Allgatherv(lon.dataFirst(),ni,MPI_DOUBLE,lon_g.dataFirst(),ni_g, ibegin_g,MPI_DOUBLE,client->intraComm) ; 484 484 MPI_Allgatherv(lat.dataFirst(),nj,MPI_DOUBLE,lat_g.dataFirst(),nj_g, jbegin_g,MPI_DOUBLE,client->intraComm) ; 485 485 486 486 delete[] ibegin_g ; 487 487 delete[] jbegin_g ; … … 494 494 { 495 495 int i,j,k; 496 496 497 497 const int nvertexValue = 4; 498 498 boundsLon.resize(nvertexValue,ni*nj); … … 510 510 bounds_lon_end= (lon(0) +360 + lon(ni_glo-1))/2 ; 511 511 } 512 512 513 513 for(j=0;j<nj;++j) 514 514 for(i=0;i<ni;++i) … … 520 520 : (lon(ibegin + i + 1)+lon(ibegin + i))/2; 521 521 } 522 522 523 523 524 524 boundsLat.resize(nvertexValue,nj*ni); … … 546 546 } 547 547 } 548 548 549 549 double latStepEnd = lat(nj_glo-1)-lat(nj_glo-2); 550 550 if (isSouthPole) bounds_lat_end=lat(nj_glo-1); … … 563 563 if ( -90 + bounds_lat_end <= 0.1*std::abs(latStepEnd)) bounds_lat_end=-90 ; 564 564 } 565 } 566 565 } 566 567 567 for(j=0;j<nj;++j) 568 568 for(i=0;i<ni;++i) … … 1222 1222 void CDomain::sendServerAttribut(void) 1223 1223 { 1224 CServerDistributionDescription serverDescription(nGlobDomain_);1225 1226 1224 CContext* context = CContext::getCurrent(); 1227 1225 CContextClient* client = context->client; 1228 1226 int nbServer = client->serverSize; 1229 1227 1230 if (isUnstructed_) serverDescription.computeServerDistribution(nbServer,0); 1231 else serverDescription.computeServerDistribution(nbServer,1); 1228 CServerDistributionDescription serverDescription(nGlobDomain_, nbServer); 1229 if (isUnstructed_) serverDescription.computeServerDistribution(false, 0); 1230 else serverDescription.computeServerDistribution(false, 1); 1232 1231 1233 1232 std::vector<std::vector<int> > serverIndexBegin = serverDescription.getServerIndexBegin(); … … 1372 1371 indexEnd = indexBegin + range - 1; 1373 1372 1374 CServerDistributionDescription serverDescription(nGlobDomain_ );1375 if (isUnstructed_) serverDescription.computeServerGlobalIndexInRange( nbServer,std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0);1376 else serverDescription.computeServerGlobalIndexInRange( nbServer,std::make_pair<size_t,size_t>(indexBegin, indexEnd), 1);1373 CServerDistributionDescription serverDescription(nGlobDomain_, nbServer); 1374 if (isUnstructed_) serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0); 1375 else serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 1); 1377 1376 1378 1377 CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(),
Note: See TracChangeset
for help on using the changeset viewer.