From: prascle Date: Thu, 5 May 2011 15:28:26 +0000 (+0000) Subject: PR: remove splitted tetrahedrons X-Git-Tag: V6_3_0b1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=75d1b278cae6d3a8649e5654d5aba390c67cbd28;p=modules%2Fsmesh.git PR: remove splitted tetrahedrons --- diff --git a/src/Tools/MeshCut/MeshCut_Cas.cxx b/src/Tools/MeshCut/MeshCut_Cas.cxx index 93cf55168..57e446c5f 100644 --- a/src/Tools/MeshCut/MeshCut_Cas.cxx +++ b/src/Tools/MeshCut/MeshCut_Cas.cxx @@ -13,7 +13,7 @@ using namespace std; */ void MESHCUT::cas1(int VN[6], int it4) { - + cutTetras.push_back(it4); // cout << "Cas 1 - it4=" << it4 << ", VN = " << VN[0] << " " << VN[1] << " " << VN[2] << " " << VN[3] << " " << VN[4] // << " " << VN[5] << " " << endl; @@ -230,7 +230,7 @@ void MESHCUT::cas1(int VN[6], int it4) */ void MESHCUT::cas2(int VN[6], int it4) { - + cutTetras.push_back(it4); // cout << "Cas 2 - it4=" << it4 << ", VN = " << VN[0] << " " << VN[1] << " " << VN[2] << " " << VN[3] << " " << VN[4] // << " " << VN[5] << " " << endl; @@ -624,7 +624,7 @@ void MESHCUT::cas2(int VN[6], int it4) */ void MESHCUT::cas3(int VN[6], int it4) { - + cutTetras.push_back(it4); // cout << "Cas 3 - it4="< MESHCUT::newXX, MESHCUT::newYY, MESHCUT::newZZ; std::map > MESHCUT::newCNX; std::map MESHCUT::cptNouvellesMailles; std::map > MESHCUT::GMplus, MESHCUT::GMmoins; +std::vector MESHCUT::cutTetras; float *MESHCUT::DNP; int *MESHCUT::POSN; @@ -254,7 +255,7 @@ int main(int argc, char *argv[]) else POSN[k] = 0; } - cout << chrono() << " - End of nodes classement above or below the cut plane" << endl; + cout << chrono() << " - End of nodes qualification above or below the cut plane" << endl; cout << "Start of iteration on tetra4" << endl; for (int it4 = 0; it4 < MAILLAGE1->EFFECTIFS_TYPES[TETRA4]; it4++) @@ -1028,8 +1029,8 @@ int main(int argc, char *argv[]) // cout << "Nouveaux noeuds, indice " << i << " : " << newXX[i] << " " << newYY[i] << " " << newZZ[i] << " " << endl; } - // Legacy mailles maillage 1 + - for (int itm = (int) POI1; itm <= (int) HEXA20; itm++) + // Legacy mailles maillage 1 (volumes seulement) + for (int itm = (int) TETRA4; itm <= (int) HEXA20; itm++) { TYPE_MAILLE tm = (TYPE_MAILLE) itm; if (tm != TETRA4 && tm != PYRAM5 && tm != PENTA6) @@ -1090,6 +1091,8 @@ int main(int argc, char *argv[]) MAILLAGE2->GN = MAILLAGE1->GN; + MAILLAGE2->eliminationMailles(TETRA4, cutTetras); + cout << chrono() << " - MED file writing" << endl; MAILLAGE2->outputMED(ficMEDout); diff --git a/src/Tools/MeshCut/MeshCut_Globals.hxx b/src/Tools/MeshCut/MeshCut_Globals.hxx index b58515979..f07a944ad 100644 --- a/src/Tools/MeshCut/MeshCut_Globals.hxx +++ b/src/Tools/MeshCut/MeshCut_Globals.hxx @@ -25,6 +25,7 @@ namespace MESHCUT extern std::map > newCNX; extern std::map cptNouvellesMailles; extern std::map > GMplus, GMmoins; + extern std::vector cutTetras; extern float *DNP; //!< Distance Noeud Plan extern int *POSN; //!< Version -1/0/+1 du précédent, selon epsilon diff --git a/src/Tools/MeshCut/MeshCut_Maillage.cxx b/src/Tools/MeshCut/MeshCut_Maillage.cxx index e41727f77..d7c57a409 100644 --- a/src/Tools/MeshCut/MeshCut_Maillage.cxx +++ b/src/Tools/MeshCut/MeshCut_Maillage.cxx @@ -308,17 +308,17 @@ void Maillage::inputMED(std::string fichierMED) ERREUR("Error while reading mesh informations "); //cout << chrono() << " --- inputMED: MEDmeshInfo: OK" << endl; - cerr << "maa=" << maa << endl; - cerr << "spacedim=" << spacedim << endl; - cerr << "mdim=" << mdim << endl; - cerr << "type=" << type << endl; - cerr << "desc=" << desc << endl; - cerr << "dtunit=" << dtunit << endl; - cerr << "sortingtype=" << sortingtype << endl; - cerr << "nPasTemps=" << nPasTemps << endl; - cerr << "axistype=" << axistype << endl; - cerr << "axisname=" << axisname << endl; - cerr << "unitname=" << unitname << endl; +// cerr << "maa=" << maa << endl; +// cerr << "spacedim=" << spacedim << endl; +// cerr << "mdim=" << mdim << endl; +// cerr << "type=" << type << endl; +// cerr << "desc=" << desc << endl; +// cerr << "dtunit=" << dtunit << endl; +// cerr << "sortingtype=" << sortingtype << endl; +// cerr << "nPasTemps=" << nPasTemps << endl; +// cerr << "axistype=" << axistype << endl; +// cerr << "axisname=" << axisname << endl; +// cerr << "unitname=" << unitname << endl; dimensionMaillage = mdim; dimensionEspace = spacedim; @@ -959,12 +959,12 @@ void Maillage::outputMED(std::string fichierMED) char desc[MED_COMMENT_SIZE + 1]; // Description du maillage strcpy(desc, string2char(ID)); med_mesh_type type = MED_UNSTRUCTURED_MESH; - cerr << "maa=" << maa << endl; - cerr << "spacedim=" << spacedim << endl; - cerr << "mdim=" << mdim << endl; - cerr << "type=" << type << endl; - cerr << "axisname=" << axisname << endl; - cerr << "unitname=" << unitname << endl; +// cerr << "maa=" << maa << endl; +// cerr << "spacedim=" << spacedim << endl; +// cerr << "mdim=" << mdim << endl; +// cerr << "type=" << type << endl; +// cerr << "axisname=" << axisname << endl; +// cerr << "unitname=" << unitname << endl; if (MEDmeshCr(fid, maa, spacedim, mdim, type, desc, "s", MED_SORT_DTIT, MED_CARTESIAN, axisname, unitname) < 0) { ERREUR("Error MEDmeshCr"); @@ -1499,13 +1499,13 @@ void Maillage::outputMED(std::string fichierMED) // Chargement numTYPE //for (int nl=0; nl listeMaillesSuppr) } // ************* Mise à jour des effectifs + EFFECTIFS_TYPES[tm] = EFFECTIFS_TYPES[tm] - listeMaillesSuppr.size(); nombreMaillesMaillage = nombreMaillesMaillage - listeMaillesSuppr.size();