Changeset 1577


Ignore:
Timestamp:
09/11/18 10:17:46 (3 years ago)
Author:
oabramkina
Message:

Backporting r1573-r1575 to dev.

Location:
XIOS/dev/dev_olga/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/io/nc4_data_input.cpp

    r1563 r1577  
    8585              count.push_back(domain->nj); 
    8686            } 
    87             --idx ; 
    8887            start.push_back(domain->ibegin); 
    8988            count.push_back(domain->ni); 
    90  
    91             --idx ; 
    9289            --idxDomain; 
    9390          } 
     
    9794            start.push_back(axis->begin); 
    9895            count.push_back(axis->n); 
    99             --idx; 
     96            --idxAxis ; 
    10097          } 
    10198          else 
     
    106103              count.push_back(1); 
    107104            } 
    108             --idx; 
    109105          } 
    110106        } 
  • XIOS/dev/dev_olga/src/node/field.cpp

    r1568 r1577  
    14691469      CFieldGroup* group = CFieldGroup::get(gref); 
    14701470      CFieldGroup* owner = CFieldGroup::get(boost::polymorphic_downcast<CFieldGroup*>(this)); 
    1471  
     1471      owner->setAttributes(group); // inherite of attributes of group reference 
     1472       
    14721473      std::vector<CField*> allChildren  = group->getAllChildren(); 
    14731474      std::vector<CField*>::iterator it = allChildren.begin(), end = allChildren.end(); 
  • XIOS/dev/dev_olga/src/parse_expr/filter_expr_node.cpp

    r1542 r1577  
    1111  { /* Nothing to do */ } 
    1212 
     13   
    1314  std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    1415  { 
    1516    std::shared_ptr<COutputPin> outputPin; 
    1617 
    17     if (fieldId == "this") 
    18       outputPin = thisField.getSelfReference(gc); 
    19     else if (CField::has(fieldId)) 
     18    if (fieldId == "this") outputPin = thisField.getSelfReference(gc); 
     19    else 
    2020    { 
    21       CField* field = CField::get(fieldId); 
    22       if (field == &thisField) 
    23         ERROR("std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    24               << "The field " << fieldId << " has an invalid reference to itself. " 
    25               << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
    26  
    27       field->buildFilterGraph(gc, false); 
    28       outputPin = field->getInstantDataFilter(); 
     21      string id ; 
     22 
     23      if (fieldId == "this_ref") 
     24      { 
     25        if (thisField.field_ref.isEmpty()) 
     26        { 
     27          ERROR("shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     28                << "field_ref attribute is empty."); 
     29        } 
     30        else id = thisField.field_ref ; 
     31      } 
     32      else id= fieldId ; 
     33        
     34      if (CField::has(id)) 
     35      { 
     36        CField* field = CField::get(id); 
     37        if (field == &thisField) 
     38          ERROR("shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     39                << "The field " << id << " has an invalid reference to itself. " 
     40                << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
     41 
     42        field->buildFilterGraph(gc, false); 
     43        outputPin = field->getInstantDataFilter(); 
     44      } 
     45      else ERROR("boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     46                  << "The field " << id << " does not exist."); 
    2947    } 
    30     else 
    31       ERROR("std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    32             << "The field " << fieldId << " does not exist."); 
    33  
    3448    return outputPin; 
    3549  } 
     50 
    3651 
    3752  CFilterTemporalFieldExprNode::CFilterTemporalFieldExprNode(const std::string& fieldId) 
     
    3954  { /* Nothing to do */ } 
    4055 
     56 
    4157  std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    4258  { 
     
    4561    if (fieldId == "this") 
    4662      outputPin = thisField.getSelfTemporalDataFilter(gc, thisField.freq_op.isEmpty() ? TimeStep : thisField.freq_op); 
    47     else if (CField::has(fieldId)) 
     63    else 
    4864    { 
    49       CField* field = CField::get(fieldId); 
    50       if (field == &thisField) 
    51         ERROR("std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    52               << "The field " << fieldId << " has an invalid reference to itself. " 
    53               << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
    54  
    55       field->buildFilterGraph(gc, false); 
    56       outputPin = field->getTemporalDataFilter(gc, thisField.freq_op.isEmpty() ? TimeStep : thisField.freq_op); 
     65      string id ; 
     66 
     67      if (fieldId == "this_ref") 
     68      { 
     69        if (thisField.field_ref.isEmpty()) 
     70        { 
     71          ERROR("shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     72                << "field_ref attribute is empty."); 
     73        } 
     74        else id = thisField.field_ref ; 
     75      } 
     76      else id = fieldId ; 
     77 
     78      if (CField::has(id)) 
     79      { 
     80        CField* field = CField::get(id); 
     81        if (field == &thisField) 
     82          ERROR("shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     83                << "The field " << fieldId << " has an invalid reference to itself. " 
     84                << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
     85 
     86        field->buildFilterGraph(gc, false); 
     87        outputPin = field->getTemporalDataFilter(gc, thisField.freq_op.isEmpty() ? TimeStep : thisField.freq_op); 
     88      } 
     89      else 
     90        ERROR("shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     91              << "The field " << fieldId << " does not exist."); 
    5792    } 
    58     else 
    59       ERROR("std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    60             << "The field " << fieldId << " does not exist."); 
    61  
    6293    return outputPin; 
    6394  } 
     95 
    6496 
    6597  CFilterUnaryOpExprNode::CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child) 
Note: See TracChangeset for help on using the changeset viewer.