Changeset 2291 for XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_scalar.cpp
- Timestamp:
- 02/01/22 15:28:48 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_scalar.cpp
r2270 r2291 10 10 #include "grid_transformation_factory_impl.hpp" 11 11 #include "reduction.hpp" 12 #include "grid_algorithm_reduce.hpp" 13 12 14 13 15 … … 47 49 TRY 48 50 { 49 eliminateRedondantSrc_= false;51 scalarDestination->checkAttributes() ; 50 52 if (algo->operation.isEmpty()) 51 53 ERROR("CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)", … … 75 77 76 78 } 77 transformationMapping_[0].push_back(0) ; 79 80 auto& transMap = this->transformationMapping_; 81 82 CArray<size_t,1> dstGlobalIndex ; 83 scalarDestination->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(dstGlobalIndex) ; 84 size_t nbIdx = dstGlobalIndex.numElements(); 78 85 79 scalarDestination->checkAttributes() ; 86 for (size_t idx = 0; idx < nbIdx; ++idx) 87 { 88 size_t globalIdx = dstGlobalIndex(idx); 89 transMap[globalIdx].resize(1); 90 transMap[globalIdx][0]=globalIdx ; 91 } 92 80 93 this->computeAlgorithm(scalarSource->getLocalView(CElementView::WORKFLOW), scalarDestination->getLocalView(CElementView::WORKFLOW)) ; 81 94 } 82 95 CATCH 96 97 shared_ptr<CGridAlgorithm> CScalarAlgorithmReduceScalar::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos) 98 { 99 auto algo=make_shared<CGridAlgorithmReduce>(gridSrc, gridDst, pos, shared_from_this(), operator_) ; 100 algo->computeAlgorithm(false) ; 101 return algo ; 102 } 83 103 84 104 CScalarAlgorithmReduceScalar::~CScalarAlgorithmReduceScalar()
Note: See TracChangeset
for help on using the changeset viewer.