Changeset 872


Ignore:
Timestamp:
06/09/16 17:36:58 (5 years ago)
Author:
mhnguyen
Message:

Correcting a bug invovling with the order of transformations

+) Add a check to make sure that, if the grid destination and grid source share a
same element, all transformations associated with this elements will not be accounted
in transformations list

Test
+) On Curie
+) all tests pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/grid_transformation.cpp

    r871 r872  
    136136{ 
    137137  std::vector<CAxis*> axisListDestP = gridDestination_->getAxis(); 
     138  std::vector<CAxis*> axisListSrcP = gridSource_->getAxis(); 
    138139  if (!axisListDestP.empty()) 
    139140  { 
     141    // If source and destination grid share the same axis 
     142    if (axisListDestP[elementPosition2AxisPositionInGrid_[axisPositionInGrid]] == 
     143        axisListSrcP[elementPosition2AxisPositionInGrid_[axisPositionInGrid]]) return; 
     144 
    140145    if (axisListDestP[elementPosition2AxisPositionInGrid_[axisPositionInGrid]]->hasTransformation()) 
    141146    { 
     
    165170{ 
    166171  std::vector<CDomain*> domListDestP = gridDestination_->getDomains(); 
     172  std::vector<CDomain*> domListSrcP = gridSource_->getDomains(); 
    167173  if (!domListDestP.empty()) 
    168174  { 
     175    // If source and destination grid share the same domain 
     176    if (domListDestP[elementPosition2DomainPositionInGrid_[domPositionInGrid]] == 
     177        domListSrcP[elementPosition2DomainPositionInGrid_[domPositionInGrid]]) return; 
     178 
    169179    if (domListDestP[elementPosition2DomainPositionInGrid_[domPositionInGrid]]->hasTransformation()) 
    170180    { 
     
    291301  { 
    292302    tempGridDests_.resize(0); 
    293 //    tmpGridDestination_ = tempGridDests_[nbTransformation]; 
    294 //    return; 
    295303  } 
    296304  std::vector<CAxis*> axisListDestP = gridDestination_->getAxis(); 
     
    346354  { 
    347355    tempGridSrcs_.resize(0); 
    348 //    gridSource_ = tempGridSrcs_[nbTransformation]; 
    349 //    return; 
    350356  } 
    351357 
     
    406412    } 
    407413  } 
    408  
    409 //  for (int idx = 0; idx < axisListSrcP.size(); ++idx) 
    410 //  { 
    411 //    CAxis* axis = CAxis::createAxis(); 
    412 //    if (axisIndex != idx) axis->axis_ref.setValue(axisListSrcP[idx]->getId()); 
    413 //    else axis->axis_ref.setValue(axisListDestP[idx]->getId()); 
    414 //    axis->solveRefInheritance(true); 
    415 //    axis->checkAttributesOnClient(); 
    416 //    axisSrc.push_back(axis); 
    417 //  } 
    418 // 
    419 //  for (int idx = 0; idx < domListSrcP.size(); ++idx) 
    420 //  { 
    421 //    CDomain* domain = CDomain::createDomain(); 
    422 //    if (domainIndex != idx) domain->domain_ref.setValue(domListSrcP[idx]->getId()); 
    423 //    else domain->domain_ref.setValue(domListDestP[idx]->getId()); 
    424 //    domain->solveRefInheritance(true); 
    425 //    domain->checkAttributesOnClient(); 
    426 //    domainSrc.push_back(domain); 
    427 //  } 
    428414 
    429415  gridSource_ = CGrid::createGrid(domainSrc, axisSrc, tmpGridDestination_->axis_domain_order); 
Note: See TracChangeset for help on using the changeset viewer.