Ignore:
Timestamp:
03/08/24 17:05:40 (4 months ago)
Author:
jderouillat
Message:

Fix the attached mode for scalar output, and some bugs revealed by the adastra porting in debug mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/transformation/scalar_algorithm/scalar_algorithm_redistribute.cpp

    r2507 r2613  
    9595    CArray<double,1> valSrc, valDst ; 
    9696    valSrc.resize(scalarSource->getLocalView(CElementView::FULL)->getSize()) ; 
    97     valDst.resize(scalarDestination->getLocalView(CElementView::FULL)->getSize()) ; 
    98      
    99     if (scalarSource->hasValue()) 
    100     { 
    101       if (valSrc.numElements()>0)  valSrc(0)=scalarSource->value ; 
    102       transformConnector->transfer(valSrc, valDst) ; 
    103       if (valDst.numElements()>0)  scalarDestination->value = valDst(0) ; 
    104     } 
    10597 
    10698    if (scalarSource->hasBounds())  
     
    124116     
    125117    transformMask->transfer(workflow, mask, false) ;    
    126     scalarDestination->mask = mask(0) ; 
     118    if (mask.numElements()>0) 
     119    { 
     120      scalarDestination->mask = mask(0) ; 
     121    } 
    127122 
    128123    scalarDestination->checkAttributes() ; 
     124    this->computeAlgorithm(scalarSource->getLocalView(CElementView::WORKFLOW), scalarDestination->getLocalView(CElementView::WORKFLOW)) ; 
     125 
     126    valDst.resize(scalarDestination->getLocalView(CElementView::FULL)->getSize()) ; 
     127    if (scalarSource->hasValue()) 
     128    { 
     129      if (valSrc.numElements()>0)  valSrc(0)=scalarSource->value ; 
     130      transformConnector->transfer(valSrc, valDst) ; 
     131      if (valDst.numElements()>0)  scalarDestination->value = valDst(0) ; 
     132    } 
    129133  } 
    130134  CATCH 
Note: See TracChangeset for help on using the changeset viewer.