- Timestamp:
- 07/05/16 15:59:16 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/grid_transformation_selector.cpp
r887 r889 13 13 namespace xios { 14 14 15 CGridTransformationSelector::CGridTransformationSelector(CGrid* destination, CGrid* source )15 CGridTransformationSelector::CGridTransformationSelector(CGrid* destination, CGrid* source, TransformationType type) 16 16 : gridSource_(source), gridDestination_(destination), 17 17 listAlgos_(), algoTypes_(), nbNormalAlgos_(0), nbSpecialAlgos_(0), auxInputs_() … … 26 26 << "Number of elements of grid source " <<gridSource_->getId() << " is " << gridSource_->axis_domain_order.numElements() << std::endl 27 27 << "Number of elements of grid destination " <<gridDestination_->getId() << " is " << numElement); 28 initializeTransformations( );28 initializeTransformations(type); 29 29 } 30 30 … … 35 35 for each transformation, we need to make sure that the current "temporary source" maps its global index correctly to the original one. 36 36 */ 37 void CGridTransformationSelector::initializeTransformations( )37 void CGridTransformationSelector::initializeTransformations(TransformationType type) 38 38 { 39 39 // Initialize algorithms 40 40 initializeAlgorithms(); 41 ListAlgoType:: const_iterator itb = listAlgos_.begin(),42 41 ListAlgoType::iterator itb = listAlgos_.begin(), 42 ite = listAlgos_.end(), it; 43 43 44 44 for (it = itb; it != ite; ++it) 45 45 { 46 46 ETranformationType transType = (it->second).first; 47 if (!isSpecialTransformation(transType)) ++nbNormalAlgos_; 48 else ++nbSpecialAlgos_; 47 if (!isSpecialTransformation(transType)) 48 { 49 ++nbNormalAlgos_; 50 if (special == type) 51 { 52 it = listAlgos_.erase(it); 53 --it; 54 } 55 } 56 else 57 { 58 ++nbSpecialAlgos_; 59 if (normal == type) 60 { 61 it = listAlgos_.erase(it); 62 --it; 63 } 64 } 65 49 66 } 50 67 }
Note: See TracChangeset
for help on using the changeset viewer.