]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Warning hunting
authorageay <ageay>
Wed, 25 Jan 2012 09:09:40 +0000 (09:09 +0000)
committerageay <ageay>
Wed, 25 Jan 2012 09:09:40 +0000 (09:09 +0000)
src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx
src/MEDCoupling/MEDCouplingNormalizedUnstructuredMesh.txx

index 12a17bd45d87d558e385f29b2f83597bd6b748c0..59b46f9210e2614167e92350ca4f5c00c48ddaa1 100644 (file)
@@ -99,21 +99,20 @@ namespace INTERP_KERNEL
         std::set<TriangleFaceKey> listOfTetraFacesColinear;
 
         // calculate the coordinates of the nodes
-        const NumberingPolicy numPol=MyMeshType::My_numPol;
         typename MyMeshType::MyConnType cellSrc = *iterCellS;
         int cellSrcIdx = OTT<ConnType,numPol>::indFC(cellSrc);
         NormalizedCellType normCellType=Intersector3D<MyMeshType,MyMatrixType>::_src_mesh.getTypeOfElement(cellSrcIdx);
         const CellModel& cellModelCell=CellModel::GetCellModel(normCellType);
-        const MyMeshType& _src_mesh = Intersector3D<MyMeshType,MyMatrixType>::_src_mesh;
-        unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? _src_mesh.getNumberOfNodesOfElement(cellSrcIdx) : cellModelCell.getNumberOfNodes();
+        const MyMeshType& src_mesh = Intersector3D<MyMeshType,MyMatrixType>::_src_mesh;
+        unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? src_mesh.getNumberOfNodesOfElement(cellSrcIdx) : cellModelCell.getNumberOfNodes();
         int *polyNodes=new int[nbOfNodes4Type];
         double **polyCoords = new double*[nbOfNodes4Type];
         for(int i = 0;i<(int)nbOfNodes4Type;++i)
           {
             // 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);
+            const int globalNodeNum = getGlobalNumberOfNode(i, OTT<ConnType,numPol>::indFC(*iterCellS), src_mesh);
             polyNodes[i]=globalNodeNum;
-            polyCoords[i] = (double*)_src_mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*globalNodeNum;
+            polyCoords[i] = const_cast<double*>(src_mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*globalNodeNum);
           }
 
         for(typename std::vector<SplitterTetra<MyMeshType>*>::iterator iter = _tetra.begin(); iter != _tetra.end(); ++iter)
index ffeb9a81e58892580684b008c9ca25242ba25b43..eb4188c987c13d9c4bd62ad61938ae7b370acbd0 100644 (file)
@@ -114,7 +114,7 @@ template<int SPACEDIM,int MESHDIM>
 MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::~MEDCouplingNormalizedUnstructuredMesh()
 {
   if(_mesh)
-    ((ParaMEDMEM::MEDCouplingUMesh *)_mesh)->decrRef();
+    _mesh->decrRef();
   releaseTempArrays();
 }