Changeset 938
- Timestamp:
- 09/22/16 10:59:07 (8 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/config/reduce_domain_to_axis_attribute.conf
r895 r938 2 2 3 3 /* Direction to apply operation (i, j) */ 4 DECLARE_ ATTRIBUTE(StdString, direction)4 DECLARE_ENUM2(direction, iDir, jDir) -
XIOS/trunk/src/node/reduce_domain_to_axis.cpp
r895 r938 54 54 std::set<StdString> opString(opLists, opLists + sizeof(opLists)/sizeof(opLists[0])); 55 55 56 StdString dirLists[]= {"i","j"};57 std::set<StdString> dirString(dirLists, dirLists + sizeof(dirLists)/sizeof(dirLists[0]));58 59 56 if (this->operation.isEmpty()) 60 57 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", … … 72 69 if (this->direction.isEmpty()) 73 70 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 74 << "A direction to apply the operation must be defined. It should be: 'i ' or 'j'"71 << "A direction to apply the operation must be defined. It should be: 'iDir' or 'jDir'" 75 72 << "Domain source " <<domainSrc->getId() << std::endl 76 73 << "Axis destination " << axisDst->getId()); 77 78 StdString direction = this->direction;79 if (dirString.end() == dirString.find(direction))80 {81 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",82 << "Direction '" << direction << " is undefined. Please make sure to use a supported one: i or j"83 << "Domain source " <<domainSrc->getId() << std::endl84 << "Axis destination " << axisDst->getId());85 }86 else87 {88 if (0 == direction.compare("j"))89 {90 if (axis_n_glo != domain_ni_glo)91 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",92 << "Reduce domain along j, axis destination should have n_glo equal to ni_glo of domain source"93 << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl94 << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);95 }96 if (0 == direction.compare("i"))97 {98 if (axis_n_glo != domain_nj_glo)99 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",100 << "Reduce domain along i, axis destination should have n_glo equal to nj_glo of domain source"101 << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl102 << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);103 }104 }105 74 } 106 75 -
XIOS/trunk/src/transformation/axis_algorithm_reduce_domain.cpp
r933 r938 48 48 algo->checkValid(axisDestination, domainSource); 49 49 StdString op = algo->operation; 50 StdString direction = algo->direction; 51 dir_ = (0 == direction.compare("i")) ? iDir : jDir; 50 dir_ = (CReduceDomainToAxis::direction_attr::iDir == algo->direction) ? iDir : jDir; 52 51 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 53 52 }
Note: See TracChangeset
for help on using the changeset viewer.