Changeset 630 for XIOS/trunk/src/node/field.cpp
- Timestamp:
- 07/07/15 10:46:25 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/field.cpp
r624 r630 814 814 { 815 815 itFilterSrc = filterSources_.begin(); iteFilterSrc = filterSources_.end(); 816 dataToReceive = 0.0; // Reset all data destination 816 817 for (; itFilterSrc != iteFilterSrc; ++itFilterSrc) 817 818 { … … 819 820 { 820 821 const std::map<int, CArray<int,1>* >& localIndexToSend = (*itFilterSrc)->grid->getTransformations()->getLocalIndexToSendFromGridSource(); 821 const std::map<int, std::vector<CArray<int,1>*> >& localIndexToReceive = (*itFilterSrc)->grid->getTransformations()->getLocalIndexToReceiveOnGridDest();822 const std::map<int,std::vector<std::vector<std::pair<int,double> > > >& localIndexToReceive = (*itFilterSrc)->grid->getTransformations()->getLocalIndexToReceiveOnGridDest(); 822 823 823 824 sendAndReceiveTransformedData(localIndexToSend, dataToSend, … … 831 832 void CField::sendAndReceiveTransformedData(const std::map<int, CArray<int,1>* >& localIndexToSend, 832 833 const CArray<double, 1>& dataSrc, 833 const std::map<int, std::vector<CArray<int,1>*> >& localIndexToReceive,834 const std::map<int,std::vector<std::vector<std::pair<int,double> > > >& localIndexToReceive, 834 835 CArray<double,1>& dataDest) 835 836 { … … 858 859 859 860 // Receiving data on destination fields 860 std::map<int, std::vector<CArray<int,1>*> >::const_iterator itbRecv = localIndexToReceive.begin(), itRecv,861 std::map<int,std::vector<std::vector<std::pair<int,double> > > >::const_iterator itbRecv = localIndexToReceive.begin(), itRecv, 861 862 iteRecv = localIndexToReceive.end(); 862 863 int recvBuffSize = 0; … … 873 874 for (int idx = 0; idx < countSize; ++idx) 874 875 { 875 CArray<int,1>*localIndex_p = (itRecv->second)[idx];876 int numIndex = localIndex_p ->numElements();876 const std::vector<std::pair<int,double> >& localIndex_p = (itRecv->second)[idx]; 877 int numIndex = localIndex_p.size(); 877 878 for (int i = 0; i < numIndex; ++i) 878 879 { 879 dataDest((*localIndex_p)(i)) = recvBuff[idx]; 880 // if ((localIndex_p)[i].first >= dataDest.numElements() ) 881 dataDest((localIndex_p)[i].first) += recvBuff[idx] * ((localIndex_p)[i].second); 880 882 } 881 883 }
Note: See TracChangeset
for help on using the changeset viewer.