]> SALOME platform Git repositories - modules/yacs.git/blobdiff - src/engine/SetOfPoints.cxx
Salome HOME
Algorithm of level of parallelism has been extended to more complex cases.
[modules/yacs.git] / src / engine / SetOfPoints.cxx
index 51a47468ce6bfb343d2aa702c233081ad2d83d5f..025edd9595fb2cb809060f386891fdb6b6e871d3 100644 (file)
@@ -40,12 +40,10 @@ SetOfPoints::SetOfPoints(const std::list<Node *>& nodes):_bp(0)
 
 SetOfPoints::~SetOfPoints()
 {
-  if(!_bp)
-    return;
   delete _bp;
 }
 
-void SetOfPoints::simplify()
+void SetOfPoints::basicSimplify()
 {
   while(_bp->size()>1)
     {
@@ -65,6 +63,33 @@ void SetOfPoints::simplify()
     }
 }
 
+void SetOfPoints::simplify()
+{
+  while( _bp->internalContinueForSimplify() )
+    {
+      bool somethingDone(false);
+      _bp->deal1(somethingDone);
+      if(somethingDone)
+        continue;
+      _bp->deal2(somethingDone);
+      if(somethingDone)
+        continue;
+      _bp->deal2Bis(somethingDone);
+      if(somethingDone)
+        continue;
+      _bp->deal2Ter(somethingDone);
+      if(somethingDone)
+        continue;
+      _bp->dealNotSimpleCase(somethingDone);
+      if(!somethingDone)
+        throw Exception("SetOfPoints::simplify : not implemented yet !\nPlease check if there are any recursively redundant links (can be removed by removeRecursivelyRedundantCL method).");
+    }
+  if( _bp->presenceOfNonSimpleCase() )
+    {
+      _bp->expandNonSimpleCase();
+    }
+}
+
 std::string SetOfPoints::getRepr() const
 {
   return _bp->getRepr();