From: jfa Date: Tue, 4 Aug 2009 12:22:34 +0000 (+0000) Subject: Correct bugs, connected with 0D Elements implementation (IMP 20089, BUG 21300) X-Git-Tag: V5_1_3rc1~124 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f4ba12e4603932bf250717988519db4dedce4b28;p=modules%2Fsmesh.git Correct bugs, connected with 0D Elements implementation (IMP 20089, BUG 21300) --- diff --git a/src/SMDS/SMDSAbs_ElementType.hxx b/src/SMDS/SMDSAbs_ElementType.hxx index e759adb91..d907064cd 100644 --- a/src/SMDS/SMDSAbs_ElementType.hxx +++ b/src/SMDS/SMDSAbs_ElementType.hxx @@ -22,7 +22,7 @@ // SMESH SMDS : implementaion of Salome mesh data structure // File : SMDSAbs_ElementType.hxx // Module : SMESH -// + #ifndef _SMDSAbs_ElementType_HeaderFile #define _SMDSAbs_ElementType_HeaderFile @@ -33,10 +33,10 @@ enum SMDSAbs_ElementType { SMDSAbs_All, SMDSAbs_Node, - SMDSAbs_0DElement, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, + SMDSAbs_0DElement, SMDSAbs_NbElementTypes }; diff --git a/src/SMDS/SMDS_MeshInfo.hxx b/src/SMDS/SMDS_MeshInfo.hxx index 222782488..ca0b5ab4c 100644 --- a/src/SMDS/SMDS_MeshInfo.hxx +++ b/src/SMDS/SMDS_MeshInfo.hxx @@ -100,38 +100,43 @@ inline SMDS_MeshInfo::SMDS_MeshInfo(): myNbPolyhedrons(0) { // Number of nodes in standard element types - // n v f e 0 - // o o a d d - // d l c g - // e e e - // -------------- - // 1 * + // n v f e 0 n + // o o a d d o + // d l c g d + // e e e e + // s + // ----------------- + // 0 * + // 1 . * // 2 * - // 3 * - // 4 * * * + // 3 . * + // 4 * . . // 5 * - // 6 * * + // 6 * . // 7 - // 8 * * + // 8 * . // 9 // 10 * - // 11 - // 12 + // 11 * + // 12 * // 13 * - // 14 + // 14 * // 15 * - // 16 + // 16 * // 17 // 18 // 19 // 20 * // // So to have a unique index for each type basing on nb of nodes, we use a shift: - myShift.resize(SMDSAbs_Volume + 1, 0); - myShift[ SMDSAbs_Face ] = +8; // 3->11, 4->12, 6->14, 8->16 - myShift[ SMDSAbs_Edge ] = -2; // 2->0, 4->2 + myShift.resize(SMDSAbs_NbElementTypes, 0); + + myShift[ SMDSAbs_Face ] = +8; // 3->11, 4->12, 6->14, 8->16 + myShift[ SMDSAbs_Edge ] = -2; // 2->0, 4->2 + myShift[ SMDSAbs_0DElement ] = +2; // 1->3 myNb.resize( index( SMDSAbs_Volume,20 ) + 1, NULL); + myNb[ index( SMDSAbs_Node,1 )] = & myNbNodes; myNb[ index( SMDSAbs_0DElement,1 )] = & myNb0DElements; @@ -153,11 +158,13 @@ inline SMDS_MeshInfo::SMDS_MeshInfo(): myNb[ index( SMDSAbs_Volume, 15)] = & myNbQuadPrisms; myNb[ index( SMDSAbs_Volume, 20)] = & myNbQuadHexas; } + inline void // Clear SMDS_MeshInfo::Clear() { for ( int i=0; iGetType(); const char* aRootNames[] = { - "Compound Groups", "Groups of Nodes", "Group of 0D Elements", - "Groups of Edges", "Groups of Faces", "Groups of Volumes" }; + "Compound Groups", "Groups of Nodes", "Groups of Edges", + "Groups of Faces", "Groups of Volumes", "Groups of 0D Elements" }; // Currently, groups with heterogenous content are not supported if ( aType != SMESH::ALL ) {