-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
}
while(1);
}
- catch(std::ifstream::failure&)
+ catch(const std::ifstream::failure&)
{
}
+ catch(const std::exception & ex)
+ {
+ // Some code before this catch throws the C++98 version of the exception (mangled
+ // name is " NSt8ios_base7failureE"), but FED24 compilation of the current version of the code
+ // tries to catch the C++11 version of it (mangled name "NSt8ios_base7failureB5cxx11E").
+ // So we have this nasty hack to catch both versions ...
+
+ // TODO: the below should be replaced by a better handling avoiding exception throwing.
+ if (std::string(ex.what()) == "basic_ios::clear")
+ {
+ //std::cout << "std::ios_base::failure C++11\n";
+ }
+ else
+ throw ex;
+ }
front()->changeStartNodeWith(back()->getEndNode());
}
const std::vector<int>& otherEdgeIds,
std::vector<int>& edgesThis, int cellIdThis,
std::vector< std::vector<int> >& edgesInOtherColinearWithThis, std::vector< std::vector<int> >& subDivOther,
- std::vector<double>& addCoo)
+ std::vector<double>& addCoo, std::map<int,int>& mergedNodes)
{
double xBaryBB, yBaryBB;
double fact=normalizeExt(&other, xBaryBB, yBaryBB);
{
ElementaryEdge* curE1=it1.current();
merge.clear();
+ //
+ std::map<INTERP_KERNEL::Node *,int>::const_iterator thisStart(mapThis.find(curE1->getStartNode())),thisEnd(mapThis.find(curE1->getEndNode())),otherStart(mapOther.find(curE2->getStartNode())),otherEnd(mapOther.find(curE2->getEndNode()));
+ int thisStart2(thisStart==mapThis.end()?-1:(*thisStart).second),thisEnd2(thisEnd==mapThis.end()?-1:(*thisEnd).second),otherStart2(otherStart==mapOther.end()?-1:(*otherStart).second+offset1),otherEnd2(otherEnd==mapOther.end()?-1:(*otherEnd).second+offset1);
+ //
if(curE1->getPtr()->intersectWith(curE2->getPtr(),merge,*c1,*c2))
{
if(!curE1->getDirection()) c1->reverse();
UpdateNeighbours(merge,it1,it2,curE1,curE2);
it1.next();
}
+ merge.updateMergedNodes(thisStart2,thisEnd2,otherStart2,otherEnd2,mergedNodes);
}
}
if(otherTmp.presenceOfOn())