Salome HOME
Optimized algo for PlayGround
[modules/yacs.git] / src / engine / Bloc_impl.cxx
index 038be80f6f06942ab3e935bd7724be7e1273aff3..1a5ed1f72c64e6c63ec572843fee2514e7bc60d9 100644 (file)
@@ -84,11 +84,14 @@ void Bloc::fitToPlayGround(const PlayGround *pg)
       int _lev;
       int _max_lev;
   };
-  YACS::BASES::AutoRefCnt<PartDefinition> pd(new AllPartDefinition(pg,1));
+  YACS::BASES::AutoRefCnt<PartDefinition> pd(new AllPartDefinition(pg));
   std::map<ComposedNode *,YACS::BASES::AutoRefCnt<PartDefinition> > zeMap;
+  MyVisitor vis(this);
+  this->accept(&vis);
+  for(std::list<ForEachLoop *>::const_iterator it=vis._fes.begin();it!=vis._fes.end();it++)
+    (*it)->edGetNbOfBranchesPort()->edInit(1);
   this->removeRecursivelyRedundantCL();
   this->partitionRegardingDPL(pd,zeMap);
-  MyVisitor vis(this);
   this->accept(&vis);
   for(std::list<ForEachLoop *>::const_iterator it=vis._fes.begin();it!=vis._fes.end();it++)
     {