From: eap Date: Fri, 15 Nov 2019 14:03:26 +0000 (+0300) Subject: LOT2: massive substitution of int->mcIdType in the INTERP_KERNEL implementation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2e37c3b2608fb54c25e2ce1ebb99ae0c246b11ce;p=tools%2Fmedcoupling.git LOT2: massive substitution of int->mcIdType in the INTERP_KERNEL implementation --- diff --git a/src/INTERP_KERNEL/BBTree.txx b/src/INTERP_KERNEL/BBTree.txx index 23dcfe3be..c312a646b 100644 --- a/src/INTERP_KERNEL/BBTree.txx +++ b/src/INTERP_KERNEL/BBTree.txx @@ -160,7 +160,7 @@ public: // terminal node : return list of elements intersecting bb if (_terminal) { - for (mcIdType i=0; i<_nbelems; i++) + for (ConnType i=0; i<_nbelems; i++) { const double* const bb_ptr=_bb+_elems[i]*2*dim; bool intersects = true; diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P0.hxx b/src/INTERP_KERNEL/CurveIntersectorP0P0.hxx index 365d4b4e4..6c9fbf5ee 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP0P0.hxx +++ b/src/INTERP_KERNEL/CurveIntersectorP0P0.hxx @@ -38,8 +38,8 @@ namespace INTERP_KERNEL double precision, double tolerance, double medianLine, int printLevel); public: - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); }; diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P0.txx b/src/INTERP_KERNEL/CurveIntersectorP0P0.txx index 54cdc5b5c..45d5522ea 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/CurveIntersectorP0P0.txx @@ -37,14 +37,14 @@ namespace INTERP_KERNEL } template - int CurveIntersectorP0P0 + typename MyMeshType::MyConnType CurveIntersectorP0P0 ::getNumberOfRowsOfResMatrix() const { return BASE_INTERSECTOR::_meshT.getNumberOfElements(); } template - int CurveIntersectorP0P0 + typename MyMeshType::MyConnType CurveIntersectorP0P0 ::getNumberOfColsOfResMatrix() const { return BASE_INTERSECTOR::_meshS.getNumberOfElements(); @@ -56,14 +56,14 @@ namespace INTERP_KERNEL { typename MyMatrix::value_type& resRow = res[icellT]; std::vector coordsT; - int t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT); + ConnType t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT); for ( t = 0; t < nbSegT; ++t ) for(typename std::vector::const_iterator iter=icellsS.begin(); iter!=icellsS.end(); iter++) { - int iS = *iter; + ConnType iS = *iter; std::vector coordsS; - int s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS); + ConnType s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS); for ( s = 0; s < nbSegS; ++s ) { double surf = BASE_INTERSECTOR::intersectSegments(&coordsT[0] + t*SPACEDIM, diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P1.hxx b/src/INTERP_KERNEL/CurveIntersectorP0P1.hxx index 0f3145cb9..e2f88f726 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP0P1.hxx +++ b/src/INTERP_KERNEL/CurveIntersectorP0P1.hxx @@ -40,8 +40,8 @@ namespace INTERP_KERNEL public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P1.txx b/src/INTERP_KERNEL/CurveIntersectorP0P1.txx index 7173c55e6..51960280e 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP0P1.txx +++ b/src/INTERP_KERNEL/CurveIntersectorP0P1.txx @@ -37,14 +37,14 @@ namespace INTERP_KERNEL } template - int CurveIntersectorP0P1 + typename MyMeshType::MyConnType CurveIntersectorP0P1 ::getNumberOfRowsOfResMatrix() const { return BASE_INTERSECTOR::_meshT.getNumberOfNodes(); } template - int CurveIntersectorP0P1 + typename MyMeshType::MyConnType CurveIntersectorP0P1 ::getNumberOfColsOfResMatrix() const { return BASE_INTERSECTOR::_meshS.getNumberOfElements(); @@ -62,15 +62,15 @@ namespace INTERP_KERNEL { std::vector segmentsT; BASE_INTERSECTOR::getDualSegments( icellT, BASE_INTERSECTOR::_meshT, segmentsT); - for ( int t = 0; t < (int)segmentsT.size(); ++t ) + for ( ConnType t = 0; t < (ConnType)segmentsT.size(); ++t ) { typename MyMatrix::value_type& resRow = res[ OTT::ind2C( segmentsT[t]._nodeId )]; for(typename std::vector::const_iterator iter=icellsS.begin(); iter!=icellsS.end(); iter++) { - int iS = *iter; + ConnType iS = *iter; std::vector coordsS; - int s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS); + ConnType s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS); for ( s = 0; s < nbSegS; ++s ) { double surf = BASE_INTERSECTOR::intersectSegments(&segmentsT[t]._coords[0], diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P0.hxx b/src/INTERP_KERNEL/CurveIntersectorP1P0.hxx index 76844461f..d52eec2dd 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP1P0.hxx +++ b/src/INTERP_KERNEL/CurveIntersectorP1P0.hxx @@ -38,8 +38,8 @@ namespace INTERP_KERNEL double precision, double tolerance, double medianLine, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P0.txx b/src/INTERP_KERNEL/CurveIntersectorP1P0.txx index 831d80718..a5bfe0fcb 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP1P0.txx +++ b/src/INTERP_KERNEL/CurveIntersectorP1P0.txx @@ -37,14 +37,14 @@ namespace INTERP_KERNEL } template - int CurveIntersectorP1P0 + typename MyMeshType::MyConnType CurveIntersectorP1P0 ::getNumberOfRowsOfResMatrix() const { return BASE_INTERSECTOR::_meshT.getNumberOfElements(); } template - int CurveIntersectorP1P0 + typename MyMeshType::MyConnType CurveIntersectorP1P0 ::getNumberOfColsOfResMatrix() const { return BASE_INTERSECTOR::_meshS.getNumberOfNodes(); @@ -63,21 +63,21 @@ namespace INTERP_KERNEL typename MyMatrix::value_type& resRow = res[ icellT ]; std::vector segmentsS; std::vector coordsT; - int t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT); + ConnType t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT); for ( t = 0; t < nbSegT; ++t ) for(typename std::vector::const_iterator iter=icellsS.begin(); iter!=icellsS.end(); iter++) { - int iS = *iter; + ConnType iS = *iter; BASE_INTERSECTOR::getDualSegments( OTT::ind2C(iS), BASE_INTERSECTOR::_meshS, segmentsS); - for ( int s = 0; s < (int)segmentsS.size(); ++s ) + for ( ConnType s = 0; s < (ConnType)segmentsS.size(); ++s ) { double surf = BASE_INTERSECTOR::intersectSegments(&segmentsS[s]._coords[0], &coordsT[0] + t*SPACEDIM); if(surf!=0.) { - int nS = segmentsS[s]._nodeId; + ConnType nS = segmentsS[s]._nodeId; typename MyMatrix::value_type::const_iterator iterRes=resRow.find(nS); if(iterRes==resRow.end()) resRow.insert(std::make_pair(nS,surf)); diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P1.hxx b/src/INTERP_KERNEL/CurveIntersectorP1P1.hxx index de086bb4d..106d85297 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP1P1.hxx +++ b/src/INTERP_KERNEL/CurveIntersectorP1P1.hxx @@ -40,8 +40,8 @@ namespace INTERP_KERNEL public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P1.txx b/src/INTERP_KERNEL/CurveIntersectorP1P1.txx index d63d34aae..dd91ee5f2 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP1P1.txx +++ b/src/INTERP_KERNEL/CurveIntersectorP1P1.txx @@ -37,14 +37,14 @@ namespace INTERP_KERNEL } template - int CurveIntersectorP1P1 + typename MyMeshType::MyConnType CurveIntersectorP1P1 ::getNumberOfRowsOfResMatrix() const { return BASE_INTERSECTOR::_meshT.getNumberOfNodes(); } template - int CurveIntersectorP1P1 + typename MyMeshType::MyConnType CurveIntersectorP1P1 ::getNumberOfColsOfResMatrix() const { return BASE_INTERSECTOR::_meshS.getNumberOfNodes(); @@ -56,22 +56,22 @@ namespace INTERP_KERNEL { std::vector segmentsT, segmentsS; BASE_INTERSECTOR::getDualSegments( icellT, BASE_INTERSECTOR::_meshT, segmentsT); - for ( int t = 0; t < (int)segmentsT.size(); ++t ) + for ( ConnType t = 0; t < (ConnType)segmentsT.size(); ++t ) { typename MyMatrix::value_type& resRow = res[ OTT::ind2C( segmentsT[t]._nodeId )]; for(typename std::vector::const_iterator iter=icellsS.begin(); iter!=icellsS.end(); iter++) { - int iS = *iter; + ConnType iS = *iter; BASE_INTERSECTOR::getDualSegments( OTT::ind2C(iS), BASE_INTERSECTOR::_meshS, segmentsS); - for ( int s = 0; s < (int)segmentsS.size(); ++s ) + for ( ConnType s = 0; s < (ConnType)segmentsS.size(); ++s ) { double surf = BASE_INTERSECTOR::intersectSegments(&segmentsT[t]._coords[0], &segmentsS[s]._coords[0]); if(surf!=0.) { - int nS = segmentsS[s]._nodeId; + ConnType nS = segmentsS[s]._nodeId; typename MyMatrix::value_type::const_iterator iterRes=resRow.find(nS); if(iterRes==resRow.end()) resRow.insert(std::make_pair(nS,surf)); diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P1PL.hxx b/src/INTERP_KERNEL/CurveIntersectorP1P1PL.hxx index 16104ab5e..a3fb45ea0 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP1P1PL.hxx +++ b/src/INTERP_KERNEL/CurveIntersectorP1P1PL.hxx @@ -39,8 +39,8 @@ namespace INTERP_KERNEL double medianLine, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; private: static void AppendValueInMatrix(MyMatrix& res, ConnType nodeIdT, ConnType nodeIdS0, double val0, ConnType nodeIdS1, double val1); static void AppendValueInMatrix2(typename MyMatrix::value_type& resRow, ConnType nodeIdS0, double val0); diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx b/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx index 60bdd97e6..e9bd3e5c2 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx +++ b/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx @@ -34,13 +34,13 @@ namespace INTERP_KERNEL } template - int CurveIntersectorP1P1PL::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType CurveIntersectorP1P1PL::getNumberOfRowsOfResMatrix() const { return CurveIntersector::_meshT.getNumberOfNodes(); } template - int CurveIntersectorP1P1PL::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType CurveIntersectorP1P1PL::getNumberOfColsOfResMatrix() const { return CurveIntersector::_meshS.getNumberOfNodes(); } diff --git a/src/INTERP_KERNEL/IntegralUniformIntersector.hxx b/src/INTERP_KERNEL/IntegralUniformIntersector.hxx index 4b9c4b7cc..8f4f5516f 100644 --- a/src/INTERP_KERNEL/IntegralUniformIntersector.hxx +++ b/src/INTERP_KERNEL/IntegralUniformIntersector.hxx @@ -51,8 +51,8 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; public: IntegralUniformIntersectorP0(const MyMeshType& mesh, bool isAbs); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); }; @@ -63,8 +63,8 @@ namespace INTERP_KERNEL typedef typename MyMeshType::MyConnType ConnType; public: IntegralUniformIntersectorP1(const MyMeshType& mesh, bool isAbs); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); }; } diff --git a/src/INTERP_KERNEL/IntegralUniformIntersector.txx b/src/INTERP_KERNEL/IntegralUniformIntersector.txx index c31bf6ed9..d328faa6a 100755 --- a/src/INTERP_KERNEL/IntegralUniformIntersector.txx +++ b/src/INTERP_KERNEL/IntegralUniformIntersector.txx @@ -69,7 +69,7 @@ namespace INTERP_KERNEL } template - int IntegralUniformIntersectorP0::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType IntegralUniformIntersectorP0::getNumberOfRowsOfResMatrix() const { if(IntegralUniformIntersector::_from_to) return 1; @@ -78,7 +78,7 @@ namespace INTERP_KERNEL } template - int IntegralUniformIntersectorP0::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType IntegralUniformIntersectorP0::getNumberOfColsOfResMatrix() const { if(IntegralUniformIntersector::_from_to) return IntegralUniformIntersector::_mesh.getNumberOfElements(); @@ -109,7 +109,7 @@ namespace INTERP_KERNEL } template - int IntegralUniformIntersectorP1::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType IntegralUniformIntersectorP1::getNumberOfRowsOfResMatrix() const { if(IntegralUniformIntersector::_from_to) return 1; @@ -118,7 +118,7 @@ namespace INTERP_KERNEL } template - int IntegralUniformIntersectorP1::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType IntegralUniformIntersectorP1::getNumberOfColsOfResMatrix() const { if(IntegralUniformIntersector::_from_to) return IntegralUniformIntersector::_mesh.getNumberOfNodes(); @@ -138,7 +138,7 @@ namespace INTERP_KERNEL for(ConnType i=0;i::_mesh.getTypeOfElement(OTT::indFC(i)); - int lgth=connIndx[i+1]-connIndx[i]; + ConnType lgth=connIndx[i+1]-connIndx[i]; const ConnType *locConn=conn+OTT::ind2C(connIndx[i]); double val=computeVolSurfOfCell(t,locConn,lgth,coords); if(t==NORM_TRI3) @@ -147,7 +147,7 @@ namespace INTERP_KERNEL val/=4.; else throw INTERP_KERNEL::Exception("Invalid cell type detected : must be TRI3 or TETRA4 ! "); - for(int j=0;j::putValueIn(OTT::coo2C(locConn[j]),val,res); } } diff --git a/src/INTERP_KERNEL/Interpolation2D3D.hxx b/src/INTERP_KERNEL/Interpolation2D3D.hxx index ddfaf93dc..d23b91478 100644 --- a/src/INTERP_KERNEL/Interpolation2D3D.hxx +++ b/src/INTERP_KERNEL/Interpolation2D3D.hxx @@ -47,7 +47,7 @@ namespace INTERP_KERNEL INTERPKERNEL_EXPORT Interpolation2D3D(); INTERPKERNEL_EXPORT Interpolation2D3D(const InterpolationOptions& io); template - int interpolateMeshes(const MyMeshType& srcMesh, + typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MyMatrixType& matrix, const std::string& method); diff --git a/src/INTERP_KERNEL/Interpolation2D3D.txx b/src/INTERP_KERNEL/Interpolation2D3D.txx index 3531e9dce..4e7fac898 100755 --- a/src/INTERP_KERNEL/Interpolation2D3D.txx +++ b/src/INTERP_KERNEL/Interpolation2D3D.txx @@ -60,7 +60,7 @@ namespace INTERP_KERNEL * */ template - ConnType Interpolation2D3D::interpolateMeshes(const MyMeshType& srcMesh, + typename MyMeshType::MyConnType Interpolation2D3D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MyMatrixType& matrix, const std::string& method) diff --git a/src/INTERP_KERNEL/InterpolationCU.hxx b/src/INTERP_KERNEL/InterpolationCU.hxx index 0d36165ea..31c95329c 100644 --- a/src/INTERP_KERNEL/InterpolationCU.hxx +++ b/src/INTERP_KERNEL/InterpolationCU.hxx @@ -37,10 +37,10 @@ namespace INTERP_KERNEL InterpolationCU(const InterpolationOptions & io); template - int interpolateMeshes(const MyCMeshType& meshS, const MyUMeshType& meshT, MatrixType& result, const char *method); + typename MyCMeshType::MyConnType interpolateMeshes(const MyCMeshType& meshS, const MyUMeshType& meshT, MatrixType& result, const char *method); template - int interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method); + typename MyUMeshType::MyConnType interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method); }; } diff --git a/src/INTERP_KERNEL/InterpolationCU.txx b/src/INTERP_KERNEL/InterpolationCU.txx index bc9cdeace..eae13af3a 100644 --- a/src/INTERP_KERNEL/InterpolationCU.txx +++ b/src/INTERP_KERNEL/InterpolationCU.txx @@ -92,12 +92,13 @@ namespace INTERP_KERNEL //================================================================================ template - ConnType InterpolationCU::interpolateMeshes(const MyCMeshType& src_mesh, + typename MyCMeshType::MyConnType InterpolationCU::interpolateMeshes(const MyCMeshType& src_mesh, const MyUMeshType& tgt_mesh, MatrixType& result, const char * method) { typedef typename MyCMeshType::MyConnType CConnType; + typedef typename MyUMeshType::MyConnType UConnType; if ( std::string("P0P0") != method ) throw Exception("Only P0P0 method is implemented so far"); @@ -117,27 +118,27 @@ namespace INTERP_KERNEL } // create empty maps for all target elements result.resize( intersector->getNumberOfRowsOfResMatrix() ); - const ConnType ret = intersector->getNumberOfColsOfResMatrix(); + const CConnType ret = intersector->getNumberOfColsOfResMatrix(); const double* src_coords[ dim ]; - ConnType src_nb_coords[ dim ]; - std::map< double, ConnType> src_coord_to_index[ dim ]; + CConnType src_nb_coords[ dim ]; + std::map< double, CConnType> src_coord_to_index[ dim ]; for ( int j = 0; j < dim; ++j ) { src_coords [j] = src_mesh.getCoordsAlongAxis( _TMIC( j )); src_nb_coords[j] = static_cast(src_mesh.nbCellsAlongAxis ( _TMIC( j ))) + 1; - for (ConnType i = 0; i < src_nb_coords[j]; ++i ) + for (CConnType i = 0; i < src_nb_coords[j]; ++i ) src_coord_to_index[j].insert( std::make_pair( src_coords[j][i], i )); } - const ConnType tgtu_nb_cells = tgt_mesh.getNumberOfElements(); + const UConnType tgtu_nb_cells = tgt_mesh.getNumberOfElements(); IntersectorCU bbHelper(src_mesh, tgt_mesh); double bb[2*dim]; // loop on unstructured tgt cells - for(ConnType iT=0; iT > structIndices(1); - std::map< double, ConnType>::iterator coo_ind; + typename std::map< double, CConnType>::iterator coo_ind; for ( int j = 0; j < dim; ++j ) { coo_ind = src_coord_to_index[j].lower_bound( bb[2*j+1] - eps ); if ( coo_ind == src_coord_to_index[j].end() ) --coo_ind; - ConnType max_i = coo_ind->second; + CConnType max_i = coo_ind->second; coo_ind = src_coord_to_index[j].upper_bound( bb[2*j ] + eps ); if ( coo_ind != src_coord_to_index[j].begin() ) --coo_ind; - ConnType min_i = coo_ind->second; + CConnType min_i = coo_ind->second; std::vector< std::vector< CConnType > > newStructIndices; for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd ) { - for ( ConnType i = min_i; i < max_i; ++i ) + for ( CConnType i = min_i; i < max_i; ++i ) { std::vector< CConnType > index = structIndices[iInd]; index.push_back( i ); @@ -214,14 +215,17 @@ namespace INTERP_KERNEL //================================================================================ template - ConnType InterpolationCU::interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method) + typename MyUMeshType::MyConnType InterpolationCU::interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method) { + typedef typename MyCMeshType::MyConnType CConnType; + typedef typename MyUMeshType::MyConnType UConnType; + MatrixType revResult; - ConnType sizeT = interpolateMeshes( meshT, meshS, revResult, method ); - ConnType sizeS = revResult.size(); + CConnType sizeT = interpolateMeshes( meshT, meshS, revResult, method ); + UConnType sizeS = revResult.size(); result.resize( sizeT ); - for ( ConnType iS = 0; iS < sizeS; ++iS ) + for ( CConnType iS = 0; iS < sizeS; ++iS ) { typename MatrixType::value_type & row = revResult[iS]; typename MatrixType::value_type::iterator iT_surf = row.begin(); diff --git a/src/INTERP_KERNEL/InterpolationCurve.hxx b/src/INTERP_KERNEL/InterpolationCurve.hxx index a194cf3cd..af9332319 100755 --- a/src/INTERP_KERNEL/InterpolationCurve.hxx +++ b/src/INTERP_KERNEL/InterpolationCurve.hxx @@ -35,7 +35,7 @@ namespace INTERP_KERNEL // Main function to interpolate template - int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, + typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result, const std::string& method); }; diff --git a/src/INTERP_KERNEL/InterpolationCurve.txx b/src/INTERP_KERNEL/InterpolationCurve.txx index 6bd9beeb0..1718d9ca2 100755 --- a/src/INTERP_KERNEL/InterpolationCurve.txx +++ b/src/INTERP_KERNEL/InterpolationCurve.txx @@ -73,7 +73,7 @@ namespace INTERP_KERNEL */ template template - int InterpolationCurve::interpolateMeshes (const MyMeshType& myMeshS, + typename MyMeshType::MyConnType InterpolationCurve::interpolateMeshes (const MyMeshType& myMeshS, const MyMeshType& myMeshT, MatrixType& result, const std::string& method) @@ -187,17 +187,17 @@ namespace INTERP_KERNEL /****************************************************/ long start_intersection = clock(); const ConnType *connIndxT = myMeshT.getConnectivityIndexPtr(); - for(int iT=0; iT intersecting_elems; + std::vector intersecting_elems; double bb[2*SPACEDIM]; intersector->getElemBB(bb,myMeshT,OTT::indFC(iT),nb_nodesT); my_tree.getIntersectingElems(bb, intersecting_elems); intersector->intersectCells(iT,intersecting_elems,result); counter += intersecting_elems.size(); } - int ret = intersector->getNumberOfColsOfResMatrix(); + ConnType ret = intersector->getNumberOfColsOfResMatrix(); delete intersector; if (InterpolationOptions::getPrintLevel() >= 1) diff --git a/src/INTERP_KERNEL/InterpolationPlanar.hxx b/src/INTERP_KERNEL/InterpolationPlanar.hxx index d27580404..76b52f86f 100755 --- a/src/INTERP_KERNEL/InterpolationPlanar.hxx +++ b/src/INTERP_KERNEL/InterpolationPlanar.hxx @@ -43,7 +43,7 @@ namespace INTERP_KERNEL // Main function to interpolate triangular and quadratic meshes template - int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result, const std::string& method); + typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result, const std::string& method); public: bool doRotate() const { return asLeafInterpPlanar().doRotate(); } double medianPlane() const { return asLeafInterpPlanar().medianPlane(); } diff --git a/src/INTERP_KERNEL/InterpolationPlanar.txx b/src/INTERP_KERNEL/InterpolationPlanar.txx index 264912bc6..0527ffda9 100755 --- a/src/INTERP_KERNEL/InterpolationPlanar.txx +++ b/src/INTERP_KERNEL/InterpolationPlanar.txx @@ -114,7 +114,7 @@ namespace INTERP_KERNEL */ template template - int InterpolationPlanar::interpolateMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, MatrixType& result, const std::string& method) + typename MyMeshType::MyConnType InterpolationPlanar::interpolateMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, MatrixType& result, const std::string& method) { static const int SPACEDIM=MyMeshType::MY_SPACEDIM; typedef typename MyMeshType::MyConnType ConnType; @@ -397,12 +397,12 @@ namespace INTERP_KERNEL /* Loop on the target cells - core of the algorithm */ /****************************************************/ long start_intersection=clock(); - long nbelem_type=myMeshT.getNumberOfElements(); + ConnType nbelem_type=myMeshT.getNumberOfElements(); const ConnType *connIndxT=myMeshT.getConnectivityIndexPtr(); - for(int iT=0; iT intersecting_elems; + std::vector intersecting_elems; double bb[2*SPACEDIM]; intersector->getElemBB(bb,myMeshT,OTT::indFC(iT),nb_nodesT); my_tree.getIntersectingElems(bb, intersecting_elems); @@ -410,7 +410,7 @@ namespace INTERP_KERNEL counter+=intersecting_elems.size(); intersecting_elems.clear(); } - int ret=intersector->getNumberOfColsOfResMatrix(); + ConnType ret=intersector->getNumberOfColsOfResMatrix(); delete intersector; if (InterpolationOptions::getPrintLevel() >=1) diff --git a/src/INTERP_KERNEL/Intersector3DP0P0.hxx b/src/INTERP_KERNEL/Intersector3DP0P0.hxx index ccb8ed349..987fd7f29 100644 --- a/src/INTERP_KERNEL/Intersector3DP0P0.hxx +++ b/src/INTERP_KERNEL/Intersector3DP0P0.hxx @@ -30,8 +30,8 @@ namespace INTERP_KERNEL { public: Intersector3DP0P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/Intersector3DP0P0.txx b/src/INTERP_KERNEL/Intersector3DP0P0.txx index 7b3db0bc5..86fed9bac 100644 --- a/src/INTERP_KERNEL/Intersector3DP0P0.txx +++ b/src/INTERP_KERNEL/Intersector3DP0P0.txx @@ -31,13 +31,13 @@ namespace INTERP_KERNEL } template - int Intersector3DP0P0::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP0P0::getNumberOfRowsOfResMatrix() const { return Intersector3D::_target_mesh.getNumberOfElements(); } template - int Intersector3DP0P0::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP0P0::getNumberOfColsOfResMatrix() const { return Intersector3D::_src_mesh.getNumberOfElements(); } diff --git a/src/INTERP_KERNEL/Intersector3DP0P1.hxx b/src/INTERP_KERNEL/Intersector3DP0P1.hxx index 0c599f04f..7032d1e11 100644 --- a/src/INTERP_KERNEL/Intersector3DP0P1.hxx +++ b/src/INTERP_KERNEL/Intersector3DP0P1.hxx @@ -30,8 +30,8 @@ namespace INTERP_KERNEL { public: Intersector3DP0P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/Intersector3DP0P1.txx b/src/INTERP_KERNEL/Intersector3DP0P1.txx index 62a632cae..f9e067da2 100644 --- a/src/INTERP_KERNEL/Intersector3DP0P1.txx +++ b/src/INTERP_KERNEL/Intersector3DP0P1.txx @@ -31,13 +31,13 @@ namespace INTERP_KERNEL } template - int Intersector3DP0P1::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP0P1::getNumberOfRowsOfResMatrix() const { return Intersector3D::_target_mesh.getNumberOfNodes(); } template - int Intersector3DP0P1::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP0P1::getNumberOfColsOfResMatrix() const { return Intersector3D::_src_mesh.getNumberOfElements(); } diff --git a/src/INTERP_KERNEL/Intersector3DP1P0.hxx b/src/INTERP_KERNEL/Intersector3DP1P0.hxx index fbaac7a69..3a310c801 100644 --- a/src/INTERP_KERNEL/Intersector3DP1P0.hxx +++ b/src/INTERP_KERNEL/Intersector3DP1P0.hxx @@ -30,8 +30,8 @@ namespace INTERP_KERNEL { public: Intersector3DP1P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/Intersector3DP1P0.txx b/src/INTERP_KERNEL/Intersector3DP1P0.txx index 792607101..235babdfc 100644 --- a/src/INTERP_KERNEL/Intersector3DP1P0.txx +++ b/src/INTERP_KERNEL/Intersector3DP1P0.txx @@ -31,13 +31,13 @@ namespace INTERP_KERNEL } template - int Intersector3DP1P0::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP1P0::getNumberOfRowsOfResMatrix() const { return Intersector3D::_target_mesh.getNumberOfElements(); } template - int Intersector3DP1P0::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP1P0::getNumberOfColsOfResMatrix() const { return Intersector3D::_src_mesh.getNumberOfNodes(); } diff --git a/src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx b/src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx index 4871adf48..79532b6ea 100644 --- a/src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx +++ b/src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx @@ -30,8 +30,8 @@ namespace INTERP_KERNEL { public: Intersector3DP1P0Bary(const MyMeshType& targetMesh, const MyMeshType& srcMesh); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/Intersector3DP1P0Bary.txx b/src/INTERP_KERNEL/Intersector3DP1P0Bary.txx index 4c8498e7a..40a20eee0 100644 --- a/src/INTERP_KERNEL/Intersector3DP1P0Bary.txx +++ b/src/INTERP_KERNEL/Intersector3DP1P0Bary.txx @@ -31,13 +31,13 @@ namespace INTERP_KERNEL } template - int Intersector3DP1P0Bary::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP1P0Bary::getNumberOfRowsOfResMatrix() const { return Intersector3D::_target_mesh.getNumberOfElements(); } template - int Intersector3DP1P0Bary::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP1P0Bary::getNumberOfColsOfResMatrix() const { return Intersector3D::_src_mesh.getNumberOfNodes(); } diff --git a/src/INTERP_KERNEL/Intersector3DP1P1.hxx b/src/INTERP_KERNEL/Intersector3DP1P1.hxx index e337bf471..b5c1374e7 100644 --- a/src/INTERP_KERNEL/Intersector3DP1P1.hxx +++ b/src/INTERP_KERNEL/Intersector3DP1P1.hxx @@ -30,8 +30,8 @@ namespace INTERP_KERNEL { public: Intersector3DP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const; + typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/Intersector3DP1P1.txx b/src/INTERP_KERNEL/Intersector3DP1P1.txx index 73bdbecb6..5e8947916 100644 --- a/src/INTERP_KERNEL/Intersector3DP1P1.txx +++ b/src/INTERP_KERNEL/Intersector3DP1P1.txx @@ -31,13 +31,13 @@ namespace INTERP_KERNEL } template - int Intersector3DP1P1::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP1P1::getNumberOfRowsOfResMatrix() const { return Intersector3D::_target_mesh.getNumberOfNodes(); } template - int Intersector3DP1P1::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType Intersector3DP1P1::getNumberOfColsOfResMatrix() const { return Intersector3D::_src_mesh.getNumberOfNodes(); } diff --git a/src/INTERP_KERNEL/IntersectorCU.hxx b/src/INTERP_KERNEL/IntersectorCU.hxx index e0b632964..7c3214e1d 100644 --- a/src/INTERP_KERNEL/IntersectorCU.hxx +++ b/src/INTERP_KERNEL/IntersectorCU.hxx @@ -47,8 +47,8 @@ namespace INTERP_KERNEL void getUElemBB(double* bb, UConnType iP); void getUCoordinates(UConnType icell, std::vector& coords); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + UConnType getNumberOfRowsOfResMatrix() const; + CConnType getNumberOfColsOfResMatrix() const; void intersectCells(CConnType icellU, const std::vector& icellC, MyMatrix& res); double intersectGeometry(CConnType icellT, const std::vector& icellC) { return asLeaf().intersectGeometry(icellT,icellC); } protected: @@ -61,7 +61,7 @@ namespace INTERP_KERNEL const MyUMeshType& _meshU; const double * _coordsC[SPACEDIM]; - int _nbCellsC[SPACEDIM]; + CConnType _nbCellsC[SPACEDIM]; const MyCMeshType& _meshC; }; diff --git a/src/INTERP_KERNEL/IntersectorCU.txx b/src/INTERP_KERNEL/IntersectorCU.txx index 6fc333f7a..13f334a80 100644 --- a/src/INTERP_KERNEL/IntersectorCU.txx +++ b/src/INTERP_KERNEL/IntersectorCU.txx @@ -123,12 +123,12 @@ namespace INTERP_KERNEL } _CU_TEMPLATE - int _INTERSECTOR_CU_::getNumberOfRowsOfResMatrix() const + typename MyUMeshType::MyConnType _INTERSECTOR_CU_::getNumberOfRowsOfResMatrix() const { return _meshU.getNumberOfElements(); } _CU_TEMPLATE - int _INTERSECTOR_CU_::getNumberOfColsOfResMatrix() const + typename MyCMeshType::MyConnType _INTERSECTOR_CU_::getNumberOfColsOfResMatrix() const { return static_cast(_meshC.getNumberOfElements()); } diff --git a/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.hxx b/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.hxx index b9d525f8a..cef886d51 100644 --- a/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.hxx +++ b/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.hxx @@ -36,8 +36,8 @@ namespace INTERP_KERNEL public: MappedBarycentric2DIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.txx b/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.txx index 4088f3fdc..4939806e9 100644 --- a/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.txx +++ b/src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.txx @@ -55,7 +55,7 @@ namespace INTERP_KERNEL if(SPACEDIM==3) PlanarIntersector::projectionThis(&CoordsS[0],&CoordsTTmp[0],ToConnType(CoordsS.size())/SPACEDIM,nbOfNodesT); const ConnType *startOfCellNodeConnT=PlanarIntersector::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[icellT]); - for(int nodeIdT=0;nodeIdT::ind2C(startOfCellNodeConnT[nodeIdT])]; if( PointLocatorAlgos::isElementContainsPointAlg2D(&CoordsTTmp[nodeIdT*SPACEDIM],&CoordsS[0],4,PlanarIntersector::_precision) ) @@ -74,7 +74,7 @@ namespace INTERP_KERNEL resLoc[3] = mco[0] * (1.-mco[1]); const ConnType *startOfCellNodeConnS=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[*iter]); - for(int nodeIdS=0;nodeIdS<4;nodeIdS++) + for(ConnType nodeIdS=0;nodeIdS<4;nodeIdS++) { if(fabs(resLoc[nodeIdS])>PlanarIntersector::_precision) { @@ -96,13 +96,13 @@ namespace INTERP_KERNEL } template - int MappedBarycentric2DIntersectorP1P1::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType MappedBarycentric2DIntersectorP1P1::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfNodes(); } template - int MappedBarycentric2DIntersectorP1P1::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType MappedBarycentric2DIntersectorP1P1::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfNodes(); } diff --git a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx index 8f125a974..b59a9bb55 100644 --- a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx +++ b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx @@ -37,8 +37,8 @@ namespace INTERP_KERNEL Planar2D1DIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; const typename PlanarIntersector::DuplicateFacesType* getIntersectFaces() const { return &_intersect_faces; diff --git a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx index ecc8c1e4c..5c85b45e7 100644 --- a/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx @@ -33,13 +33,13 @@ namespace INTERP_KERNEL } template - int Planar2D1DIntersectorP0P0::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType Planar2D1DIntersectorP0P0::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfElements(); } template - int Planar2D1DIntersectorP0P0::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType Planar2D1DIntersectorP0P0::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfElements(); } @@ -47,12 +47,12 @@ namespace INTERP_KERNEL template void Planar2D1DIntersectorP0P0::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) { - int nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; + ConnType nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; typename MyMatrix::value_type& resRow=res[icellT]; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - int iS=*iter; - int nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; + ConnType iS=*iter; + ConnType nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; bool isColinear = false; double surf=intersectGeometry1D(OTT::indFC(icellT),OTT::indFC(iS), nbNodesT,nbNodesS, isColinear); @@ -69,7 +69,7 @@ namespace INTERP_KERNEL } else { - std::set targetCellSet; + std::set targetCellSet; targetCellSet.insert(icellT); _intersect_faces.insert(std::make_pair(iS, targetCellSet)); } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx index 5b23d1862..9beb3c2db 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx @@ -36,8 +36,8 @@ namespace INTERP_KERNEL protected: PlanarIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); /*! * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType. diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx index 478ff1c15..02d38c4df 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P0.txx @@ -33,13 +33,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP0P0::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P0::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfElements(); } template - int PlanarIntersectorP0P0::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P0::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfElements(); } @@ -47,12 +47,12 @@ namespace INTERP_KERNEL template void PlanarIntersectorP0P0::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) { - int nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; + ConnType nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; typename MyMatrix::value_type& resRow=res[icellT]; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - int iS=*iter; - int nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; + ConnType iS=*iter; + ConnType nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; double surf=intersectGeometry(OTT::indFC(icellT),OTT::indFC(iS),nbNodesT,nbNodesS); surf=PlanarIntersector::getValueRegardingOption(surf); if(surf!=0.) diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx index f05225b94..2095c2ce6 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx @@ -38,8 +38,8 @@ namespace INTERP_KERNEL PlanarIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; /*! * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType. */ diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx index e5a60d431..25a38bb9a 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx @@ -35,13 +35,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP0P1::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P1::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfNodes(); } template - int PlanarIntersectorP0P1::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P1::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfElements(); } @@ -52,13 +52,13 @@ namespace INTERP_KERNEL template void PlanarIntersectorP0P1::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) { - int nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; + ConnType nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; double triangle[9]; double quadrangle[12]; std::vector sourceCellCoords; int orientation=1; const ConnType *startOfCellNodeConn=PlanarIntersector::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[icellT]); - for(int nodeIdT=0;nodeIdT::coo2C(startOfCellNodeConn[nodeIdT]); std::copy(PlanarIntersector::_coordsT+curNodeTInCmode*SPACEDIM, @@ -66,9 +66,9 @@ namespace INTERP_KERNEL typename MyMatrix::value_type& resRow=res[curNodeTInCmode]; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - int iS=*iter; + ConnType iS=*iter; PlanarIntersector::getRealSourceCoordinates(OTT::indFC(iS),sourceCellCoords); - for(int subTriT=1;subTriT<=nbNodesT-2;subTriT++) + for(ConnType subTriT=1;subTriT<=nbNodesT-2;subTriT++) { std::copy(PlanarIntersector::_coordsT+OTT::coo2C(startOfCellNodeConn[(nodeIdT+subTriT)%nbNodesT])*SPACEDIM, PlanarIntersector::_coordsT+OTT::coo2C(startOfCellNodeConn[(nodeIdT+subTriT)%nbNodesT])*SPACEDIM+SPACEDIM, diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx index 14a0ce60b..214cb98ff 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx @@ -37,8 +37,8 @@ namespace INTERP_KERNEL PlanarIntersectorP0P1Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; /*! * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType. */ diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx index b7c8ab25f..63d735fff 100755 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx @@ -49,13 +49,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP0P1Bary::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P1Bary::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfNodes(); } template - int PlanarIntersectorP0P1Bary::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P1Bary::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfElements(); } @@ -76,12 +76,12 @@ namespace INTERP_KERNEL for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { std::vector srcCellCoords,srcCellCoordsTmp,nodeCeffs; - int iS=*iter; + ConnType iS=*iter; NormalizedCellType tS=PlanarIntersector::_meshS.getTypeOfElement(OTT::indFC(iS)); bool isSourceQuad=CellModel::GetCellModel(tS).isQuadratic(); PlanarIntersector::getRealSourceCoordinates(OTT::indFC(iS),srcCellCoords); std::vector *srcCoords(&srcCellCoords); - int srcNbNodes = ToConnType(srcCellCoords.size())/SPACEDIM; + ConnType srcNbNodes = ToConnType(srcCellCoords.size())/SPACEDIM; if(SPACEDIM==3) { srcCellCoordsTmp=srcCellCoords; diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx index c0b91f5d7..790982344 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx @@ -36,8 +36,8 @@ namespace INTERP_KERNEL public: PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx index 949598023..25de970a8 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx @@ -46,7 +46,7 @@ namespace INTERP_KERNEL const ConnType *startOfCellNodeConnT=PlanarIntersector::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[icellT]); std::vector coordsTarget; PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),coordsTarget); - int nbNodesT=ToConnType(coordsTarget.size())/SPACEDIM; + ConnType nbNodesT=ToConnType(coordsTarget.size())/SPACEDIM; ii=0; for(typename std::vector::const_iterator iter2=icellsS.begin();iter2!=icellsS.end();iter2++,ii++) { @@ -54,7 +54,7 @@ namespace INTERP_KERNEL std::vector tmpTarget(coordsTarget); if(SPACEDIM==3) PlanarIntersector::projectionThis(&tmpSource[0],&tmpTarget[0],ToConnType(tmpSource.size())/SPACEDIM,nbNodesT); - for(int nodeIdT=0;nodeIdT::isElementContainsPointAlg2D(&tmpTarget[0]+nodeIdT*SPACEDIM,&tmpSource[0],ToConnType(tmpSource.size())/SPACEDIM,PlanarIntersector::_precision)) { @@ -69,13 +69,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP0P1PL::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P1PL::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfNodes(); } template - int PlanarIntersectorP0P1PL::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP0P1PL::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfElements(); } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx index cbc7f7163..94630f709 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx @@ -37,8 +37,8 @@ namespace INTERP_KERNEL PlanarIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; /*! * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType. */ diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx index 8db87d352..f10ea00b6 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0.txx @@ -34,13 +34,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP1P0::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P0::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfElements(); } template - int PlanarIntersectorP1P0::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P0::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfNodes(); } @@ -61,7 +61,7 @@ namespace INTERP_KERNEL typename MyMatrix::value_type& resRow=res[icellT]; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - int iS=*iter; + ConnType iS=*iter; int nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; const ConnType *startOfCellNodeConn=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[iS]); for(int nodeIdS=0;nodeIdS& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; /*! * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType. */ diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx index 009079a52..442177dd4 100755 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx @@ -51,13 +51,13 @@ namespace INTERP_KERNEL } PLAN_INTER_TEMPLATE - int PLAN_INTERSECTOR::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PLAN_INTERSECTOR::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfElements(); } PLAN_INTER_TEMPLATE - int PLAN_INTERSECTOR::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PLAN_INTERSECTOR::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfNodes(); } @@ -76,7 +76,7 @@ namespace INTERP_KERNEL // target cell data PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),tgtCellCoords); std::vector * tgtCoords = & tgtCellCoords; - int tgtNbNodes = ToConnType(tgtCellCoords.size())/SPACEDIM; + ConnType tgtNbNodes = ToConnType(tgtCellCoords.size())/SPACEDIM; NormalizedCellType tT=PlanarIntersector::_meshT.getTypeOfElement(OTT::indFC(icellT)); bool isTargetQuad=CellModel::GetCellModel(tT).isQuadratic(); @@ -85,7 +85,7 @@ namespace INTERP_KERNEL // treat each source triangle for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - int iS=*iter; + ConnType iS=*iter; PlanarIntersector::getRealSourceCoordinates(OTT::indFC(iS),srcTriaCoords); const ConnType *startOfCellNodeConn=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[iS]); if(SPACEDIM==3) diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx index 8a14b069d..a01a10026 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx @@ -36,8 +36,8 @@ namespace INTERP_KERNEL public: PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation); void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx index 1fb758943..6cf35469b 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx @@ -93,13 +93,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP1P0PL::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P0PL::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfElements(); } template - int PlanarIntersectorP1P0PL::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P0PL::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfNodes(); } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx index b4873ffd0..430771522 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx @@ -37,8 +37,8 @@ namespace INTERP_KERNEL PlanarIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); public: void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; double intersectGeometryGeneral(const std::vector& targetCoords, const std::vector& sourceCoords) { return asLeaf().intersectGeometryGeneral(targetCoords,sourceCoords); } protected: diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx index 3834fcaf4..32cd8e6f0 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx @@ -35,13 +35,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP1P1::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P1::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfNodes(); } template - int PlanarIntersectorP1P1::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P1::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfNodes(); } @@ -66,7 +66,7 @@ namespace INTERP_KERNEL typename MyMatrix::value_type& resRow=res[curNodeTInCmode]; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { - int iS=*iter; + ConnType iS=*iter; int nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; const ConnType *startOfCellNodeConnS=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[iS]); for(int nodeIdS=0;nodeIdS& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; + ConnType getNumberOfRowsOfResMatrix() const; + ConnType getNumberOfColsOfResMatrix() const; }; } diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx index 557538e5c..ed82199f6 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx @@ -42,7 +42,7 @@ namespace INTERP_KERNEL { std::vector CoordsT; PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),CoordsT); - int nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM; + ConnType nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM; for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { NormalizedCellType tS=PlanarIntersector::_meshS.getTypeOfElement(OTT::indFC(*iter)); @@ -84,13 +84,13 @@ namespace INTERP_KERNEL } template - int PlanarIntersectorP1P1PL::getNumberOfRowsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P1PL::getNumberOfRowsOfResMatrix() const { return PlanarIntersector::_meshT.getNumberOfNodes(); } template - int PlanarIntersectorP1P1PL::getNumberOfColsOfResMatrix() const + typename MyMeshType::MyConnType PlanarIntersectorP1P1PL::getNumberOfColsOfResMatrix() const { return PlanarIntersector::_meshS.getNumberOfNodes(); } diff --git a/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx b/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx index ecc0ddb8d..57d42e9d9 100644 --- a/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx @@ -104,13 +104,13 @@ namespace INTERP_KERNEL const CellModel& cellModelCell=CellModel::GetCellModel(normCellType); const MyMeshType& src_mesh = Intersector3D::_src_mesh; unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? src_mesh.getNumberOfNodesOfElement(cellSrcIdx) : cellModelCell.getNumberOfNodes(); - int *polyNodes=new int[nbOfNodes4Type]; + mcIdType *polyNodes=new mcIdType[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::indFC(*iterCellS), src_mesh); - polyNodes[i] = globalNodeNum; + const ConnType globalNodeNum = getGlobalNumberOfNode(i, OTT::indFC(*iterCellS), src_mesh); + polyNodes[i] = ToIdType( globalNodeNum ); polyCoords[i] = const_cast(src_mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*globalNodeNum); } diff --git a/src/INTERP_KERNEL/VolSurfFormulae.hxx b/src/INTERP_KERNEL/VolSurfFormulae.hxx index f7269bfcf..da543be2f 100644 --- a/src/INTERP_KERNEL/VolSurfFormulae.hxx +++ b/src/INTERP_KERNEL/VolSurfFormulae.hxx @@ -469,10 +469,10 @@ namespace INTERP_KERNEL { std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1; double volume=0.; - const int *work=connec; + const ConnType *work=connec; for(std::size_t iFace=0;iFace(work,nbOfNodesOfCurFace,coords,normal);