]> SALOME platform Git repositories - modules/yacs.git/blobdiff - src/engine/Switch.cxx
Salome HOME
Merge branch 'V9_2_2_BR'
[modules/yacs.git] / src / engine / Switch.cxx
index a65e8425f49ca0d0b1c540a90491ee80a84888ca..314c619271386912d805c9f8e7fb2a6569913ff9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019  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
@@ -408,6 +408,23 @@ int Switch::getMaxLevelOfParallelism() const
   return ret;
 }
 
+void Switch::getWeightRegardingDPL(ComplexWeight *weight)
+{
+  ComplexWeight localWeight;
+  for(std::map< int , Node * >::const_iterator it=_mapOfNode.begin();it!=_mapOfNode.end();it++)
+  {
+    ((*it).second)->getWeightRegardingDPL(&localWeight);
+    weight->max(localWeight);
+    localWeight.setToZero();
+  }
+}
+
+void Switch::partitionRegardingDPL(const PartDefinition *pd, std::map<ComposedNode *, YACS::BASES::AutoRefCnt<PartDefinition> >& zeMap)
+{
+  for(std::map< int , Node * >::const_iterator it=_mapOfNode.begin();it!=_mapOfNode.end();it++)
+    (*it).second->partitionRegardingDPL(pd,zeMap);
+}
+
 void Switch::edRemoveChild(Node *node) throw(YACS::Exception)
 {
   map< int , Node * >::iterator iter=_mapOfNode.begin();