Changeset 2291


Ignore:
Timestamp:
02/01/22 15:28:48 (2 years ago)
Author:
ymipsl
Message:

Improve reduction transformation

  • make the difference between reduction over geometry or reduction between process.
  • geometrical reduction :

domain -> axis
axis -> scalar
domain -> scalar

  • reduction across processes for redondant geometrical cell :

axis -> axis
scalar -> scalar

Reduction can be local (only for the geometrical cell owned by current process) or global, using the "local" attribute (bool) over the reduction.

YM

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src
Files:
2 added
24 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/config/reduce_axis_to_scalar_attribute.conf

    r980 r2291  
    11DECLARE_ENUM4(operation, min, max, sum, average) 
     2DECLARE_ATTRIBUTE(bool, local) 
    23 
    34 
     5 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/gatherer_connector.hpp

    r2267 r2291  
    99#include "distributed_view.hpp" 
    1010#include "context_client.hpp" 
     11#include "reduction_types.hpp" 
    1112 
    1213 
     
    2930       
    3031      template<typename T> 
    31       void transfer(int repeat, int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut) 
     32      void transfer(int repeat, int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, EReduction op = EReduction::none) 
    3233      { 
    3334        // for future, make a specific transfer function for sizeT=1 to avoid multiplication (increasing performance) 
     35        
    3436        size_t dstSlice = dstSize_*sizeT ; 
    3537        dataOut.resize(repeat* dstSlice) ;   
    3638         
    37         for(auto& data : dataIn) 
    38         { 
     39         
     40        if (op == EReduction::none) // tranfer without reduction 
     41        { 
     42          for(auto& data : dataIn) 
     43          { 
     44            T* output = dataOut.dataFirst() ; 
     45            int rank=data.first ; 
     46            auto input  = data.second.dataFirst() ; 
     47            auto& connector=connector_[rank] ; 
     48            auto& mask=mask_[rank] ; 
     49            int size=mask.size() ; 
     50            size_t srcSlice = size * sizeT ; 
     51            for(int l=0; l<repeat; l++) 
     52            {    
     53              for(int i=0, j=0 ;i<size;i++) 
     54              { 
     55                if (mask[i])  
     56                { 
     57                  int cj = connector[j]*sizeT ; 
     58                  int ci = i*sizeT ; 
     59                  for (int k=0;k<sizeT;k++) output[cj+k] = input[ci+k] ; 
     60                  j++ ; 
     61                } 
     62              } 
     63              input+=srcSlice ; 
     64              output+=dstSlice ; 
     65           } 
     66          } 
     67        } 
     68        else // with reduction, to be optimized, see how to vectorize 
     69        { 
     70          vector<int> vcount(dataOut.size(),0) ; 
     71          int* count = vcount.data() ; 
     72          T defaultValue = std::numeric_limits<T>::quiet_NaN(); 
     73          for(auto& data : dataIn) 
     74          { 
     75            T* output = dataOut.dataFirst() ; 
     76            int rank=data.first ; 
     77            auto input  = data.second.dataFirst() ; 
     78            auto& connector=connector_[rank] ; 
     79            auto& mask=mask_[rank] ; 
     80            int size=mask.size() ; 
     81            size_t srcSlice = size * sizeT ; 
     82            for(int l=0; l<repeat; l++) 
     83            {    
     84              for(int i=0, j=0 ;i<size;i++) 
     85              { 
     86                if (mask[i])  
     87                { 
     88                  int cj = connector[j]*sizeT ; 
     89                  int ci = i*sizeT ; 
     90                  for (int k=0;k<sizeT;k++) 
     91                  {  
     92                    if (!std::isnan(input[ci+k])) // manage missing value 
     93                    { 
     94                      if (count[cj+k]==0)  output[cj+k] = input[ci+k] ; 
     95                      else 
     96                      { 
     97                        switch(op) 
     98                        { 
     99                          case EReduction::sum : 
     100                            output[cj+k] += input[ci+k] ; 
     101                            break ; 
     102                          case EReduction::min : 
     103                            output[cj+k]= std::min(output[cj+k],input[ci+k]) ; 
     104                            break ; 
     105                          case EReduction::max : 
     106                            output[cj+k]= std::max(output[cj+k],input[ci+k]) ; 
     107                            break ; 
     108                          case EReduction::average : 
     109                            output[cj+k] += input[ci+k] ; 
     110                            break ; 
     111                          default : 
     112                            ERROR("CGathererConnector::transfer", 
     113                               <<"reduction operator "<<(int)op<<" is not defined for this operation") ; 
     114                          break ; 
     115                        } 
     116                      } 
     117                      count[cj+k]++ ;  
     118                    } 
     119                  } 
     120                  j++ ; 
     121                } 
     122              } 
     123              input+=srcSlice ; 
     124              output+=dstSlice ; 
     125              count+=dstSlice ; 
     126            } 
     127          } 
     128 
    39129          T* output = dataOut.dataFirst() ; 
    40           int rank=data.first ; 
    41           auto input  = data.second.dataFirst() ; 
    42           auto& connector=connector_[rank] ; 
    43           auto& mask=mask_[rank] ; 
    44           int size=mask.size() ; 
    45           size_t srcSlice = size * sizeT ; 
    46           for(int l=0; l<repeat; l++) 
    47           {    
    48             for(int i=0, j=0 ;i<size;i++) 
    49             { 
    50               if (mask[i])  
    51               { 
    52                 int cj = connector[j]*sizeT ; 
    53                 int ci = i*sizeT ; 
    54                 for (int k=0;k<sizeT;k++) output[cj+k] = input[ci+k] ; 
    55                 j++ ; 
    56               } 
    57             } 
    58             input+=srcSlice ; 
    59             output+=dstSlice ; 
    60           } 
    61         } 
    62       } 
    63  
    64       template<typename T> 
    65       void transfer(int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut) 
    66       { 
    67         transfer(1, sizeT, dataIn, dataOut) ; 
     130          if (op==EReduction::average) 
     131            for(int i=0;  i < dataOut.size() ; i++)  
     132            { 
     133              if (count[i]>0) dataOut[i]/=count[i] ; 
     134              else dataOut[i] = defaultValue ; 
     135            } 
     136          else for(int i=0;  i < dataOut.size() ; i++) if (count[i]==0) dataOut[i] = defaultValue ; 
     137        } 
     138      } 
     139 
     140      template<typename T> 
     141      void transfer(int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, EReduction op = EReduction::none) 
     142      { 
     143        transfer(1, sizeT, dataIn, dataOut, op) ; 
    68144      } 
    69145     
    70146      template<typename T> 
    71       void transfer(map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut) 
    72       { 
    73         transfer(1,dataIn,dataOut) ; 
    74       } 
    75  
    76       template<typename T> 
    77       void transfer(int rank,  shared_ptr<CGathererConnector>* connectors, int nConnectors, const T* input, T* output) 
     147      void transfer(map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, EReduction op = EReduction::none) 
     148      { 
     149        transfer(1,dataIn,dataOut, op) ; 
     150      } 
     151 
     152      template<typename T> 
     153      void transfer(int rank,  shared_ptr<CGathererConnector>* connectors, int nConnectors, const T* input, T* output, EReduction op = EReduction::none, int* count=nullptr) 
    78154      { 
    79155        auto& connector = connector_[rank] ; // probably costly, find a better way to avoid the map 
     
    83159        if (nConnectors==0) 
    84160        { 
    85           for(int i=0, j=0; i<srcSize; i++) 
    86             if (mask[i])  
    87             { 
    88               *(output+connector[j]) = *(input + i) ; 
    89               j++ ; 
    90             } 
     161          if (op == EReduction::none) 
     162          { 
     163            for(int i=0, j=0; i<srcSize; i++) 
     164              if (mask[i])  
     165              { 
     166                *(output+connector[j]) = *(input + i) ; 
     167                j++ ; 
     168              } 
     169          } 
     170          else 
     171          { 
     172            switch(op) 
     173            { 
     174              case EReduction::sum : 
     175                for(int i=0, j=0; i<srcSize; i++) 
     176                  if (mask[i])  
     177                  { 
     178                    if (!std::isnan(*(input + i))) 
     179                    { 
     180                      if (*(count+connector[j])==0) *(output+connector[j]) = *(input + i) ; 
     181                      else *(output+connector[j]) += *(input + i) ; 
     182                      (*(count+connector[j]))++ ; 
     183                    }  
     184                    j++ ; 
     185                  } 
     186                break ; 
     187              case EReduction::min : 
     188                for(int i=0, j=0; i<srcSize; i++) 
     189                  if (mask[i])  
     190                  { 
     191                    if (!std::isnan(*(input + i))) 
     192                    { 
     193                      if (*(count+connector[j])==0) *(output+connector[j]) = *(input + i) ; 
     194                      else *(output+connector[j]) = std::min(*(output+connector[j]),*(input + i)) ; 
     195                      (*(count+connector[j]))++ ; 
     196                    }  
     197                    j++ ; 
     198                  } 
     199                break ; 
     200              case EReduction::max : 
     201                for(int i=0, j=0; i<srcSize; i++) 
     202                  if (mask[i])  
     203                  { 
     204                    if (!std::isnan(*(input + i))) 
     205                    { 
     206                      if (*(count+connector[j])==0) *(output+connector[j]) = *(input + i) ; 
     207                      else *(output+connector[j]) = std::max(*(output+connector[j]),*(input + i)) ; 
     208                      (*(count+connector[j]))++ ; 
     209                    }  
     210                    j++ ; 
     211                  } 
     212                break ; 
     213              case EReduction::average : 
     214                for(int i=0, j=0; i<srcSize; i++) 
     215                  if (mask[i])  
     216                  { 
     217                    if (!std::isnan(*(input + i))) 
     218                    { 
     219                      if (*(count+connector[j])==0) *(output+connector[j]) = *(input + i) ; 
     220                      else *(output+connector[j]) += *(input + i) ; 
     221                      (*(count+connector[j]))++ ; 
     222                    }  
     223                    j++ ; 
     224                  } 
     225                break ; 
     226              default : 
     227                ERROR("CGathererConnector::transfer", 
     228                     <<"reduction operator "<<(int)op<<" is not defined for this operation") ; 
     229                break ; 
     230            } 
     231          } 
    91232 
    92233        } 
     
    101242            if (mask[i])  
    102243            { 
    103               (*(connectors-1))->transfer(rank, connectors-1, nConnectors-1, in, output+connector[j]*dstSliceSize) ; // the multiplication must be avoid in further optimization 
     244              (*(connectors-1))->transfer(rank, connectors-1, nConnectors-1, in, output+connector[j]*dstSliceSize, op, count+connector[j]*dstSliceSize) ; // the multiplication must be avoid in further optimization 
    104245              j++ ; 
    105246            } 
     
    149290 
    150291      template<typename T> 
    151       void transfer(map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, T missingValue) 
    152       { 
    153         transfer(1, 1, dataIn, dataOut, missingValue); 
    154       } 
    155        
    156       template<typename T> 
    157       void transfer(int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, T missingValue) 
    158       { 
    159          transfer(1, sizeT, dataIn, dataOut, missingValue) ; 
    160       } 
    161  
    162       template<typename T> 
    163       void transfer(int repeat , int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, T missingValue) 
     292      void transfer(map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, T missingValue, EReduction op = EReduction::none) 
     293      { 
     294        transfer(1, 1, dataIn, dataOut, missingValue, op); 
     295      } 
     296       
     297      template<typename T> 
     298      void transfer(int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, T missingValue, EReduction op = EReduction::none) 
     299      { 
     300         transfer(1, sizeT, dataIn, dataOut, missingValue, op) ; 
     301      } 
     302 
     303      template<typename T> 
     304      void transfer(int repeat , int sizeT, map<int, CArray<T,1>>& dataIn, CArray<T,1>& dataOut, T missingValue, EReduction op = EReduction::none) 
    164305      { 
    165306        dataOut.resize(repeat*dstSize_*sizeT) ; 
    166307        dataOut=missingValue ; 
    167         transfer(repeat, sizeT, dataIn, dataOut) ; 
    168       } 
    169  
    170       template<typename T> 
    171       void transfer(CEventServer& event, int sizeT, CArray<T,1>& dataOut) 
     308        transfer(repeat, sizeT, dataIn, dataOut, op) ; 
     309      } 
     310 
     311      template<typename T> 
     312      void transfer(CEventServer& event, int sizeT, CArray<T,1>& dataOut, EReduction op = EReduction::none) 
    172313      { 
    173314        map<int, CArray<T,1>> dataIn ; 
     
    177318          (*subEvent.buffer) >> data ; 
    178319        } 
    179         transfer(1, sizeT, dataIn, dataOut) ; 
    180       } 
    181        
    182       template<typename T> 
    183       void transfer(CEventServer& event, CArray<T,1>& dataOut) 
    184       { 
    185         transfer(event, 1, dataOut) ; 
    186       } 
    187  
    188       template<typename T> 
    189       void transfer(CEventServer& event, int sizeT, CArray<T,1>& dataOut, T missingValue) 
     320        transfer(1, sizeT, dataIn, dataOut, op) ; 
     321      } 
     322       
     323      template<typename T> 
     324      void transfer(CEventServer& event, CArray<T,1>& dataOut, EReduction op = EReduction::none) 
     325      { 
     326        transfer(event, 1, dataOut, op) ; 
     327      } 
     328 
     329      template<typename T> 
     330      void transfer(CEventServer& event, int sizeT, CArray<T,1>& dataOut, T missingValue, EReduction op = EReduction::none) 
    190331      { 
    191332        map<int, CArray<T,1>> dataIn ; 
     
    195336          (*subEvent.buffer) >> data ; 
    196337        } 
    197         transfer(1, sizeT, dataIn, dataOut, missingValue) ; 
    198       } 
    199  
    200       template<typename T> 
    201       void transfer(CEventServer& event, CArray<T,1>& dataOut, T missingValue) 
     338        transfer(1, sizeT, dataIn, dataOut, missingValue, op) ; 
     339      } 
     340 
     341      template<typename T> 
     342      void transfer(CEventServer& event, CArray<T,1>& dataOut, T missingValue, EReduction op = EReduction::none) 
    202343      { 
    203344        map<int, CArray<T,1>> dataIn ; 
     
    207348          (*subEvent.buffer) >> data ; 
    208349        } 
    209         transfer(1, 1, dataIn, dataOut, missingValue) ; 
     350        transfer(1, 1, dataIn, dataOut, missingValue, op) ; 
    210351      } 
    211352 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_gatherer_connector.hpp

    r2267 r2291  
    1010#include "context_client.hpp" 
    1111#include "gatherer_connector.hpp" 
     12#include "reduction_types.hpp" 
    1213 
    1314 
     
    3031 
    3132      template<typename T>  
    32       void transfer(const map<int, CArray<T,1>>& input, CArray<T,1>& output) 
     33      void transfer(const map<int, CArray<T,1>>& input, CArray<T,1>& output, EReduction op = EReduction::none) 
    3334      { 
    3435        int n = elementsConnector_.size()-1 ; 
    35        shared_ptr<CGathererConnector>* connector = elementsConnector_.data() + n ; 
     36        shared_ptr<CGathererConnector>* connector = elementsConnector_.data() + n ; 
    3637        output.resize(dstSize_) ; 
    37         for(auto& rankDataIn : input)  
     38        
     39        if (op == EReduction::none) 
     40          for(auto& rankDataIn : input)  
     41            elementsConnector_[n]->transfer(rankDataIn.first, connector, n, rankDataIn.second.dataFirst(), output.dataFirst()) ; 
     42        else 
    3843        { 
    39           elementsConnector_[n]->transfer(rankDataIn.first, connector, n, rankDataIn.second.dataFirst(), output.dataFirst()) ; 
     44          T defaultValue = std::numeric_limits<T>::quiet_NaN(); 
     45          vector<int> count(dstSize_,0) ; 
     46          for(auto& rankDataIn : input)  
     47            elementsConnector_[n]->transfer(rankDataIn.first, connector, n, rankDataIn.second.dataFirst(), output.dataFirst(), op, count.data()) ; 
     48 
     49          for(int i=0;i<dstSize_;i++) if (count[i]==0) output(i)=defaultValue ; 
    4050        } 
    4151      }  
     
    5565 
    5666      template<typename T> 
    57       void transfer(CEventServer& event, CArray<T,1>& dataOut) 
     67      void transfer(CEventServer& event, CArray<T,1>& dataOut, EReduction op = EReduction::none) 
    5868      { 
    5969        map<int, CArray<T,1>> dataIn ; 
     
    6373          (*subEvent.buffer) >> data ; 
    6474        } 
    65         transfer(dataIn, dataOut) ; 
     75        transfer(dataIn, dataOut, op) ; 
    6676      } 
    6777       
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.cpp

    r2267 r2291  
    114114  *         some redondant ranks can be removed from the elements_ map. 
    115115  */ 
    116   void CGridRemoteConnector::computeConnector(void) 
    117   { 
    118     computeViewDistribution() ; 
    119     computeConnectorMethods() ; 
    120     computeRedondantRanks() ;  
    121     for(auto& rank : rankToRemove_) 
    122       for(auto& element : elements_) element.erase(rank) ; 
    123   } 
     116  void CGridRemoteConnector::computeConnector(bool eliminateRedundant) 
     117  { 
     118    if (eliminateRedundant) 
     119    { 
     120      computeViewDistribution() ; 
     121      computeConnectorMethods() ; 
     122      computeRedondantRanks() ;  
     123      for(auto& rank : rankToRemove_) 
     124        for(auto& element : elements_) element.erase(rank) ; 
     125    } 
     126    else 
     127    { 
     128       computeViewDistribution() ; 
     129       computeConnectorRedundant() ; 
     130    } 
     131  } 
     132 
     133/** 
     134  * \brief Compute the connector, i.e. compute the \b elements_ attribute.  
     135  * \detail In this routine we don't eliminate redundant cells as it it performed in  
     136  *         computeConnectorMethods. It can be usefull to perform reduce operation over processes. 
     137            In future, some optimisation could be done considering full redondance of the  
     138            source view or the destination view. 
     139  */ 
     140  void CGridRemoteConnector::computeConnectorRedundant(void) 
     141  { 
     142    vector<shared_ptr<CLocalView>> srcView ; 
     143    vector<shared_ptr<CDistributedView>> dstView ; 
     144    vector<int> indElements ; 
     145    elements_.resize(srcView_.size()) ; 
     146     
     147    bool srcViewsNonDistributed=true ; // not usefull now but later for optimization 
     148    for(int i=0;i<srcView_.size();i++) srcViewsNonDistributed = srcViewsNonDistributed && !isSrcViewDistributed_[i]  ; 
     149     
     150    bool dstViewsNonDistributed=true ;  // not usefull now but later for optimization 
     151    for(int i=0;i<dstView_.size();i++) dstViewsNonDistributed = dstViewsNonDistributed && !isDstViewDistributed_[i] ; 
     152     
     153    for(int i=0;i<srcView_.size();i++)  
     154    { 
     155      srcView.push_back(srcView_[i]) ; 
     156      dstView.push_back(dstView_[i]) ; 
     157      indElements.push_back(i) ; 
     158    } 
     159 
     160    computeGenericMethod(srcView, dstView, indElements) ; 
     161     
     162    map<int,bool> ranks ;   
     163    for(auto& it : elements_[indElements[0]])  
     164    { 
     165      if (it.second.numElements()==0) ranks[it.first] = false ; 
     166      else  ranks[it.first] = true ; 
     167    } 
     168    
     169  } 
     170 
     171 
    124172/** 
    125173  * \brief Compute the connector, i.e. compute the \b elements_ attribute.  
     
    426474  } 
    427475 
    428    
     476 
    429477 /** 
    430478  * \brief Generic method the compute the grid remote connector. Only distributed elements are specifed in the source view and remote view.  
     
    650698    } 
    651699  } 
    652  
     700   
    653701} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.hpp

    r2267 r2291  
    2121      CGridRemoteConnector(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CLocalView>>& dstView, MPI_Comm localComm, int remoteSize) ; 
    2222      void computeViewDistribution(void) ; 
    23       void computeConnector(void) ; 
     23      void computeConnector(bool eliminateRedundant=true) ; 
    2424      void computeConnectorMethods(void) ; 
     25      void computeConnectorRedundant(void) ; 
    2526      void computeGenericMethod(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CDistributedView>>& dstView, vector<int>& indElements) ; 
    2627      void computeSrcDstNonDistributed(int i, map<int,bool>& ranks) ; 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.cpp

    r2267 r2291  
    44#include "gatherer_connector.hpp" 
    55#include "grid_remote_connector.hpp" 
     6#include "grid_redondant_remote_connector.hpp" 
    67 
    78 
    89namespace xios 
    910{ 
    10   void CGridTransformConnector::computeConnector(void) 
     11  void CGridTransformConnector::computeConnector(bool eliminateRedundant) 
    1112  { 
    1213    int commSize ; 
     
    1718 
    1819    auto remoteConnector = make_shared<CGridRemoteConnector>(srcViews_, remoteViews_, localComm_, commSize) ;   
    19     remoteConnector->computeConnector() ; 
     20    remoteConnector->computeConnector(eliminateRedundant) ;  
    2021     
    2122    vector<shared_ptr<CDistributedElement>> sendElements(nElements) ; 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.hpp

    r2267 r2291  
    88#include "grid_scatterer_connector.hpp" 
    99#include "grid_gatherer_connector.hpp" 
     10#include "reduction_types.hpp" 
    1011#include "mpi.hpp" 
    1112 
     
    2021      CGridTransformConnector(vector<shared_ptr<CLocalView>> srcViews, vector<shared_ptr<CLocalView>> remoteViews, MPI_Comm localComm)  
    2122                          : srcViews_(srcViews), remoteViews_(remoteViews), localComm_(localComm)  
    22                           { computeConnector();} 
     23                          { } 
    2324     
    24       void computeConnector(void) ;  
     25      void computeConnector(bool eliminateRedundant=true) ;  
    2526    protected: 
    2627     MPI_Comm localComm_ ; 
     
    3637    public: 
    3738      template<typename T>  
    38       void transfer(const CArray<T,1>& dataIn, CArray<T,1>& dataOut) 
     39      void transfer(const CArray<T,1>& dataIn, CArray<T,1>& dataOut, EReduction op = EReduction::none) 
    3940      { 
    4041        map<int,CArray<T,1>> tmpArrayIn ; 
     
    6263         
    6364        const double nanValue = std::numeric_limits<double>::quiet_NaN(); 
    64         gridGathererConnector_->transfer(tmpArrayOut, dataOut, nanValue) ; 
     65 
     66        if (op == EReduction::none) gridGathererConnector_->transfer(tmpArrayOut, dataOut, nanValue) ; 
     67        else gridGathererConnector_->transfer(tmpArrayOut, dataOut, op) ; 
    6568      } 
    6669   
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.hpp

    r2267 r2291  
    6868      { 
    6969        vector<bool> touched(repeat* dstSlice, false) ; 
    70         int pos=0 ; 
    71         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    72         { 
    73           const double* in = input; 
    74           double* out = output ; 
    75           int k=0 ; 
     70        int posr=0 ; 
     71        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     72        { 
     73          const double* in = input; 
     74          double* out = output ; 
     75          int k=0 ; 
     76          int pos = posr ; 
    7677          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    7778          { 
     
    9798 
    9899        output = dataOut.dataFirst()  ; 
    99         pos=0 ; 
    100         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    101         { 
    102           const double* in = input; 
    103           double* out = output ; 
    104           int k=0 ; 
    105           int pos=0 ; 
     100        posr=0 ; 
     101        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     102        { 
     103          const double* in = input; 
     104          double* out = output ; 
     105          int k=0 ; 
     106          int pos=posr ; 
    106107          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    107108              for(int j=0 ; j<nSrc_[i] ; j++,k++) 
     
    144145      { 
    145146        vector<bool> touched(repeat* dstSlice, false) ; 
    146         int pos=0 ; 
    147         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    148         { 
    149           const double* in = input; 
    150           double* out = output ; 
    151           int k=0 ; 
     147        int posr=0 ; 
     148        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     149        { 
     150          const double* in = input; 
     151          double* out = output ; 
     152          int k=0 ; 
     153          int pos=posr ; 
    152154          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    153155          { 
     
    173175 
    174176        output = dataOut.dataFirst()  ; 
    175         pos=0 ; 
    176         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    177         { 
    178           const double* in = input; 
    179           double* out = output ; 
    180           int k=0 ; 
    181           int pos=0 ; 
     177        posr=0 ; 
     178        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     179        { 
     180          const double* in = input; 
     181          double* out = output ; 
     182          int k=0 ; 
     183          int pos=posr ; 
    182184          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    183185              for(int j=0 ; j<nSrc_[i] ; j++,k++) 
     
    220222      { 
    221223        vector<bool> touched(repeat* dstSlice, false) ; 
    222         int pos=0 ; 
    223         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    224         { 
    225           const double* in = input; 
    226           double* out = output ; 
    227           int k=0 ; 
     224        int posr=0 ; 
     225        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     226        { 
     227          const double* in = input; 
     228          double* out = output ; 
     229          int k=0 ; 
     230          int pos=posr ; 
    228231          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    229232          { 
     
    249252 
    250253        output = dataOut.dataFirst()  ; 
    251         pos=0 ; 
    252         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    253         { 
    254           const double* in = input; 
    255           double* out = output ; 
    256           int k=0 ; 
    257           int pos=0 ; 
     254        posr=0 ; 
     255        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     256        { 
     257          const double* in = input; 
     258          double* out = output ; 
     259          int k=0 ; 
     260          int pos=posr ; 
    258261          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    259262              for(int j=0 ; j<nSrc_[i] ; j++,k++) 
     
    296299      { 
    297300        vector<int> touched(repeat* dstSlice, 0) ; 
    298         int pos=0 ; 
    299         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    300         { 
    301           const double* in = input; 
    302           double* out = output ; 
    303           int k=0 ; 
     301        int posr=0 ; 
     302        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     303        { 
     304          const double* in = input; 
     305          double* out = output ; 
     306          int k=0 ; 
     307          int pos=posr ; 
    304308          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    305309          { 
     
    331335 
    332336        output = dataOut.dataFirst()  ; 
    333         pos=0 ; 
    334         for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, pos+=dstSlice) 
    335         { 
    336           const double* in = input; 
    337           double* out = output ; 
    338           int k=0 ; 
    339           int pos=0 ; 
     337        posr=0 ; 
     338        for(int r=0;r<repeat;r++, input+=srcSlice, output+=dstSlice, posr+=dstSlice) 
     339        { 
     340          const double* in = input; 
     341          double* out = output ; 
     342          int k=0 ; 
     343          int pos=posr ; 
    340344          for(int i=0; i<dstSize_; i++, out+=sizeT, pos+=sizeT) 
    341345              for(int j=0 ; j<nSrc_[i] ; j++,k++) 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp

    r2274 r2291  
    276276     This check should be done in the very beginning of work flow 
    277277   */ 
     278    
    278279   void CAxis::checkAttributes(void) 
    279    TRY 
    280    { 
    281      if (checkAttributes_done_) return ; 
    282  
    283      CContext* context=CContext::getCurrent(); 
    284  
    285      if (this->n_glo.isEmpty()) 
    286         ERROR("CAxis::checkAttributes(void)", 
    287               << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
    288               << "The axis is wrongly defined, attribute 'n_glo' must be specified"); 
    289       StdSize size = this->n_glo.getValue(); 
    290  
    291       if (!this->index.isEmpty()) 
    292       { 
    293         if (n.isEmpty()) n = index.numElements(); 
    294  
    295         // It's not so correct but if begin is not the first value of index  
    296         // then data on the local axis has user-defined distribution. In this case, begin has no meaning. 
    297         if (begin.isEmpty()) begin = index(0);          
    298       } 
    299       else  
    300       { 
    301         if (!this->begin.isEmpty()) 
    302         { 
    303           if (begin < 0 || begin > size - 1) 
    304             ERROR("CAxis::checkAttributes(void)", 
    305                   << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
    306                   << "The axis is wrongly defined, attribute 'begin' (" << begin.getValue() << ") must be non-negative and smaller than size-1 (" << size - 1 << ")."); 
    307         } 
    308         else this->begin.setValue(0); 
    309  
    310         if (!this->n.isEmpty()) 
    311         { 
    312           if (n < 0 || n > size) 
    313             ERROR("CAxis::checkAttributes(void)", 
    314                   << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
    315                   << "The axis is wrongly defined, attribute 'n' (" << n.getValue() << ") must be non-negative and smaller than size (" << size << ")."); 
    316         } 
    317         else this->n.setValue(size); 
    318  
    319         { 
    320           index.resize(n); 
    321           for (int i = 0; i < n; ++i) index(i) = i+begin; 
    322         } 
    323       } 
    324  
    325       if (!this->value.isEmpty()) 
    326       { 
    327         StdSize true_size = value.numElements(); 
    328         if (this->n.getValue() != true_size) 
    329           ERROR("CAxis::checkAttributes(void)", 
    330               << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
    331               << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size 
    332               << ") than the one defined by the \'size\' attribute (" << n.getValue() << ")."); 
    333         this->hasValue = true; 
    334       } 
    335  
    336       this->checkBounds(); 
    337       this->checkMask(); 
    338       this->checkData(); 
    339       this->checkLabel(); 
     280   { 
     281      if (checkAttributes_done_) return ; 
     282      checkGeometricAttributes(true) ; 
    340283      initializeLocalElement() ; 
    341284      addFullView() ; 
     
    345288      checkAttributes_done_ = true ; 
    346289   } 
     290    
     291   void CAxis::resetGeometricAttributes(void) 
     292   { 
     293     n_glo.reset(); 
     294     index.reset(); 
     295     n.reset(); 
     296     begin.reset(); 
     297     mask.reset(); 
     298     data_index.reset(); 
     299     data_n.reset(); 
     300     data_begin.reset(); 
     301     value.reset(); 
     302     bounds.reset(); 
     303     label.reset() ; 
     304   } 
     305 
     306   void CAxis::setGeometricAttributes(const CAxis& axisSrc) 
     307   { 
     308     resetGeometricAttributes() ; 
     309     n_glo=axisSrc.n_glo; 
     310     if (!axisSrc.index.isEmpty()) 
     311     { 
     312       index.resize(axisSrc.index.shape()) ; 
     313       index=axisSrc.index; 
     314     } 
     315 
     316     n=axisSrc.n; 
     317     begin=axisSrc.begin; 
     318     if (!axisSrc.mask.isEmpty()) 
     319     { 
     320       mask.resize(axisSrc.mask.shape()) ; 
     321       mask=axisSrc.mask; 
     322     } 
     323     if (!axisSrc.data_index.isEmpty()) 
     324     { 
     325       data_index.resize(axisSrc.data_index.shape()) ; 
     326       data_index=axisSrc.data_index; 
     327     } 
     328     data_n=axisSrc.data_n; 
     329     data_begin=axisSrc.data_begin; 
     330     if (!axisSrc.value.isEmpty()) 
     331     { 
     332       value.resize(axisSrc.value.shape()) ; 
     333       value=axisSrc.value; 
     334     } 
     335      
     336     if (!axisSrc.bounds.isEmpty()) 
     337     { 
     338       bounds.resize(axisSrc.bounds.shape()) ; 
     339       bounds=axisSrc.bounds; 
     340     } 
     341     if (!axisSrc.label.isEmpty()) 
     342     { 
     343       label.resize(axisSrc.label.shape()) ; 
     344       label=axisSrc.label; 
     345     } 
     346 
     347   } 
     348    
     349   bool CAxis::checkGeometricAttributes(bool generateError) 
     350   TRY 
     351   { 
     352     CContext* context=CContext::getCurrent(); 
     353 
     354     if (this->n_glo.isEmpty()) 
     355        if (generateError) ERROR("CAxis::checkAttributes(void)", 
     356                                << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
     357                                << "The axis is wrongly defined, attribute 'n_glo' must be specified") 
     358        else return false ;  
     359      StdSize size = this->n_glo.getValue(); 
     360 
     361      if (!this->index.isEmpty()) 
     362      { 
     363        if (n.isEmpty()) n = index.numElements(); 
     364 
     365        // It's not so correct but if begin is not the first value of index  
     366        // then data on the local axis has user-defined distribution. In this case, begin has no meaning. 
     367        if (begin.isEmpty()) begin = index(0);          
     368      } 
     369      else  
     370      { 
     371        if (!this->begin.isEmpty()) 
     372        { 
     373          if (begin < 0 || begin > size - 1) 
     374             if (generateError) ERROR("CAxis::checkAttributes(void)", 
     375                                      << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
     376                                      << "The axis is wrongly defined, attribute 'begin' ("  
     377                                      << begin.getValue() << ") must be non-negative and smaller than size-1 (" << size - 1 << ").") 
     378              else return false ;  
     379        } 
     380        else this->begin.setValue(0); 
     381 
     382        if (!this->n.isEmpty()) 
     383        { 
     384          if (n < 0 || n > size) 
     385            if (generateError) ERROR("CAxis::checkAttributes(void)", 
     386                                      << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
     387                                      << "The axis is wrongly defined, attribute 'n' (" << n.getValue() << ") must be non-negative and smaller than size ("  
     388                                      << size << ").") 
     389            else return false ;  
     390        } 
     391        else this->n.setValue(size); 
     392 
     393        { 
     394          index.resize(n); 
     395          for (int i = 0; i < n; ++i) index(i) = i+begin; 
     396        } 
     397      } 
     398 
     399      if (!this->value.isEmpty()) 
     400      { 
     401        StdSize true_size = value.numElements(); 
     402        if (this->n.getValue() != true_size) 
     403          if (generateError) ERROR("CAxis::checkAttributes(void)", 
     404                                   << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
     405                                   << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size 
     406                                   << ") than the one defined by the \'size\' attribute (" << n.getValue() << ").") 
     407          else return false ;  
     408        this->hasValue = true; 
     409      } 
     410 
     411      if (!this->checkBounds(generateError)) return false; 
     412      if (!this->checkMask(generateError))   return false; 
     413      if (!this->checkData(generateError))   return false; 
     414      if (!this->checkLabel(generateError))  return false; 
     415       
     416      return true ; 
     417   } 
    347418   CATCH_DUMP_ATTR 
    348  
    349419 
    350420 
     
    352422      Check the validity of data, fill in values if any, and apply mask. 
    353423   */ 
    354    void CAxis::checkData() 
     424   bool CAxis::checkData(bool generateError) 
    355425   TRY 
    356426   { 
     
    363433      else if (data_n.getValue() < 0) 
    364434      { 
    365         ERROR("CAxis::checkData(void)", 
    366               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 
    367               << "The data size should be strictly positive ('data_n' = " << data_n.getValue() << ")."); 
     435        if (generateError) ERROR("CAxis::checkData(void)", 
     436                              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 
     437                              << "The data size should be strictly positive ('data_n' = " << data_n.getValue() << ").") 
     438        else return false ; 
    368439      } 
    369440 
     
    388459        if (data_index.numElements() != data_n) 
    389460        { 
    390           ERROR("CAxis::checkData(void)", 
    391                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 
    392                 << "The size of data_index = "<< data_index.numElements() << "is not equal to the data size data_n = " << data_n.getValue() << ")."); 
     461          if (generateError) ERROR("CAxis::checkData(void)", 
     462                               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 
     463                               << "The size of data_index = "<< data_index.numElements() << "is not equal to the data size data_n = "  
     464                               << data_n.getValue() << ").") 
     465          else return false ; 
    393466        } 
    394467        for (int i = 0; i < data_n; ++i) 
     
    398471        } 
    399472      } 
    400  
     473      return true ; 
    401474   } 
    402475   CATCH_DUMP_ATTR 
    403476 
    404     size_t CAxis::getGlobalWrittenSize(void) 
    405     { 
    406       return n_glo ; 
    407     } 
    408  
    409    /*! 
    410      Check validity of mask info and fill in values if any. 
    411    */ 
    412    void CAxis::checkMask() 
     477/*! 
     478   Check validity of mask info and fill in values if any. 
     479  */ 
     480   bool CAxis::checkMask(bool generateError) 
    413481   TRY 
    414482   { 
     
    417485        if (mask.extent(0) != n) 
    418486        { 
    419           ERROR("CAxis::checkMask(void)", 
    420               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 
    421               << "The mask does not have the same size as the local domain." << std::endl 
    422               << "Local size is " << n.getValue() << "." << std::endl 
    423               << "Mask size is " << mask.extent(0) << "."); 
     487          if (generateError) ERROR("CAxis::checkMask(void)", 
     488                                  << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 
     489                                  << "The mask does not have the same size as the local domain." << std::endl 
     490                                  << "Local size is " << n.getValue() << "." << std::endl 
     491                                  << "Mask size is " << mask.extent(0) << ".") 
     492          else return false ; 
    424493        } 
    425494      } 
     
    429498        mask = true; 
    430499      } 
     500      return true ; 
    431501   } 
    432502   CATCH_DUMP_ATTR 
     
    435505     Check validity of bounds info and fill in values if any. 
    436506   */ 
    437    void CAxis::checkBounds() 
     507   bool CAxis::checkBounds(bool generateError) 
    438508   TRY 
    439509   { 
     
    441511     { 
    442512       if (bounds.extent(0) != 2 || bounds.extent(1) != n) 
    443          ERROR("CAxis::checkAttributes(void)", 
    444                << "The bounds array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension 2 x axis size." << std::endl 
    445                << "Axis size is " << n.getValue() << "." << std::endl 
    446                << "Bounds size is "<< bounds.extent(0) << " x " << bounds.extent(1) << "."); 
     513         if (generateError) ERROR("CAxis::checkAttributes(void)", 
     514                               << "The bounds array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension 2 x axis size." << std::endl 
     515                               << "Axis size is " << n.getValue() << "." << std::endl 
     516                               << "Bounds size is "<< bounds.extent(0) << " x " << bounds.extent(1) << ".") 
     517         else return false ; 
    447518       hasBounds = true; 
    448519     } 
    449520     else hasBounds = false; 
     521     return true ; 
    450522   } 
    451523   CATCH_DUMP_ATTR 
    452524 
    453   void CAxis::checkLabel() 
     525  bool CAxis::checkLabel(bool generateError) 
    454526  TRY 
    455527  { 
     
    457529    { 
    458530      if (label.extent(0) != n) 
    459         ERROR("CAxis::checkLabel(void)", 
    460               << "The label array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension of axis size." << std::endl 
    461               << "Axis size is " << n.getValue() << "." << std::endl 
    462               << "label size is "<< label.extent(0)<<  " ."); 
     531        if (generateError) ERROR("CAxis::checkLabel(void)", 
     532                              << "The label array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension of axis size." << std::endl 
     533                              << "Axis size is " << n.getValue() << "." << std::endl 
     534                              << "label size is "<< label.extent(0)<<  " .") 
     535        else return false ; 
    463536      hasLabel = true; 
    464537    } 
    465538    else hasLabel = false; 
    466   } 
    467   CATCH_DUMP_ATTR 
     539    return true ; 
     540  } 
     541  CATCH_DUMP_ATTR 
     542 
     543 
     544  size_t CAxis::getGlobalWrittenSize(void) 
     545  { 
     546    return n_glo ; 
     547  } 
     548 
     549    
    468550 
    469551  
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp

    r2282 r2291  
    124124         void checkAttributes(void); 
    125125         bool checkAttributes_done_ = false ; 
     126         bool checkGeometricAttributes(bool generateError) ;  
     127         void setGeometricAttributes(const CAxis& axisSrc) ; 
     128         void resetGeometricAttributes(void) ; 
    126129 
    127130         size_t getGlobalWrittenSize(void) ; 
     
    173176 
    174177      private: 
    175          void checkData(); 
    176          void checkMask(); 
    177          void checkBounds(); 
    178          void checkLabel(); 
     178         bool checkData(bool generateError); 
     179         bool checkMask(bool generateError); 
     180         bool checkBounds(bool generateError); 
     181         bool checkLabel(bool generateError); 
    179182       
    180183      public: 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/reduce_domain_to_axis.cpp

    r2270 r2291  
    4848       << "Axis destination " << axisDst->getId()); 
    4949 
    50     int axis_n_glo = axisDst->n_glo; 
    51     int domain_ni_glo = domainSrc->ni_glo; 
    52     int domain_nj_glo = domainSrc->nj_glo; 
    53  
    5450    if (this->operation.isEmpty()) 
    5551      ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 
     
    6561    if (this->local.isEmpty()) local=false ; 
    6662 
    67     switch (direction) 
    68     { 
    69       case direction_attr::jDir: 
    70         if (axis_n_glo != domain_ni_glo) 
    71           ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 
    72             << "Extract domain along j, axis destination should have n_glo equal to ni_glo of domain source" 
    73             << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl 
    74             << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo); 
    75          break; 
    76  
    77       case direction_attr::iDir: 
    78         if (axis_n_glo != domain_nj_glo) 
    79           ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 
    80             << "Extract domain along i, axis destination should have n_glo equal to nj_glo of domain source" 
    81             << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl 
    82             << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo); 
    83         break; 
    84  
    85       default: 
    86         break; 
    87     } 
    8863  } 
    8964 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/Functions/reduction_types.hpp

    r1999 r2291  
    1313{ 
    1414 
    15   typedef enum reduction_algurithm_type 
     15  typedef enum reduction_algorithm_type 
    1616  { 
    17     TRANS_REDUCE_SUM = 0, 
    18     TRANS_REDUCE_MIN = 1, 
    19     TRANS_REDUCE_MAX = 2, 
    20     TRANS_REDUCE_EXTRACT = 3, 
    21     TRANS_REDUCE_AVERAGE = 4 
     17    TRANS_REDUCE_NONE = 0,  
     18    TRANS_REDUCE_SUM = 1, 
     19    TRANS_REDUCE_MIN = 2, 
     20    TRANS_REDUCE_MAX = 3, 
     21    TRANS_REDUCE_EXTRACT = 4, 
     22    TRANS_REDUCE_AVERAGE = 5 
    2223  } EReductionType; 
    2324 
    2425  enum class EReduction 
    2526  { 
    26     sum, min, max, extract, average 
     27    none, sum, min, max, extract, average 
    2728  } ; 
    2829} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_no_data_modification.cpp

    r2270 r2291  
    1212  shared_ptr<CGridAlgorithm> CAlgorithmTransformationNoDataModification::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos) 
    1313  { 
    14     return make_shared<CGridAlgorithmNoDataModification>(static_pointer_cast<CAlgorithmTransformationNoDataModification>(shared_from_this())) ; 
     14    auto algo=make_shared<CGridAlgorithmNoDataModification>(static_pointer_cast<CAlgorithmTransformationNoDataModification>(shared_from_this())) ; 
     15    algo->computeAlgorithm() ; 
     16    return algo ;  
    1517  } 
    1618} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.hpp

    r2267 r2291  
    2828      shared_ptr<CReduceTransformConnector> reduceTransformConnector_ ; 
    2929      bool detectMissingValue_=true ; 
    30       bool eliminateRedondantSrc_ = true ;  
    3130  }; 
    3231 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_axis.cpp

    r2270 r2291  
    1212#include "grid.hpp" 
    1313#include "grid_transformation_factory_impl.hpp" 
     14#include "grid_algorithm_reduce.hpp" 
    1415 
    1516 
     
    5051TRY 
    5152{ 
    52   eliminateRedondantSrc_= false ; 
     53  if (!axisDestination->checkGeometricAttributes(false)) 
     54  { 
     55    axisDestination->resetGeometricAttributes(); 
     56    axisDestination->setGeometricAttributes(*axisSource) ; 
     57  } 
     58  axisDestination->checkAttributes() ;  
    5359  algo->checkValid(axisDestination, axisSource); 
    54   axisDestination->checkAttributes() ; 
     60   
    5561 
    5662  switch (algo->operation) 
     
    7581  } 
    7682 
    77   TransformationIndexMap& transMap = this->transformationMapping_; 
    78   CArray<int,1>& axisDstIndex = axisDestination->index; 
    79   int nbAxisIdx = axisDstIndex.numElements(); 
    80   for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis) 
     83  //TransformationIndexMap& transMap = this->transformationMapping_; 
     84  //CArray<int,1>& axisDstIndex = axisDestination->index; 
     85  //int nbAxisIdx = axisDstIndex.numElements(); 
     86 
     87 
     88 
     89  auto& transMap = this->transformationMapping_; 
     90   
     91  CArray<size_t,1> dstGlobalIndex ; 
     92  axisDestination->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(dstGlobalIndex) ; 
     93  size_t nbIdx = dstGlobalIndex.numElements(); 
     94 
     95  for (size_t idx = 0; idx < nbIdx; ++idx) 
    8196  { 
    82     int globalAxisIdx = axisDstIndex(idxAxis); 
    83     transMap[globalAxisIdx].resize(1); 
    84     transMap[globalAxisIdx][0]=globalAxisIdx ;       
     97    size_t globalIdx = dstGlobalIndex(idx); 
     98    transMap[globalIdx].resize(1); 
     99    transMap[globalIdx][0]=globalIdx ;       
    85100  } 
    86101 
    87   
    88   axisDestination->checkAttributes() ; 
    89102  this->computeAlgorithm(axisSource->getLocalView(CElementView::WORKFLOW), axisDestination->getLocalView(CElementView::WORKFLOW)) ; 
    90103} 
    91104CATCH 
    92105 
     106shared_ptr<CGridAlgorithm> CAxisAlgorithmReduceAxis::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos) 
     107{ 
     108  auto algo=make_shared<CGridAlgorithmReduce>(gridSrc, gridDst, pos, shared_from_this(), operator_) ; 
     109  algo->computeAlgorithm(false) ; 
     110  return algo ;  
     111} 
    93112 
    94113CAxisAlgorithmReduceAxis::~CAxisAlgorithmReduceAxis() 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_axis.hpp

    r2270 r2291  
    4444                                                std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    4545                                                std::map<int, int>& elementPositionInGridDst2DomainPosition); 
     46 
     47  virtual shared_ptr<CGridAlgorithm> createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos); 
    4648  static bool dummyRegistered_; 
    4749}; 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_domain.cpp

    r2270 r2291  
    5151TRY 
    5252{ 
    53   algo->checkValid(axisDestination, domainSource); 
    54   axisDestination->checkAttributes() ; 
    5553  switch (algo->operation) 
    5654  { 
     
    7472 
    7573  } 
    76  
     74   
     75  algo->checkValid(axisDestination, domainSource); 
    7776  dir_ = (CReduceDomainToAxis::direction_attr::iDir == algo->direction)  ? iDir : jDir; 
    78   bool local = algo->local ; 
     77 
     78  bool local = false; 
     79  if (!algo->local.isEmpty()) local=algo->local ; 
     80   
     81  size_t nj_glo = domainSource->nj_glo ; 
     82  size_t ni_glo = domainSource->ni_glo ; 
     83 
     84  bool validAxis = axisDestination->checkGeometricAttributes(false) ; 
     85  if (validAxis && !local)  
     86  { 
     87     
     88    axisDestination->checkAttributes() ;  
     89    if (dir_==jDir) 
     90    { 
     91        if (axisDestination->n_glo != domainSource->nj_glo) 
     92          ERROR("CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(bool isSource, CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo)", 
     93            << "Extract domain along j, axis destination should have n_glo equal to nj_glo of domain source" 
     94            << "Domain source " <<domainSource->getId() << " has nj_glo " << domainSource->nj_glo << std::endl 
     95            << "Axis destination " << axisDestination->getId() << " has n_glo " << axisDestination->n_glo) 
     96    } 
     97    else 
     98    { 
     99      if (axisDestination->n_glo != domainSource->ni_glo) 
     100          ERROR("CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(bool isSource, CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo)", 
     101            << "Extract domain along j, axis destination should have n_glo equal to ni_glo of domain source" 
     102            << "Domain source " <<domainSource->getId() << " has ni_glo " << domainSource->ni_glo << std::endl 
     103            << "Axis destination " << axisDestination->getId() << " has n_glo " << axisDestination->n_glo); 
     104    } 
     105  } 
     106  else 
     107  { 
     108    // create axis destination from source domain 
     109 
     110    axisDestination->resetGeometricAttributes(); 
     111    if (dir_== jDir) 
     112    { 
     113      axisDestination->n_glo = domainSource->nj_glo ; 
     114       
     115      CArray<size_t, 1> srcGlobalIndex ; 
     116      set<size_t> indexFullView; 
     117      set<size_t> indexWorkflowView; 
     118      domainSource->getLocalView(CElementView::FULL)->getGlobalIndexView(srcGlobalIndex) ; 
     119      for(int i=0; i<srcGlobalIndex.numElements(); i++) indexFullView.insert(srcGlobalIndex(i)/ni_glo) ; 
     120      domainSource->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(srcGlobalIndex) ; 
     121      for(int i=0; i<srcGlobalIndex.numElements(); i++) indexWorkflowView.insert(srcGlobalIndex(i)/ni_glo) ; 
     122 
     123      axisDestination-> n = indexFullView.size() ; 
     124      axisDestination-> index.resize(axisDestination-> n) ; 
     125      axisDestination-> mask.resize(axisDestination-> n) ; 
     126       
     127      map<size_t,int> globalToLocalIndex ; 
     128      auto it=indexFullView.begin(); 
     129      for(int i=0; it!=indexFullView.end(); ++i,++it)  
     130      { 
     131        axisDestination->index(i) = *it ; 
     132        if (indexWorkflowView.count(*it)==0) axisDestination->mask(i) = false ; 
     133        else axisDestination->mask(i) = true ; 
     134        globalToLocalIndex[*it] = i ; 
     135      } 
     136      if (domainSource->hasLonLat && domainSource->type == CDomain::type_attr::rectilinear) 
     137      { 
     138        axisDestination->value.resize(axisDestination-> n) ; 
     139        axisDestination->axis_type.setValue(CAxis::axis_type_attr::Y) ; 
     140        if (domainSource->hasBounds) axisDestination-> bounds.resize(axisDestination-> n, 2) ; 
     141 
     142        domainSource->getLocalView(CElementView::FULL)->getGlobalIndexView(srcGlobalIndex) ; 
     143        for(int i=0; i<srcGlobalIndex.numElements(); i++)  
     144        { 
     145          axisDestination->value(globalToLocalIndex[srcGlobalIndex(i)/ni_glo]) = domainSource->latvalue(i) ; 
     146          if (domainSource->hasBounds)  
     147          { 
     148            axisDestination->bounds(globalToLocalIndex[srcGlobalIndex(i)/ni_glo,0]) = domainSource->bounds_latvalue(i,0) ; 
     149            axisDestination->bounds(globalToLocalIndex[srcGlobalIndex(i)/ni_glo,1]) = domainSource->bounds_latvalue(i,1) ; 
     150          } 
     151        }  
     152      } 
     153       
     154    } 
     155    else // dir_== iDir 
     156    { 
     157      axisDestination->n_glo = domainSource->ni_glo ; 
     158       
     159      CArray<size_t, 1> srcGlobalIndex ; 
     160      set<size_t> indexFullView; 
     161      set<size_t> indexWorkflowView; 
     162      domainSource->getLocalView(CElementView::FULL)->getGlobalIndexView(srcGlobalIndex) ; 
     163      for(int i=0; i<srcGlobalIndex.numElements(); i++) indexFullView.insert(srcGlobalIndex(i)%ni_glo) ; 
     164      domainSource->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(srcGlobalIndex) ; 
     165      for(int i=0; i<srcGlobalIndex.numElements(); i++) indexWorkflowView.insert(srcGlobalIndex(i)%ni_glo) ; 
     166 
     167      axisDestination-> n = indexFullView.size() ; 
     168      axisDestination-> index.resize(axisDestination-> n) ; 
     169      axisDestination-> mask.resize(axisDestination-> n) ; 
     170      map<size_t,int> globalToLocalIndex ; 
     171      auto it=indexFullView.begin(); 
     172      for(int i=0; it!=indexFullView.end(); ++i,++it)  
     173      { 
     174        axisDestination->index(i) = *it ; 
     175        if (indexWorkflowView.count(*it)==0) axisDestination->mask(i) = false ; 
     176        else axisDestination->mask(i) = true ; 
     177        globalToLocalIndex[*it] = i ; 
     178      } 
     179     
     180      if (domainSource->hasLonLat && domainSource->type == CDomain::type_attr::rectilinear) 
     181      { 
     182        axisDestination-> value.resize(axisDestination-> n) ; 
     183        axisDestination-> axis_type.setValue(CAxis::axis_type_attr::X) ; 
     184        if (domainSource->hasBounds) axisDestination->bounds.resize(axisDestination-> n, 2) ; 
     185 
     186        domainSource->getLocalView(CElementView::FULL)->getGlobalIndexView(srcGlobalIndex) ; 
     187        for(int i=0; i<srcGlobalIndex.numElements(); i++)  
     188        { 
     189          axisDestination->value(globalToLocalIndex[srcGlobalIndex(i)%ni_glo]) = domainSource->lonvalue(i) ; 
     190          if (domainSource->hasBounds)  
     191          { 
     192            axisDestination->bounds(globalToLocalIndex[srcGlobalIndex(i)%ni_glo,0]) = domainSource->bounds_lonvalue(i,0) ; 
     193            axisDestination->bounds(globalToLocalIndex[srcGlobalIndex(i)%ni_glo,1]) = domainSource->bounds_lonvalue(i,1) ; 
     194          } 
     195        }  
     196      } 
     197     
     198    } 
     199    
     200    axisDestination->checkAttributes() ;    
     201  } 
     202   
     203  // compute needed index for tranformation 
     204 
     205  TransformationIndexMap& transMap = transformationMapping_; 
     206 
     207  CArray<size_t, 1> srcGlobalIndex ; 
     208  domainSource->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(srcGlobalIndex) ; 
     209  CArray<size_t, 1> dstGlobalIndex ; 
     210  axisDestination->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(dstGlobalIndex) ; 
     211   
     212  if (local) 
     213  { 
     214     
     215    set<size_t> dstGlobalIndexSet ; 
     216    for(int i=0; i<dstGlobalIndex.numElements() ; i++) dstGlobalIndexSet.insert(dstGlobalIndex(i)) ; // for mask 
     217 
     218    size_t dstInd ;  
     219    for(int i=0; i<srcGlobalIndex.numElements(); i++)  
     220    { 
     221      if (dir_== jDir) dstInd=srcGlobalIndex(i)/ni_glo ; 
     222      else dstInd=srcGlobalIndex(i)%ni_glo ; 
     223      if (dstGlobalIndexSet.count(dstInd)!=0) transMap[dstInd].push_back(srcGlobalIndex(i)) ;  
     224    } 
     225  } 
     226  else 
     227  { 
     228    for(int i=0; i<dstGlobalIndex.numElements() ;i++) 
     229    { 
     230      if (dir_== jDir)  
     231        for(size_t j=0; j<ni_glo;j++) transMap[dstGlobalIndex(i)].push_back(dstGlobalIndex(i)*ni_glo+j) ; 
     232      else 
     233        for(size_t j=0; j<nj_glo;j++) transMap[dstGlobalIndex(i)].push_back(ni_glo*j+dstGlobalIndex(i)) ; 
     234    } 
     235  } 
     236 
     237/* 
     238 
    79239 
    80240  TransformationIndexMap& transMap = transformationMapping_; 
     
    148308 
    149309  axisDestination->checkAttributes() ; 
     310*/ 
    150311  this->computeAlgorithm(domainSource->getLocalView(CElementView::WORKFLOW), axisDestination->getLocalView(CElementView::WORKFLOW)) ; 
    151312 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/generic_algorithm_transformation.cpp

    r2270 r2291  
    3535shared_ptr<CGridAlgorithm> CGenericAlgorithmTransformation::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos) 
    3636{ 
    37   return make_shared<CGridAlgorithmGeneric>(gridSrc, gridDst, pos, shared_from_this()) ; 
     37  auto algo = make_shared<CGridAlgorithmGeneric>(gridSrc, gridDst, pos, shared_from_this()) ; 
     38  algo->computeAlgorithm() ; 
     39  return algo ;  
    3840} 
    3941 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.cpp

    r2270 r2291  
    1313  : CGridAlgorithm(algo), gridSrc_(gridSrc), gridDst_(gridDst), pos_(pos) 
    1414  { 
    15     computeAlgorithm() ; 
    1615  } 
    1716 
    18   void CGridAlgorithmGeneric::computeAlgorithm(void) 
     17  void CGridAlgorithmGeneric::computeAlgorithm(bool eliminateRedondant) 
    1918  { 
    2019    shared_ptr<CGridLocalElements> gridSrcElements = gridSrc_->getGridLocalElements() ; 
     
    4847 
    4948    gridTransformConnector_ = make_shared<CGridTransformConnector>(srcView->getViews(), remoteViews, comm ) ; 
     49    gridTransformConnector_->computeConnector(eliminateRedondant) ; 
    5050  
    5151  } 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.hpp

    r2270 r2291  
    2626    virtual ~CGridAlgorithmGeneric() {} ; 
    2727 
    28     void computeAlgorithm(void) ; 
     28    void computeAlgorithm(bool eliminateRedundant=true) ; 
    2929    virtual void apply(const CArray<double,1>& dataIn, CArray<double,1>& dataOut) ; 
    3030    virtual void apply(const CArray<double,1>& dataIn, const vector<CArray<double,1>>& auxData, CArray<double,1>& dataOut) ; 
    3131     
    3232  protected: 
     33 
    3334    shared_ptr<CGridTransformConnector> gridTransformConnector_=nullptr ; 
    3435    CGrid* gridSrc_ = nullptr ; 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_axis.cpp

    r2270 r2291  
    7979 
    8080  }  
     81 
     82  bool local=false ; 
     83  if (!algo->local.isEmpty()) local=algo->local ; 
    8184   
    82   int globalIndexSize = axisSource-> n_glo; 
    83   for (int idx = 0; idx < globalIndexSize; ++idx)  transformationMapping_[0].push_back(idx); 
     85  auto& transMap = this->transformationMapping_;   
     86   
     87  if (local) 
     88  { 
     89    scalarDestination->n=1 ; // no mask 
     90    scalarDestination->mask.reset() ; 
     91     
     92    CArray<size_t,1> srcGlobalIndex ; 
     93    axisSource->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(srcGlobalIndex) ; 
     94    size_t nbIdx = srcGlobalIndex.numElements(); 
     95    if (nbIdx==0) scalarDestination->n=0 ; 
     96    scalarDestination->checkAttributes() ; 
    8497 
    85   scalarDestination->checkAttributes() ; 
     98    for (size_t idx = 0; idx < nbIdx; ++idx) 
     99    { 
     100      size_t globalIdx = srcGlobalIndex(idx); 
     101      transformationMapping_[0].push_back(globalIdx); 
     102    } 
     103 
     104  } 
     105  else 
     106  { 
     107   scalarDestination->checkAttributes() ; 
     108 
     109   int globalIndexSize = axisSource->getLocalView(CElementView::WORKFLOW)->getGlobalSize(); 
     110   CArray<size_t,1> dstGlobalIndex ; 
     111   scalarDestination->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(dstGlobalIndex) ; 
     112   if (dstGlobalIndex.numElements()!=0) 
     113     for (int idx = 0; idx < globalIndexSize; ++idx)  transformationMapping_[0].push_back(idx); 
     114  } 
     115 
    86116  this->computeAlgorithm(axisSource->getLocalView(CElementView::WORKFLOW), scalarDestination->getLocalView(CElementView::WORKFLOW)) ; 
    87117   
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_domain.cpp

    r2270 r2291  
    7474  } 
    7575 
    76   TransformationIndexMap& transMap = this->transformationMapping_; 
    77  
    78   int ni_glo = domainSrc_->ni_glo ; 
    79   int nj_glo = domainSrc_->nj_glo ; 
    80   int nbDomainIdx ; 
     76  bool local=false ; 
     77  if (!algo->local.isEmpty()) local=algo->local ; 
    8178   
    82   bool  local = algo->local ; 
     79  auto& transMap = this->transformationMapping_;   
    8380   
    8481  if (local) 
    8582  { 
    86       const CArray<int, 1>& i_index = domainSrc_-> i_index.getValue() ; 
    87       const CArray<int, 1>& j_index = domainSrc_-> j_index.getValue() ; 
    88       const CArray<bool,1>& localMask = domainSrc_-> localMask ; 
    89       int nbDomainIdx = i_index.numElements(); 
     83    scalarDestination->n=1 ; // no mask 
     84    scalarDestination->mask.reset() ; 
     85     
     86    CArray<size_t,1> srcGlobalIndex ; 
     87    domainSource->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(srcGlobalIndex) ; 
     88    size_t nbIdx = srcGlobalIndex.numElements(); 
     89    if (nbIdx==0) scalarDestination->n=0 ; 
     90    scalarDestination->checkAttributes() ; 
    9091 
    91       for (int idxDomain = 0; idxDomain < nbDomainIdx; ++idxDomain) 
    92       { 
    93         if (localMask(idxDomain)) 
    94         {  
    95           transMap[0].push_back(j_index(idxDomain)* ni_glo + i_index(idxDomain)); 
    96         } 
    97       } 
     92    for (size_t idx = 0; idx < nbIdx; ++idx) 
     93    { 
     94      size_t globalIdx = srcGlobalIndex(idx); 
     95      transformationMapping_[0].push_back(globalIdx); 
     96    } 
     97 
    9898  } 
    9999  else 
    100   {   
    101     nbDomainIdx = ni_glo * nj_glo; 
    102     for (int idxDomain = 0; idxDomain < nbDomainIdx; ++idxDomain) transMap[0].push_back(idxDomain);     
     100  { 
     101   scalarDestination->checkAttributes() ; 
     102 
     103   int globalIndexSize = domainSource->getLocalView(CElementView::WORKFLOW)->getGlobalSize(); 
     104   CArray<size_t,1> dstGlobalIndex ; 
     105   scalarDestination->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(dstGlobalIndex) ; 
     106   if (dstGlobalIndex.numElements()!=0) 
     107     for (int idx = 0; idx < globalIndexSize; ++idx)  transformationMapping_[0].push_back(idx); 
    103108  } 
    104    
    105   scalarDestination->checkAttributes() ; 
     109 
    106110  this->computeAlgorithm(domainSource->getLocalView(CElementView::WORKFLOW), scalarDestination->getLocalView(CElementView::WORKFLOW)) ; 
     111 
    107112} 
    108113CATCH 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_scalar.cpp

    r2270 r2291  
    1010#include "grid_transformation_factory_impl.hpp" 
    1111#include "reduction.hpp" 
     12#include "grid_algorithm_reduce.hpp" 
     13 
    1214 
    1315 
     
    4749TRY 
    4850{ 
    49   eliminateRedondantSrc_= false ; 
     51  scalarDestination->checkAttributes() ; 
    5052  if (algo->operation.isEmpty()) 
    5153    ERROR("CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)", 
     
    7577 
    7678  } 
    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(); 
    7885 
    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 
    8093  this->computeAlgorithm(scalarSource->getLocalView(CElementView::WORKFLOW), scalarDestination->getLocalView(CElementView::WORKFLOW)) ;  
    8194} 
    8295CATCH 
     96 
     97shared_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} 
    83103 
    84104CScalarAlgorithmReduceScalar::~CScalarAlgorithmReduceScalar() 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_scalar.hpp

    r2270 r2291  
    4242                                                std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    4343                                                std::map<int, int>& elementPositionInGridDst2DomainPosition); 
     44  virtual shared_ptr<CGridAlgorithm> createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos); 
    4445  static bool dummyRegistered_; 
    4546}; 
Note: See TracChangeset for help on using the changeset viewer.