diff --git a/NonLinearSolver/modelReduction/Tree.cpp b/NonLinearSolver/modelReduction/Tree.cpp index e00abd926827ab13449157c16b9af3d2b7b99711..185581bb43f57cfa230ca5739b0517fd8828f4ca 100644 --- a/NonLinearSolver/modelReduction/Tree.cpp +++ b/NonLinearSolver/modelReduction/Tree.cpp @@ -311,7 +311,15 @@ void Tree::createRandomTreeSameDepthForNodes(int nbLeaves, int numChildMax, int } else { - outPut.push_back(numChilds+remaining); + if (numChilds+remaining < 4) + { + outPut.push_back(numChilds+remaining); + } + else + { + outPut.push_back(2); + outPut.push_back(numChilds+remaining-2); + } iter += numChilds+remaining; } };