-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* @param targetCell in C mode.
* @param srcCells in C mode.
- *
*/
template<class MyMeshType, class MyMatrixType>
void Polyhedron3D2DIntersectorP0P0<MyMeshType,MyMatrixType>::intersectCells(ConnType targetCell,
{
// we could store mapping local -> global numbers too, but not sure it is worth it
const int globalNodeNum = getGlobalNumberOfNode(i, OTT<ConnType,numPol>::indFC(*iterCellS), src_mesh);
- polyNodes[i]=globalNodeNum;
+ polyNodes[i] = globalNodeNum;
polyCoords[i] = const_cast<double*>(src_mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*globalNodeNum);
}
listOfTetraFacesTreated,
listOfTetraFacesColinear);
- if(surface!=0.) {
-
- matrix[targetCell].insert(std::make_pair(cellSrcIdx, surface));
-
- bool isSrcFaceColinearWithFaceOfTetraTargetCell = false;
- std::set<TriangleFaceKey>::iterator iter;
- for (iter = listOfTetraFacesColinear.begin(); iter != listOfTetraFacesColinear.end(); ++iter)
- {
- if (listOfTetraFacesTreated.count(*iter) != 1)
- {
- isSrcFaceColinearWithFaceOfTetraTargetCell = false;
- break;
- }
- else
- {
- isSrcFaceColinearWithFaceOfTetraTargetCell = true;
- }
- }
-
- if (isSrcFaceColinearWithFaceOfTetraTargetCell)
- {
- DuplicateFacesType::iterator intersectFacesIter = _intersect_faces.find(cellSrcIdx);
- if (intersectFacesIter != _intersect_faces.end())
- {
- intersectFacesIter->second.insert(targetCell);
- }
- else
- {
- std::set<int> targetCellSet;
- targetCellSet.insert(targetCell);
- _intersect_faces.insert(std::make_pair(cellSrcIdx, targetCellSet));
- }
-
- }
-
- }
-
- delete[] polyNodes;
- delete[] polyCoords;
-
+ if(surface!=0.)
+ {
+
+ matrix[targetCell].insert(std::make_pair(cellSrcIdx, surface));
+
+ bool isSrcFaceColinearWithFaceOfTetraTargetCell = false;
+ std::set<TriangleFaceKey>::iterator iter;
+ for (iter = listOfTetraFacesColinear.begin(); iter != listOfTetraFacesColinear.end(); ++iter)
+ {
+ if (listOfTetraFacesTreated.count(*iter) != 1)
+ {
+ isSrcFaceColinearWithFaceOfTetraTargetCell = false;
+ break;
+ }
+ else
+ {
+ isSrcFaceColinearWithFaceOfTetraTargetCell = true;
+ }
+ }
+
+ if (isSrcFaceColinearWithFaceOfTetraTargetCell)
+ {
+ DuplicateFacesType::iterator intersectFacesIter = _intersect_faces.find(cellSrcIdx);
+ if (intersectFacesIter != _intersect_faces.end())
+ {
+ intersectFacesIter->second.insert(targetCell);
+ }
+ else
+ {
+ std::set<int> targetCellSet;
+ targetCellSet.insert(targetCell);
+ _intersect_faces.insert(std::make_pair(cellSrcIdx, targetCellSet));
+ }
+ }
+ }
+ delete [] polyNodes;
+ delete [] polyCoords;
}
_split.releaseArrays();
}