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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.