20 #ifndef _SMDS_MESHCELL_HXX_
21 #define _SMDS_MESHCELL_HXX_
35 virtual bool ChangeNodes(
const SMDS_MeshNode* nodes[],
const int nbNodes)= 0;
43 static const std::vector<int>& toVtkOrder(VTKCellType vtkType);
45 static const std::vector<int>& fromVtkOrder(VTKCellType vtkType);
49 const size_t nbNodes=0);
51 const size_t nbNodes=0);
53 template<
class VECT >
54 static void applyInterlace(
const std::vector<int>& interlace, VECT & data)
56 if ( interlace.size() < data.size() )
return;
57 VECT tmpData( data.size() );
58 for (
size_t i = 0; i < data.size(); ++i )
59 tmpData[i] = data[ interlace[i] ];
62 template<
class VECT >
63 static void applyInterlaceRev(
const std::vector<int>& interlace, VECT & data)
65 if ( interlace.size() < data.size() )
return;
66 VECT tmpData( data.size() );
67 for (
size_t i = 0; i < data.size(); ++i )
68 tmpData[ interlace[i] ] = data[i];