deleting the depth checking in addSegmentSetINC

This commit is contained in:
Kai Bao
2015-11-02 14:00:58 +01:00
parent a8eb2b2970
commit b99540228c

View File

@@ -536,20 +536,11 @@ namespace Opm {
}
int current_location;
int i_depth = 0;
while ((*new_segmentset)[outlet_location]->dataReady() == false) {
current_location = outlet_location;
outlet_segment = (*new_segmentset)[outlet_location]->outletSegment();
outlet_location = new_segmentset->numberToLocation(outlet_segment);
assert((outlet_location >= 0) && (outlet_location < new_segmentset->numberSegment()));
++i_depth;
// when it enters dead loop, should throw an exception
// 10000 is a temporary manual here.
if (i_depth > 10000) {
throw std::runtime_error("loop exist or something wrong with the segment structure ");
}
}
if ((*new_segmentset)[outlet_location]->dataReady() == true) {