Ignore:
Timestamp:
03/23/16 16:11:13 (8 years ago)
Author:
mhnguyen
Message:

Weight computation of dynamic transformation is done only one for each time stamp

+) Each weight computation of dynamic transformation attached to timestamp
+) Remove some redundant codes

Test
+) On Curie
+) All tests pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/grid_transformation.cpp

    r831 r832  
    2525: gridSource_(source), gridDestination_(destination), originalGridSource_(source), 
    2626  algoTypes_(), nbAlgos_(0), currentGridIndexToOriginalGridIndex_(), tempGrids_(), 
    27   auxInputs_(), dynamicalTransformation_(false) 
     27  auxInputs_(), dynamicalTransformation_(false), timeStamp_() 
    2828 
    2929{ 
     
    356356  -) Make current grid destination become grid source in the next transformation 
    357357*/ 
    358 void CGridTransformation::computeAll(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     358void CGridTransformation::computeAll(const std::vector<CArray<double,1>* >& dataAuxInputs, Time timeStamp) 
    359359{ 
    360360  if (nbAlgos_ < 1) return; 
    361361  if (!auxInputs_.empty() && !dynamicalTransformation_) { dynamicalTransformation_ = true; return; } 
    362   if (dynamicalTransformation_) DestinationIndexMap().swap(currentGridIndexToOriginalGridIndex_);  // Reset map 
     362  if (dynamicalTransformation_) 
     363  { 
     364    if (timeStamp_.insert(timeStamp).second) 
     365      DestinationIndexMap().swap(currentGridIndexToOriginalGridIndex_);  // Reset map 
     366    else 
     367      return; 
     368  } 
    363369 
    364370  CContext* context = CContext::getCurrent(); 
Note: See TracChangeset for help on using the changeset viewer.