-// Copyright (C) 2015-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2015-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
SetOfPoints::~SetOfPoints()
{
- if(!_bp)
- return;
delete _bp;
}
-void SetOfPoints::simplify()
+void SetOfPoints::basicSimplify()
{
while(_bp->size()>1)
{
if(somethingDone)
continue;
_bp->deal2Ter(somethingDone);
+ if(somethingDone)
+ continue;
+ _bp->deal2Quatro(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).");
+ }
+}
+
+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->deal2Quatro(somethingDone);
+ if(somethingDone)
+ continue;
+ _bp->dealNotSimpleCase(somethingDone);
if(!somethingDone)
- throw Exception("SetOfPoints::simplify : not implemented yet !");
+ 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();
}
}
return _bp->getMaxLevelOfParallelism();
}
-double SetOfPoints::getWeightRegardingDPL() const
+void SetOfPoints::getWeightRegardingDPL(ComplexWeight *weight)
{
- return _bp->getWeightRegardingDPL();
+ _bp->getWeightRegardingDPL(weight);
}
void SetOfPoints::partitionRegardingDPL(const PartDefinition *pd, std::map<ComposedNode *, YACS::BASES::AutoRefCnt<PartDefinition> >& zeMap) const
{
return _bp->getUniqueAndReleaseIt();
}
+
+void SetOfPoints::accept(PointVisitor *pv)
+{
+ _bp->accept(pv);
+}