Changeset 2001 for XIOS/dev/dev_ym
- Timestamp:
- 01/05/21 10:03:56 (4 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.cpp
r1999 r2001 15 15 void CAlgorithmTransformationReduce::apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut) 16 16 { 17 // CArray<double,1> dataOutTmp ;18 // transformConnector_->transfer(dimBefore, dimAfter, dataIn, dataOutTmp) ;19 17 reduceTransformConnector_ -> transfer(dimBefore, dimAfter, dataIn, dataOut) ; 20 18 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.hpp
r1999 r2001 26 26 EReduction operator_ ; 27 27 TransformationIndexMap transformationMapping_; 28 CTransformConnector* transformConnector_ ;29 28 CReduceTransformConnector* reduceTransformConnector_ ; 30 29 bool detectMissingValue_=true ; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.cpp
r1999 r2001 8 8 { 9 9 10 void CAlgorithmTransformationTransfer::computeAlgorithm(CLocalView* srcView, CLocalView* dstView) 11 { 12 set<size_t> srcIndex ; 13 for(auto& it : transformationMapping_) srcIndex.insert(it.second) ; 14 15 CArray<size_t,1> srcArrayIndex(srcIndex.size()) ; 16 int i=0 ; 17 for(size_t index : srcIndex) { srcArrayIndex(i) = index ; i++ ;} 18 CLocalElement recvElement(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ; 19 recvElement.addFullView() ; 20 21 transformConnector_ = new CTransformConnector(srcView, recvElement.getView(CElementView::FULL), CContext::getCurrent()->getIntraComm()) ; 22 transformConnector_->computeConnector() ; 23 transferTransformConnector_ = new CTransferTransformConnector( recvElement.getView(CElementView::FULL), dstView, transformationMapping_) ; 10 void CAlgorithmTransformationTransfer::computeAlgorithm(CLocalView* srcView, CLocalView* dstView) 11 { 12 this->computeRecvElement(srcView, dstView) ; 13 transferTransformConnector_ = new CTransferTransformConnector( recvElement.getView(CElementView::FULL), dstView, transformationMapping_) ; 24 14 } 25 15 … … 27 17 void CAlgorithmTransformationTransfer::apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut) 28 18 { 29 CArray<double,1> dataOutTmp ; 30 transformConnector_->transfer(dimBefore, dimAfter, dataIn, dataOutTmp) ; 31 transferTransformConnector_ -> transfer(dimBefore, dimAfter, dataOutTmp, dataOut) ; 19 transferTransformConnector_ -> transfer(dimBefore, dimAfter, dataOutIn, dataOut) ; 32 20 } 33 21 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.hpp
r1999 r2001 23 23 //! Map between global index of destination element and source element 24 24 unordered_map<int,int> transformationMapping_; 25 26 CTransformConnector* transformConnector_ ;27 25 CTransferTransformConnector* transferTransformConnector_ ; 28 26 }; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.cpp
r1999 r2001 7 7 8 8 void CAlgorithmTransformationWeight::computeAlgorithm(CLocalView* srcView, CLocalView* dstView) 9 {9 { 10 10 this->computeRecvElement(srcView, dstView) ; 11 11 weightTransformConnector_ = new CWeightTransformConnector( recvElement_->getView(CElementView::FULL), dstView, transformationMapping_, transformationWeight_) ; … … 15 15 void CAlgorithmTransformationWeight::apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut) 16 16 { 17 CArray<double,1> dataOutTmp ; 18 transformConnector_->transfer(dimBefore, dimAfter, dataIn, dataOutTmp) ; 19 weightTransformConnector_ -> transfer(dimBefore, dimAfter, dataOutTmp, dataOut) ; 17 weightTransformConnector_ -> transfer(dimBefore, dimAfter, dataIn, dataOut) ; 20 18 } 21 19 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.hpp
r1999 r2001 26 26 //! Weight corresponding of source to destination 27 27 TransformationWeightMap transformationWeight_; 28 CTransformConnector* transformConnector_ ;29 28 CWeightTransformConnector* weightTransformConnector_ ; 30 29 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm.cpp
r1999 r2001 3 3 #include "grid_local_view.hpp" 4 4 #include "grid.hpp" 5 #include "algo_types.hpp" 5 6 #include "context.hpp" 6 7 … … 11 12 : gridSrc_(gridSrc), gridDst_(gridDst), pos_(pos), algorithm_(algo) 12 13 { 14 //! Scalar 15 CScalarAlgorithmReduceAxis::registerTrans(); 16 CScalarAlgorithmExtractAxis::registerTrans(); 17 CScalarAlgorithmReduceDomain::registerTrans(); 18 CScalarAlgorithmReduceScalar::registerTrans(); 19 20 //! Axis 21 CAxisAlgorithmZoom::registerTrans(); 22 CAxisAlgorithmExtractDomain::registerTrans(); 23 CAxisAlgorithmInterpolate::registerTrans(); 24 CAxisAlgorithmExtract::registerTrans(); 25 CAxisAlgorithmInverse::registerTrans(); 26 CAxisAlgorithmReduceDomain::registerTrans(); 27 CAxisAlgorithmReduceAxis::registerTrans(); 28 CAxisAlgorithmTemporalSplitting::registerTrans(); 29 CAxisAlgorithmDuplicateScalar::registerTrans(); 30 31 //! Domain 32 CDomainAlgorithmComputeConnectivity::registerTrans(); 33 CDomainAlgorithmInterpolate::registerTrans(); 34 CDomainAlgorithmZoom::registerTrans(); 35 CDomainAlgorithmExpand::registerTrans(); 36 CDomainAlgorithmReorder::registerTrans(); 37 CDomainAlgorithmExtract::registerTrans(); 38 13 39 this->computeAlgorithm() ; 14 40 }
Note: See TracChangeset
for help on using the changeset viewer.