From 0fe54277136ec083eae525722d08efa0cf1ccf8b Mon Sep 17 00:00:00 2001 From: Amaury Johnan <amjohnen@gmail.com> Date: Tue, 24 Jul 2012 12:48:04 +0000 Subject: [PATCH] clean up --- Mesh/meshGFaceRecombine.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Mesh/meshGFaceRecombine.cpp b/Mesh/meshGFaceRecombine.cpp index 98c93b9818..f88c939d1a 100644 --- a/Mesh/meshGFaceRecombine.cpp +++ b/Mesh/meshGFaceRecombine.cpp @@ -438,9 +438,16 @@ void Recombine2D::nextTreeActions(std::vector<Rec2DAction*> &actions, case 3 : // triangle of best neighbour action for (unsigned int i = 0; i < neighbourEl.size(); ++i) neighbourEl[i]->getUniqueActions(actions); - std::sort(actions.begin(), actions.end(), gterRec2DAction()); if (actions.size()) { + std::max_element(actions.begin(), actions.end(), lessAction()) + ->getElements(elements); + std::sort(actions.begin(), actions.end(), gterRec2DAction()); actions[0]->getElements(elements); + + if (actions[0] != std::max_element(actions.begin(), actions.end(), lessAction())) + Msg::Error("ce n'est pas ca"); + else + Msg::Info("c'est ca"); for (unsigned int i = 0; i < elements.size(); ++i) { for (unsigned int j = 0; j < neighbourEl.size(); ++j) { if (elements[i] == neighbourEl[j]) { -- GitLab