-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 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
// create BBTree structure
// - get bounding boxes
- double* bboxes = new double[6 * numSrcElems];
+ std::vector<double> bboxes(6 * numSrcElems);
ConnType* srcElemIdx = new ConnType[numSrcElems];
for(ConnType i = 0; i < numSrcElems ; ++i)
{
srcElemIdx[i] = srcElems[i]->getIndex();
}
- BBTree<3,ConnType> tree(bboxes, srcElemIdx, 0, numSrcElems, 0.);
+ // [ABN] Adjust 2D bounding box (those might be flat in the cases where the 2D surf are perfectly aligned with the axis)
+ performAdjustmentOfBB(intersector, bboxes);
+
+ BBTree<3,ConnType> tree(bboxes.data(), srcElemIdx, 0, numSrcElems, 0.);
// for each target element, get source elements with which to calculate intersection
// - calculate intersection by calling intersectCells
}
- delete [] bboxes;
delete [] srcElemIdx;
DuplicateFacesType::iterator iter;