Ignore:
Timestamp:
07/10/17 18:17:04 (7 years ago)
Author:
yushan
Message:

branch merged with trunk @1200

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.cpp

    r1155 r1205  
    111111  const int constNVertex = 4; // Value by default number of vertex for rectangular domain 
    112112  int nVertexSrc, nVertexDest; 
    113   nVertexSrc = constNVertex; 
    114   nVertexDest = constNVertex; 
     113  nVertexSrc = nVertexDest = constNVertex; 
    115114 
    116115  // First of all, try to retrieve the boundary values of domain source and domain destination 
     
    389388  } 
    390389 
    391   if (writeToFile_ && !readFromFile_) 
    392      writeRemapInfo(interpMapValue); 
    393   exchangeRemapInfo(interpMapValue); 
     390  if (writeToFile_ && !readFromFile_) writeRemapInfo(interpMapValue); 
     391//  exchangeRemapInfo(interpMapValue); 
     392  convertRemapInfo(interpMapValue) ; 
    394393 
    395394  delete [] globalSrc; 
     
    498497} 
    499498 
     499void CDomainAlgorithmInterpolate::convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 
     500{ 
     501  CContext* context = CContext::getCurrent(); 
     502  CContextClient* client=context->client; 
     503  int clientRank = client->clientRank; 
     504 
     505  this->transformationMapping_.resize(1); 
     506  this->transformationWeight_.resize(1); 
     507 
     508  TransformationIndexMap& transMap = this->transformationMapping_[0]; 
     509  TransformationWeightMap& transWeight = this->transformationWeight_[0]; 
     510 
     511  std::map<int,std::vector<std::pair<int,double> > >::const_iterator itb = interpMapValue.begin(), it, 
     512                                                                     ite = interpMapValue.end(); 
     513   
     514  for (it = itb; it != ite; ++it) 
     515  {     
     516    const std::vector<std::pair<int,double> >& tmp = it->second; 
     517    for (int i = 0; i < tmp.size(); ++i) 
     518    { 
     519      transMap[it->first].push_back(tmp[i].first); 
     520      transWeight[it->first].push_back(tmp[i].second); 
     521    }       
     522  }       
     523} 
    500524 
    501525/*! 
Note: See TracChangeset for help on using the changeset viewer.