- _compte=true;
-
- _mapNbTypes[SALOME_MED::MED_NODE]=1;
- // On compte les aretes MED_SEG2 ou MED_SEG3
- // On range les elements dans les vecteurs correspondants
-
- _mapIndToSeqElts[SALOME_MED::MED_SEG2]=_indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_SEG3]=_indexElts++;
- _mapIndToVectTypes[SALOME_MED::MED_EDGE]=_indexEnts++;
-
- int trouveSeg2=0;
- int trouveSeg3=0;
- SALOME_MED::medGeometryElement medElement;
- SMDS_MeshEdgesIterator itEdges(_meshDS);
- for (;itEdges.More();itEdges.Next())
- {
- const Handle(SMDS_MeshElement)& elem = itEdges.Value();
- int nb_of_nodes = elem->NbNodes();
-
- switch (nb_of_nodes)
- {
- case 2 :
- {
- medElement=SALOME_MED::MED_SEG2;
- if (trouveSeg2==0)
- {
- trouveSeg2=1;
- _TypesId[SALOME_MED::MED_EDGE].push_back(SALOME_MED::MED_SEG2);
-
- }
- break;
- }
- case 3 :
- {
- medElement=SALOME_MED::MED_SEG3;
- if (trouveSeg3==0)
- {
- trouveSeg3=1;
- _TypesId[SALOME_MED::MED_EDGE].push_back(SALOME_MED::MED_SEG3);
- }
- break;
- }
- }
- int index=_mapIndToSeqElts[medElement];
- SCRUTE(index);
- // Traitement de l arete
- int longueur=_seq_elemId[index]->length();
- _seq_elemId[index]->length(longueur + nb_of_nodes);
-
- for (int k=0; k<nb_of_nodes; k++)
- {
- _seq_elemId[index][longueur+k]=elem->GetConnection(k+1) +1;
- }
- }
-
- _mapNbTypes[SALOME_MED::MED_EDGE]=trouveSeg2 + trouveSeg3;
-
- // On compte les faces MED_TRIA3, MED_HEXA8, MED_TRIA6
- // On range les elements dans les vecteurs correspondants
- int trouveTria3=0;
- int trouveTria6=0;
- int trouveQuad4=0;
-
- _mapIndToSeqElts[SALOME_MED::MED_TRIA3]=_indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_TRIA6]=_indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_QUAD4]=_indexElts++;
- _mapIndToVectTypes[SALOME_MED::MED_FACE]=_indexEnts++;
-
- SMDS_MeshFacesIterator itFaces(_meshDS);
- for (;itFaces.More();itFaces.Next())
- {
-
- const Handle(SMDS_MeshElement)& elem = itFaces.Value();
- int nb_of_nodes = elem->NbNodes();
-
- switch (nb_of_nodes)
- {
- case 3 :
- {
- medElement=SALOME_MED::MED_TRIA3;
- if (trouveTria3==0)
- {
- trouveTria3=1;
- _TypesId[SALOME_MED::MED_FACE].push_back(SALOME_MED::MED_TRIA3);
- }
- break;
- }
- case 4 :
- {
- medElement=SALOME_MED::MED_QUAD4;
- if (trouveQuad4==0)
- {
- trouveQuad4=1;
- _TypesId[SALOME_MED::MED_FACE].push_back(SALOME_MED::MED_QUAD4);
- }
- break;
- }
- case 6 :
- {
- medElement=SALOME_MED::MED_TRIA6;
- if (trouveTria6==0)
- {
- trouveTria6=1;
- _TypesId[SALOME_MED::MED_FACE].push_back(SALOME_MED::MED_TRIA6);
- }
- break;
- }
- }
- int index=_mapIndToSeqElts[medElement];
- SCRUTE(index);
-
- // Traitement de la face
- // Attention La numérotation des noeuds Med commence a 1
-
-
- int longueur = _seq_elemId[index]->length();
- _seq_elemId[index]->length(longueur+nb_of_nodes);
-
- for (int k=0; k<nb_of_nodes; k++)
- {
- _seq_elemId[index][longueur+k]=elem->GetConnection(k+1) +1;
- }
-
- }
- _mapNbTypes[SALOME_MED::MED_FACE]=trouveTria3 + trouveTria6 + trouveQuad4;
-
- _mapIndToSeqElts[SALOME_MED::MED_HEXA8]=_indexElts++;
- _mapIndToVectTypes[SALOME_MED::MED_CELL]=_indexEnts++;
- int index=_mapIndToSeqElts[medElement];
-
- int trouveHexa8=0;
- SMDS_MeshVolumesIterator itVolumes(_meshDS);
- for (;itVolumes.More();itVolumes.Next())
- {
- const Handle(SMDS_MeshElement)& elem = itVolumes.Value();
-
- int nb_of_nodes = elem->NbNodes();
- medElement=SALOME_MED::MED_HEXA8;
- ASSERT(nb_of_nodes=8);
-
- if (trouveHexa8 == 0)
- {
- trouveHexa8=1;
- _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MED_HEXA8);
- };
- // Traitement de la maille
- int longueur=_seq_elemId[index]->length();
- _seq_elemId[index]->length(longueur+nb_of_nodes);
-
- for (int k=0; k<nb_of_nodes; k++)
- {
- _seq_elemId[index][longueur+k]=elem->GetConnection(k+1) +1;
- }