Changeset 980 for XIOS/trunk/src/node/reduce_domain_to_axis.cpp
- Timestamp:
- 10/24/16 16:16:40 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/reduce_domain_to_axis.cpp
r938 r980 51 51 int domain_nj_glo = domainSrc->nj_glo; 52 52 53 StdString opLists[]= {"sum","min","max"};54 std::set<StdString> opString(opLists, opLists + sizeof(opLists)/sizeof(opLists[0]));55 56 53 if (this->operation.isEmpty()) 57 54 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", … … 60 57 << "Axis destination " << axisDst->getId()); 61 58 62 StdString op = this->operation; 63 if (opString.end() == opString.find(op)) 59 if (this->direction.isEmpty()) 64 60 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 65 << "Operation '" << op << "' not found. Please make sure to use a supported one"66 << "Domain source " <<domainSrc->getId() << std::endl67 << "Axis destination " << axisDst->getId());61 << "A direction to apply the operation must be defined. It should be: 'iDir' or 'jDir'" 62 << "Domain source " <<domainSrc->getId() << std::endl 63 << "Axis destination " << axisDst->getId()); 68 64 69 65 if (this->direction.isEmpty()) … … 72 68 << "Domain source " <<domainSrc->getId() << std::endl 73 69 << "Axis destination " << axisDst->getId()); 70 71 72 switch (direction) 73 { 74 case direction_attr::jDir: 75 if (axis_n_glo != domain_ni_glo) 76 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 77 << "Extract domain along j, axis destination should have n_glo equal to ni_glo of domain source" 78 << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl 79 << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo); 80 break; 81 82 case direction_attr::iDir: 83 if (axis_n_glo != domain_nj_glo) 84 ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)", 85 << "Extract domain along i, axis destination should have n_glo equal to nj_glo of domain source" 86 << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl 87 << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo); 88 break; 89 90 default: 91 break; 92 } 74 93 } 75 94
Note: See TracChangeset
for help on using the changeset viewer.