X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingMappedExtrudedMesh.cxx;h=54c860cc42682093dee56cb75e0f456e4d232e59;hb=325b22fcfccbdeb47aead09f366bd202ba9f8869;hp=021b5add4feb842f36dcd884e53a3d269cae844a;hpb=c5f9a2bb5f775564b5bd81de58dfa708bcef020d;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingMappedExtrudedMesh.cxx b/src/MEDCoupling/MEDCouplingMappedExtrudedMesh.cxx index 021b5add4..54c860cc4 100644 --- a/src/MEDCoupling/MEDCouplingMappedExtrudedMesh.cxx +++ b/src/MEDCoupling/MEDCouplingMappedExtrudedMesh.cxx @@ -146,7 +146,7 @@ MEDCouplingMappedExtrudedMesh::MEDCouplingMappedExtrudedMesh(const MEDCouplingMa } } -int MEDCouplingMappedExtrudedMesh::getNumberOfCells() const +std::size_t MEDCouplingMappedExtrudedMesh::getNumberOfCells() const { return _mesh2D->getNumberOfCells()*_mesh1D->getNumberOfCells(); } @@ -246,15 +246,15 @@ void MEDCouplingMappedExtrudedMesh::checkDeepEquivalOnSameNodesWith(const MEDCou throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::checkDeepEquivalOnSameNodesWith : not implemented yet !"); } -INTERP_KERNEL::NormalizedCellType MEDCouplingMappedExtrudedMesh::getTypeOfCell(int cellId) const +INTERP_KERNEL::NormalizedCellType MEDCouplingMappedExtrudedMesh::getTypeOfCell(std::size_t cellId) const { const int *ids(_mesh3D_ids->begin()); - int nbOf3DCells(_mesh3D_ids->getNumberOfTuples()); + std::size_t nbOf3DCells(_mesh3D_ids->getNumberOfTuples()); const int *where(std::find(ids,ids+nbOf3DCells,cellId)); if(where==ids+nbOf3DCells) throw INTERP_KERNEL::Exception("Invalid cellId specified >= getNumberOfCells() !"); - int nbOfCells2D(_mesh2D->getNumberOfCells()); - int locId(((int)std::distance(ids,where))%nbOfCells2D); + std::size_t nbOfCells2D(_mesh2D->getNumberOfCells()); + std::size_t locId((std::distance(ids,where))%nbOfCells2D); INTERP_KERNEL::NormalizedCellType tmp(_mesh2D->getTypeOfCell(locId)); return INTERP_KERNEL::CellModel::GetCellModel(tmp).getExtrudedType(); } @@ -322,11 +322,11 @@ DataArrayInt *MEDCouplingMappedExtrudedMesh::computeEffectiveNbOfNodesPerCell() return computeNbOfNodesPerCell(); } -int MEDCouplingMappedExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const +std::size_t MEDCouplingMappedExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const { - int ret(0); - int nbOfCells2D(_mesh2D->getNumberOfCells()); - for(int i=0;igetNumberOfCells()); + for(std::size_t i=0;igetTypeOfCell(i)); if(INTERP_KERNEL::CellModel::GetCellModel(t).getExtrudedType()==type) @@ -335,7 +335,7 @@ int MEDCouplingMappedExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::Norma return ret*_mesh1D->getNumberOfCells(); } -void MEDCouplingMappedExtrudedMesh::getNodeIdsOfCell(int cellId, std::vector& conn) const +void MEDCouplingMappedExtrudedMesh::getNodeIdsOfCell(std::size_t cellId, std::vector& conn) const { int nbOfCells2D(_mesh2D->getNumberOfCells()); int nbOfNodes2D(_mesh2D->getNumberOfNodes());