X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshCell.hxx;h=562de10a82bc29216812813d3fc35e0da3e6eb74;hb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115;hp=aeae71851cfcb374036884723534c88a994dbcdb;hpb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MeshCell.hxx b/src/SMDS/SMDS_MeshCell.hxx index aeae71851..562de10a8 100644 --- a/src/SMDS/SMDS_MeshCell.hxx +++ b/src/SMDS/SMDS_MeshCell.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -45,10 +45,12 @@ public: static const std::vector& fromVtkOrder(VTKCellType vtkType); static const std::vector& fromVtkOrder(SMDSAbs_EntityType smdsType); - static const std::vector& reverseSmdsOrder(SMDSAbs_EntityType smdsType); - static const std::vector& interlacedSmdsOrder(SMDSAbs_EntityType smdsType); + static const std::vector& reverseSmdsOrder(SMDSAbs_EntityType smdsType, + const size_t nbNodes=0); + static const std::vector& interlacedSmdsOrder(SMDSAbs_EntityType smdsType, + const size_t nbNodes=0); - template< class VECT > + template< class VECT > // interlacedIDs[i] = smdsIDs[ indices[ i ]] static void applyInterlace( const std::vector& interlace, VECT & data) { if ( interlace.empty() ) return; @@ -57,6 +59,15 @@ public: tmpData[i] = data[ interlace[i] ]; data.swap( tmpData ); } + template< class VECT > // interlacedIDs[ indices[ i ]] = smdsIDs[i] + static void applyInterlaceRev( const std::vector& interlace, VECT & data) + { + if ( interlace.empty() ) return; + VECT tmpData( data.size() ); + for ( size_t i = 0; i < data.size(); ++i ) + tmpData[ interlace[i] ] = data[i]; + data.swap( tmpData ); + } static int nbCells;