mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
PR: remove splitted tetrahedrons
This commit is contained in:
parent
6f15d8202e
commit
75d1b278ca
@ -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="<<it4<<", VN = " << VN[0] << " " << VN[1] << " " << VN[2] << " " << VN[3] << " " << VN[4] << " " << VN[5] << " " << endl;
|
||||
|
||||
// Numéros des noeuds du TETRA4
|
||||
@ -803,7 +803,7 @@ void MESHCUT::cas3(int VN[6], int it4)
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@ -31,6 +31,7 @@ std::vector<float> MESHCUT::newXX, MESHCUT::newYY, MESHCUT::newZZ;
|
||||
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;
|
||||
@ -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);
|
||||
|
@ -25,6 +25,7 @@ namespace MESHCUT
|
||||
extern std::map<TYPE_MAILLE, std::vector<int> > newCNX;
|
||||
extern std::map<TYPE_MAILLE, int> cptNouvellesMailles;
|
||||
extern std::map<TYPE_MAILLE, std::vector<int> > GMplus, GMmoins;
|
||||
extern std::vector<int> cutTetras;
|
||||
|
||||
extern float *DNP; //!< Distance Noeud Plan
|
||||
extern int *POSN; //!< Version -1/0/+1 du précédent, selon epsilon
|
||||
|
@ -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<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)
|
||||
@ -1678,7 +1678,7 @@ void Maillage::eliminationMailles(TYPE_MAILLE tm, vector<int> listeMaillesSuppr)
|
||||
{
|
||||
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é
|
||||
|
||||
@ -1735,7 +1735,7 @@ void Maillage::eliminationMailles(TYPE_MAILLE tm, vector<int> listeMaillesSuppr)
|
||||
|
||||
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;
|
||||
@ -1748,16 +1748,6 @@ void Maillage::eliminationMailles(TYPE_MAILLE tm, vector<int> listeMaillesSuppr)
|
||||
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);
|
||||
@ -1767,6 +1757,7 @@ void Maillage::eliminationMailles(TYPE_MAILLE tm, vector<int> listeMaillesSuppr)
|
||||
}
|
||||
|
||||
// ************* Mise à jour des effectifs
|
||||
|
||||
EFFECTIFS_TYPES[tm] = EFFECTIFS_TYPES[tm] - listeMaillesSuppr.size();
|
||||
nombreMaillesMaillage = nombreMaillesMaillage - listeMaillesSuppr.size();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user