*/
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;
*/
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;
*/
void MESHCUT::cas3(int VN[6], int it4)
{
-
+ cutTetras.push_back(it4);
// cout << "Cas 3 - it4="<<it4<<", VN = " << VN[0] << " " << VN[1] << " " << VN[2] << " " << VN[3] << " " << VN[4] << " " << VN[5] << " " << endl;
// Numéros des noeuds du TETRA4
*/
void MESHCUT::cas4(int VN[6], int it4)
{
-
+ cutTetras.push_back(it4);
// cout << "Cas 4 - it4=" << it4 << ", VN = " << VN[0] << " " << VN[1] << " " << VN[2] << " " << VN[3] << " " << VN[4]
// << " " << VN[5] << " " << endl;
std::map<TYPE_MAILLE, std::vector<int> > MESHCUT::newCNX;
std::map<TYPE_MAILLE, int> MESHCUT::cptNouvellesMailles;
std::map<TYPE_MAILLE, std::vector<int> > MESHCUT::GMplus, MESHCUT::GMmoins;
+std::vector<int> MESHCUT::cutTetras;
float *MESHCUT::DNP;
int *MESHCUT::POSN;
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++)
// 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)
MAILLAGE2->GN = MAILLAGE1->GN;
+ MAILLAGE2->eliminationMailles(TETRA4, cutTetras);
+
cout << chrono() << " - MED file writing" << endl;
MAILLAGE2->outputMED(ficMEDout);
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;
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");
// Chargement numTYPE
//for (int nl=0; nl<nTYPE; nl++) *(numTYPE+nl) = (med_int) ( NUM_MAILLES[tm][nl] );
- cerr << "maa=" << maa << endl;
- cerr << "MGE=" << MGE << endl;
- cerr << "nTYPE=" << nTYPE << endl;
- cerr << "inomTYPE=" << inomTYPE << endl;
- //cerr << "nomTYPE=" << nomTYPE << endl;
- cerr << "inumTYPE=" << inumTYPE << endl;
- this->afficheMailles(tm);
+// cerr << "maa=" << maa << endl;
+// cerr << "MGE=" << MGE << endl;
+// cerr << "nTYPE=" << nTYPE << endl;
+// cerr << "inomTYPE=" << inomTYPE << endl;
+// //cerr << "nomTYPE=" << nomTYPE << endl;
+// cerr << "inumTYPE=" << inumTYPE << endl;
+// this->afficheMailles(tm);
if (MEDmeshElementWr(fid, maa, MED_NO_DT, MED_NO_IT, MED_UNDEF_DT, MED_CELL, MGE, MED_NODAL,
MED_FULL_INTERLACE, nTYPE, CNX[tm], inomTYPE, nomTYPE, inumTYPE, numTYPE, MED_FALSE,
famTYPE) < 0)
{
map<int, int> TABLE_NL; // Table des num. locaux dans le type tm
- // cout << "Fonction eliminationMailles, listeMaillesSuppr.size()=" << listeMaillesSuppr.size() << endl;
+ cout << "Method eliminationMailles, listeMaillesSuppr.size()=" << listeMaillesSuppr.size() << endl;
// ************* Modification de la connectivité du type concerné
if (GM[nomGM][tm].size())
{
-
+ //cout << "GM[" << nomGM <<"][" << tm << "].size()=" << GM[nomGM][tm].size() << endl;
vector<int> mailles = GM[nomGM][tm];
vector<int> mailles2; //mailles2.resize(mailles.size()-listeMaillesSuppr.size());
unsigned int cptMailles = 0;
cptMailles++;
}
}
- // Vérification
- if (cptMailles != mailles.size() - listeMaillesSuppr.size())
- {
- int delta = mailles.size() - listeMaillesSuppr.size();
- cout << "mailles.size() = " << mailles.size() << endl;
- cout << "cptMailles = " << cptMailles << endl;
- cout << "delta = " << delta << endl;
- ERREUR("Incoherent number of kept elements, method eliminationMailles");
- exit(0);
- }
GM[nomGM][tm].clear();
mailles2.resize(cptMailles);
}
// ************* Mise à jour des effectifs
+
EFFECTIFS_TYPES[tm] = EFFECTIFS_TYPES[tm] - listeMaillesSuppr.size();
nombreMaillesMaillage = nombreMaillesMaillage - listeMaillesSuppr.size();