Ignore:
Timestamp:
10/25/21 14:34:40 (3 months ago)
Author:
ymipsl
Message:

Fix issue for Ugrid convention output.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/file.cpp

    r2200 r2250  
    876876     std::vector<int> domainNvertices; 
    877877     std::vector<StdString> domainNames; 
    878      std::map<string, tuple<CDomain*,CDomain*,CDomain*>> registeredDomains ; 
     878     std::map<string, tuple<set<CDomain*>,set<CDomain*>,set<CDomain*>>> registeredDomains ; 
    879879 
    880880     for (int i = 0; i < size; ++i) 
     
    920920       } 
    921921 
    922        if (nvertex==1)  std::get<0>(registeredDomains[domainName])=domain[0] ; 
    923        else if (nvertex==2) std::get<1>(registeredDomains[domainName])=domain[0] ; 
    924        else  std::get<2>(registeredDomains[domainName])=domain[0] ; 
     922       if (nvertex==1)  std::get<0>(registeredDomains[domainName]).insert(domain[0]) ; 
     923       else if (nvertex==2) std::get<1>(registeredDomains[domainName]).insert(domain[0]) ; 
     924       else  std::get<2>(registeredDomains[domainName]).insert(domain[0]) ; 
    925925     } 
    926926 
     
    930930       string domainName=it.first ; 
    931931 
    932        if (std::get<0>(it.second)!=nullptr) domains.push_back(std::get<0>(it.second)) ; 
    933        if (std::get<1>(it.second)!=nullptr) domains.push_back(std::get<1>(it.second)) ;  
    934        if (std::get<2>(it.second)!=nullptr) domains.push_back(std::get<2>(it.second)) ;  
     932       for(auto& domain : std::get<0>(it.second) ) domains.push_back(domain) ; 
     933       for(auto& domain : std::get<1>(it.second) ) domains.push_back(domain) ; 
     934       for(auto& domain : std::get<2>(it.second) ) domains.push_back(domain) ; 
    935935        
    936936       // for each component of a given mesh (i.e. domains with same name but different number of vertices) 
Note: See TracChangeset for help on using the changeset viewer.