Ignore:
Timestamp:
06/22/15 13:36:17 (9 years ago)
Author:
mhnguyen
Message:

Implementing generic transformation algorithm (local commit)

+) Implement 3 important classes:

-gridTransformation to read transformation info from grid and interface with the rest of XIOS
-transformationMapping to be in charge of sending/receiving transformation info among clients
-transformationAlgorithm to represent various algorithms

+) Make some change on field to use the new classes

Test
+) Only test_new_features with inversed axis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field_impl.hpp

    r619 r620  
    3333        if (!fieldFilterSources.empty()) 
    3434        { 
    35           itFilterSrc = fieldFilterSources.begin(); iteFilterSrc = fieldFilterSources.end(); 
    36           for (; itFilterSrc != iteFilterSrc; ++itFilterSrc) (*itFilterSrc)->updateDataWithoutOperation(_data); 
    37           (*it)->applyFilter(); 
    38           std::cout << "it data " << (*it)->data << std::endl; 
    39           std::cout << "it filtered data " << (*it)->filteredData << std::endl; 
     35          itFilterSrc  = fieldFilterSources.begin(); 
     36          iteFilterSrc = fieldFilterSources.end(); 
     37          for (; itFilterSrc != iteFilterSrc; ++itFilterSrc) 
     38          { 
     39            (*itFilterSrc)->updateDataWithoutOperation(_data, (*itFilterSrc)->data); 
     40            (*it)->updateDataWithoutOperation(_data, (*it)->filteredData); 
     41            (*it)->applyFilter((*itFilterSrc)->data, (*it)->filteredData); 
     42          } 
    4043          if ((*it)->hasOutputFile || (*it)->hasFieldOut) (*it)->updateFilteredData((*it)->filteredData); 
     44//          itFilterSrc = fieldFilterSources.begin(); iteFilterSrc = fieldFilterSources.end(); 
     45//          for (; itFilterSrc != iteFilterSrc; ++itFilterSrc) (*itFilterSrc)->updateDataWithoutOperation(_data); 
     46//          (*it)->applyFilter(); 
     47//          std::cout << "it data " << (*it)->data << std::endl; 
     48//          std::cout << "it filtered data " << (*it)->filteredData << std::endl; 
     49//          if ((*it)->hasOutputFile || (*it)->hasFieldOut) (*it)->updateFilteredData((*it)->filteredData); 
    4150        } 
    4251        else 
     
    7079 
    7180   template<int N> 
    72    void CField::updateDataWithoutOperation(const CArray<double, N>& _data) 
     81   void CField::updateDataWithoutOperation(const CArray<double, N>& _data, CArray<double,1>& updatedData) 
    7382   { 
    74      if (this->data.numElements() != this->grid->storeIndex_client.numElements()) 
     83     if (updatedData.numElements() != this->grid->storeIndex_client.numElements()) 
    7584     { 
    76         this->data.resize(this->grid->storeIndex_client.numElements()); 
    77         this->grid->inputField(_data, this->data); 
     85        updatedData.resize(this->grid->storeIndex_client.numElements()); 
     86        this->grid->inputField(_data, updatedData); 
    7887     } 
    7988   } 
Note: See TracChangeset for help on using the changeset viewer.