mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-19 08:23:07 +05:00
PR: english messages
This commit is contained in:
parent
248c36ec7a
commit
dee22ad522
@ -13,6 +13,9 @@
|
||||
<property name="windowTitle">
|
||||
<string>cut a mesh by a plane</string>
|
||||
</property>
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
|
@ -212,7 +212,7 @@ void MESHCUT::cas1(int VN[6], int it4)
|
||||
}
|
||||
|
||||
else
|
||||
ERREUR(" Configuration intersections non reconnue (cas cptPI=1) ");
|
||||
ERREUR(" Intersections configuration not taken into account (case cptPI=1) ");
|
||||
|
||||
//int nl1 = MAILLAGE1->EFFECTIFS_TYPES[TETRA4] + i1;
|
||||
//int nl2 = MAILLAGE1->EFFECTIFS_TYPES[TETRA4] + i2;
|
||||
@ -358,7 +358,7 @@ void MESHCUT::cas2(int VN[6], int it4)
|
||||
}
|
||||
|
||||
else if (VN[0] != -1 && VN[5] != -1)
|
||||
ERREUR("Cas 2/05 interdit");
|
||||
ERREUR("Case 2/05 forbidden");
|
||||
|
||||
else if (VN[1] != -1 && VN[2] != -1)
|
||||
{
|
||||
@ -420,7 +420,7 @@ void MESHCUT::cas2(int VN[6], int it4)
|
||||
}
|
||||
|
||||
else if (VN[1] != -1 && VN[4] != -1)
|
||||
ERREUR("Cas 2/14 exclu");
|
||||
ERREUR("Case 2/14 excluded");
|
||||
|
||||
else if (VN[1] != -1 && VN[5] != -1)
|
||||
{
|
||||
@ -453,7 +453,7 @@ void MESHCUT::cas2(int VN[6], int it4)
|
||||
}
|
||||
|
||||
else if (VN[2] != -1 && VN[3] != -1)
|
||||
ERREUR("Cas 2/23 exclu");
|
||||
ERREUR("Case 2/23 excluded");
|
||||
|
||||
else if (VN[2] != -1 && VN[4] != -1)
|
||||
{
|
||||
@ -606,7 +606,7 @@ void MESHCUT::cas2(int VN[6], int it4)
|
||||
}
|
||||
|
||||
else
|
||||
ERREUR(" Configuration intersections non reconnue (cas cptPI=2) ");
|
||||
ERREUR(" Intersections configuration not taken into account (case cptPI=2) ");
|
||||
|
||||
// int ngT4 = MAILLAGE1->EFFECTIFS_TYPES[TETRA4] + cptNouvellesMailles[TETRA4] - 1;
|
||||
// int ngP5 = MAILLAGE1->EFFECTIFS_TYPES[PYRAM5] + cptNouvellesMailles[PYRAM5] - 1;
|
||||
@ -784,7 +784,7 @@ void MESHCUT::cas3(int VN[6], int it4)
|
||||
// cout << x2 << " " << y2 << " " << z2 << " " << endl;
|
||||
// cout << x3 << " " << y3 << " " << z3 << " " << endl;
|
||||
|
||||
ERREUR(" Configuration intersections non reconnue (cas cptPI=3) ");
|
||||
ERREUR(" Intersections configuration not taken into account (case cptPI=3) ");
|
||||
}
|
||||
|
||||
// int ngT4 = MAILLAGE1->EFFECTIFS_TYPES[TETRA4] + cptNouvellesMailles[TETRA4] - 1;
|
||||
@ -918,7 +918,7 @@ void MESHCUT::cas4(int VN[6], int it4)
|
||||
}
|
||||
}
|
||||
else
|
||||
ERREUR(" Configuration intersections non reconnue (cas cptPI=4) ");
|
||||
ERREUR(" Intersection configuration not taken into account (case cptPI=4) ");
|
||||
|
||||
// int nl1 = MAILLAGE1->EFFECTIFS_TYPES[PENTA6] + i1;
|
||||
// int nl2 = MAILLAGE1->EFFECTIFS_TYPES[PENTA6] + i2;
|
||||
|
@ -117,24 +117,24 @@ int main(int argc, char *argv[])
|
||||
ERREUR("--> check arguments!");
|
||||
}
|
||||
|
||||
cout << "Découpe plane :" << endl;
|
||||
cout << "\t" << "Maillage source: " << ficMEDin << endl;
|
||||
cout << "\t" << "Maillage cible: " << ficMEDout << endl;
|
||||
cout << "\t" << "ID nouveau maillage: " << str_id_maillagenew << endl;
|
||||
cout << "\t" << "Nom GMplus: " << str_id_GMplus << endl;
|
||||
cout << "\t" << "Nom GMmoins: " << str_id_GMmoins << endl;
|
||||
cout << "\t" << "Vecteur normal du plan de coupe: xn=" << xNormal << " yn=" << yNormal << " zn=" << zNormal << endl;
|
||||
cout << "\t" << "Point du plan de coupe: xm=" << xm << " ym=" << ym << " zm=" << zm << endl;
|
||||
cout << "\t" << "Tolérance: " << tolerance << endl;
|
||||
cout << "Cut by a plane :" << endl;
|
||||
cout << " source mesh: " << ficMEDin << endl;
|
||||
cout << " result mesh: " << ficMEDout << endl;
|
||||
cout << " mesh name: " << str_id_maillagenew << endl;
|
||||
cout << " group above plane: " << str_id_GMplus << endl;
|
||||
cout << " group below plane: " << str_id_GMmoins << endl;
|
||||
cout << " vector normal to the cut plane: xn=" << xNormal << " yn=" << yNormal << " zn=" << zNormal << endl;
|
||||
cout << " point in the cut plane: xm=" << xm << " ym=" << ym << " zm=" << zm << endl;
|
||||
cout << " tolerance: " << tolerance << endl;
|
||||
cout << endl;
|
||||
|
||||
if (tolerance <= 0.0)
|
||||
ERREUR("L'argument tolérance doit être strictement positif");
|
||||
ERREUR("Tolerance must not be negative or null");
|
||||
|
||||
// Il faut normer la normale
|
||||
float normeNormal = sqrt(xNormal * xNormal + yNormal * yNormal + zNormal * zNormal);
|
||||
if (normeNormal == 0.0)
|
||||
ERREUR("Vecteur normal nul");
|
||||
ERREUR("null normal vector");
|
||||
normale[0] = xNormal / normeNormal;
|
||||
normale[1] = yNormal / normeNormal;
|
||||
normale[2] = zNormal / normeNormal;
|
||||
@ -163,16 +163,16 @@ int main(int argc, char *argv[])
|
||||
//cout << chrono() << " - Acquisition du maillage initial" << endl;
|
||||
MAILLAGE1 = new Maillage((string) "TEMP");
|
||||
MAILLAGE1->inputMED(ficMEDin);
|
||||
cout << chrono() << " - Fin d'acquisition maillage" << endl;
|
||||
cout << chrono() << " - End of mesh read" << endl;
|
||||
indexNouveauxNoeuds = MAILLAGE1->nombreNoeudsMaillage;
|
||||
|
||||
// Le maillage ne contient aucun TETRA4 : on rend le maillage initial sans modification
|
||||
if (!MAILLAGE1->EFFECTIFS_TYPES[TETRA4])
|
||||
{
|
||||
cout << "WARNING : le maillage ne contient aucun élément TETRA4, il ne sera donc pas modifié" << endl;
|
||||
cout << "WARNING: mesh does not contain tetra4 elements, it will not be modified" << endl;
|
||||
MAILLAGE1->ID = str_id_maillagenew;
|
||||
MAILLAGE1->outputMED(ficMEDout);
|
||||
cout << chrono() << " - Terminé" << endl << endl;
|
||||
cout << chrono() << " - Finished!" << endl << endl;
|
||||
exit(0);
|
||||
}
|
||||
// A partir de cet instant le maillage contient forcément des TETRA4
|
||||
@ -182,7 +182,7 @@ int main(int argc, char *argv[])
|
||||
DNP = (float*) malloc(sizeof(float) * MAILLAGE1->nombreNoeudsMaillage);
|
||||
for (int k = 0; k < MAILLAGE1->nombreNoeudsMaillage; k++)
|
||||
DNP[k] = distanceNoeudPlan(k + 1);
|
||||
cout << chrono() << " - Fin de chargement des distances noeud-plan" << endl;
|
||||
cout << chrono() << " - End of computation of distances between nodes and plane" << endl;
|
||||
|
||||
// Longueur d'arête moyenne des T4 intersectant le plan de coupe
|
||||
float LONGUEURS = 0.0;
|
||||
@ -222,11 +222,11 @@ int main(int argc, char *argv[])
|
||||
if (cptLONGUEURS == 0)
|
||||
{
|
||||
cout
|
||||
<< "WARNING : le plan de coupe n'intersecte aucun élément TETRA4, le maillage initial ne sera donc pas modifié"
|
||||
<< "WARNING: the cut plane does not cut any tetra4 element, initial mesh will not be modified"
|
||||
<< endl;
|
||||
MAILLAGE1->ID = str_id_maillagenew;
|
||||
MAILLAGE1->outputMED(ficMEDout);
|
||||
cout << chrono() << " - Terminé" << endl << endl;
|
||||
cout << chrono() << " - Finished!" << endl << endl;
|
||||
exit(0);
|
||||
}
|
||||
// A partir de cet instant le maillage contient forcément des TETRA4 intersectant le plan de coupe
|
||||
@ -236,11 +236,11 @@ int main(int argc, char *argv[])
|
||||
epsilon = tolerance * longueurMoyenne;
|
||||
|
||||
int nT4coupe = cptLONGUEURS / 6;
|
||||
cout << chrono() << " - Fin du calcul de la longueur moyenne des arêtes TETRA4 au voisinage du plan de coupe" << endl;
|
||||
cout << chrono() << " - End of computation of mean length of tetra4 edges near the cut plane" << endl;
|
||||
|
||||
cout << "Nombre de TETRA4 impliqués dans la coupe = " << nT4coupe << endl;
|
||||
cout << "Longueur moyenne = " << longueurMoyenne << endl;
|
||||
cout << "Tolérance = " << tolerance << endl;
|
||||
cout << "Number of tetra4 to be cut = " << nT4coupe << endl;
|
||||
cout << "Mean length = " << longueurMoyenne << endl;
|
||||
cout << "Tolerance = " << tolerance << endl;
|
||||
cout << "Epsilon = " << epsilon << endl;
|
||||
|
||||
// Détermination des positions de noeuds par rapport au plan de coupe - POSN
|
||||
@ -254,8 +254,8 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
POSN[k] = 0;
|
||||
}
|
||||
cout << chrono() << " - Fin du positionnement des points par rapport au plan de coupe" << endl;
|
||||
cout << "Début de la boucle sur les TETRA4" << endl;
|
||||
cout << chrono() << " - End of nodes classement above or below the cut plane" << endl;
|
||||
cout << "Start of iteration on tetra4" << endl;
|
||||
|
||||
for (int it4 = 0; it4 < MAILLAGE1->EFFECTIFS_TYPES[TETRA4]; it4++)
|
||||
{
|
||||
@ -617,9 +617,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
else if (S[0] == 0 && S[1] == 0 && S[2] == 0 && S[3] == 0)
|
||||
{
|
||||
cout << "WARNING : TETRA4 numéro " << it4
|
||||
<< " entièrement inclus dans la zone de tolérance autour du plan de coupe" << endl;
|
||||
cout << " --> affecté au groupe " << str_id_GMmoins << endl;
|
||||
cout << "WARNING: TETRA4 number " << it4
|
||||
<< " entirely in the tolerance zone near the cut plane" << endl;
|
||||
cout << " --> affected to group " << str_id_GMmoins << endl;
|
||||
GMmoins[TETRA4].push_back(it4);
|
||||
}
|
||||
|
||||
@ -970,10 +970,10 @@ int main(int argc, char *argv[])
|
||||
GMplus[TETRA4].push_back(it4);
|
||||
|
||||
else
|
||||
ERREUR("Cas non prévu");
|
||||
ERREUR("Case not taken into account");
|
||||
|
||||
}
|
||||
cout << chrono() << " - Fin de la boucle sur les TETRA4" << endl;
|
||||
cout << chrono() << " - End of iteration on tetra4" << endl;
|
||||
|
||||
// cout << "indexNouveauxNoeuds = " << indexNouveauxNoeuds << endl;
|
||||
newXX.resize(indexNouveauxNoeuds - MAILLAGE1->nombreNoeudsMaillage);
|
||||
@ -991,7 +991,7 @@ int main(int argc, char *argv[])
|
||||
// 2. Constitution du maillage final
|
||||
// =========================================================================================
|
||||
|
||||
cout << chrono() << " - Constitution du maillage final" << endl;
|
||||
cout << chrono() << " - Constitution of final mesh" << endl;
|
||||
|
||||
MAILLAGE2 = new Maillage(str_id_maillagenew);
|
||||
MAILLAGE2->dimensionMaillage = MAILLAGE1->dimensionMaillage;
|
||||
@ -1090,10 +1090,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
MAILLAGE2->GN = MAILLAGE1->GN;
|
||||
|
||||
cout << chrono() << " - Ecriture du fichier MED" << endl;
|
||||
cout << chrono() << " - MED file writing" << endl;
|
||||
|
||||
MAILLAGE2->outputMED(ficMEDout);
|
||||
cout << chrono() << " - Terminé" << endl << endl;
|
||||
cout << chrono() << " - Finished!" << endl << endl;
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -102,7 +102,7 @@ int MESHCUT::intersectionSegmentPlan(int it4, int na)
|
||||
ngB = *(offset + 3);
|
||||
}
|
||||
else
|
||||
ERREUR("Numéro d'arête supérieur à 6");
|
||||
ERREUR("Edge number superior to 6");
|
||||
|
||||
string cle1 = int2string(ngA) + (string) "_" + int2string(ngB);
|
||||
string cle2 = int2string(ngB) + (string) "_" + int2string(ngA);
|
||||
@ -142,7 +142,7 @@ int MESHCUT::intersectionSegmentPlan(int it4, int na)
|
||||
}
|
||||
|
||||
if (fabs(ps) == 0.0)
|
||||
ERREUR("Erreur sur ps nul");
|
||||
ERREUR("Error on null scalar product");
|
||||
|
||||
// PS non nul: l'intersection AB/plan existe
|
||||
|
||||
|
@ -298,14 +298,14 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
fid = MEDfileOpen(string2char(fichierMED), MED_ACC_RDONLY);
|
||||
if (fid < 0)
|
||||
{
|
||||
ERREUR("Erreur a l'ouverture du fichier\n");
|
||||
ERREUR("Error file open\n");
|
||||
}
|
||||
//cout << chrono() << " --- inputMED: MEDfileOpen: ouverture du maillage en lecture seule, OK" << endl;
|
||||
|
||||
// Lecture des infos concernant le premier maillage
|
||||
if (MEDmeshInfo(fid, 1, maa, &spacedim, &mdim, &type, desc, dtunit, &sortingtype, &nPasTemps, &axistype, axisname,
|
||||
unitname) < 0)
|
||||
ERREUR("Erreur a la lecture des informations sur le maillage ");
|
||||
ERREUR("Error while reading mesh informations ");
|
||||
//cout << chrono() << " --- inputMED: MEDmeshInfo: OK" << endl;
|
||||
|
||||
cerr << "maa=" << maa << endl;
|
||||
@ -452,7 +452,7 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
med_int nFamilles;
|
||||
char nomGroupeChar[MED_LNAME_SIZE + 1];
|
||||
if ((nFamilles = MEDnFamily(fid, maa)) < 0)
|
||||
ERREUR("ERREUR MEDnFamily");
|
||||
ERREUR("ERROR MEDnFamily");
|
||||
|
||||
// Initialisation des tailles: tailleFAMILLES et tailleGROUPES
|
||||
|
||||
@ -488,9 +488,9 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
med_int numfam, *attide, *attval, natt, ngro;
|
||||
|
||||
if ((ngro = MEDnFamilyGroup(fid, maa, i + 1)) < 0)
|
||||
ERREUR("ERREUR MEDnFamilyGroup");
|
||||
ERREUR("ERROR MEDnFamilyGroup");
|
||||
if ((natt = MEDnFamily23Attribute(fid, maa, i + 1)) < 0)
|
||||
ERREUR("ERREUR MEDnFamily23Attribute");
|
||||
ERREUR("ERROR MEDnFamily23Attribute");
|
||||
|
||||
attide = (med_int *) malloc(sizeof(med_int) * natt);
|
||||
attval = (med_int *) malloc(sizeof(med_int) * natt);
|
||||
@ -498,7 +498,7 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
gro = (char *) malloc(MED_LNAME_SIZE * ngro + 1);
|
||||
|
||||
if (MEDfamilyInfo(fid, maa, (med_int) (i + 1), nomfam, &numfam, gro) < 0)
|
||||
ERREUR("ERREUR MEDfamilyInfo");
|
||||
ERREUR("ERROR MEDfamilyInfo");
|
||||
|
||||
for (int ig = 1; ig <= ngro; ig++)
|
||||
{
|
||||
@ -556,7 +556,7 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
&coordinatechangement, &geotransformation);
|
||||
|
||||
if (nnoe < 0)
|
||||
ERREUR("Erreur a la lecture du nombre de noeuds");
|
||||
ERREUR("Error while reading number of nodes");
|
||||
|
||||
nombreNoeudsMaillage = nnoe;
|
||||
|
||||
@ -565,7 +565,7 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
if (nnoe > 0)
|
||||
{
|
||||
if (MEDmeshEntityFamilyNumberRd(fid, maa, MED_NO_DT, MED_NO_IT, MED_NODE, MED_NONE, famNoeuds) < 0)
|
||||
ERREUR("Erreur a la lecture des familles de noeuds (MEDmeshEntityFamilyNumberRd)");
|
||||
ERREUR("Error while reading family node number (MEDmeshEntityFamilyNumberRd)");
|
||||
}
|
||||
|
||||
/* Allocations memoires */
|
||||
@ -583,7 +583,7 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
// Lecture des composantes des coordonnees des noeuds
|
||||
if (nnoe > 0)
|
||||
if (MEDmeshNodeCoordinateRd(fid, maa, MED_NO_DT, MED_NO_IT, MED_FULL_INTERLACE, coo1) < 0)
|
||||
ERREUR("Erreur a la lecture des coordonnees des noeuds");
|
||||
ERREUR("Error while reading nodes coordinates");
|
||||
|
||||
// // Les noeuds ont-ils un nom? un numéro?
|
||||
// if (nnoe > 0)
|
||||
@ -856,7 +856,7 @@ void Maillage::acquisitionTYPE_inputMED(TYPE_MAILLE TYPE, int nTYPE, med_idt fid
|
||||
|
||||
if (MEDmeshElementRd(fid, maa, MED_NO_DT, MED_NO_IT, MED_CELL, typeBanaliseMED, MED_NODAL, MED_FULL_INTERLACE,
|
||||
CNX[TYPE], &inomTYPE, nomTYPE, &inumTYPE, numTYPE, &ifamTYPE, famTYPE) < 0)
|
||||
ERREUR("Erreur a la lecture des coordonnees des noeuds");
|
||||
ERREUR("Error while reading elements");
|
||||
|
||||
// Conversion HL
|
||||
conversionCNX(CNX[TYPE], TYPE, nTYPE);
|
||||
@ -924,7 +924,7 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
// Sortie sur erreur en cas de maillage sans noeuds
|
||||
if (nombreNoeudsMaillage <= 0)
|
||||
{
|
||||
ERREUR("Ce maillage ne contient aucun noeud\n"); /* cout << "Maillage sans noeuds" << endl; */
|
||||
ERREUR("This mesh does not contain any node\n"); /* cout << "Maillage sans noeuds" << endl; */
|
||||
}
|
||||
|
||||
// ########################################################################
|
||||
@ -935,8 +935,8 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
med_idt fid = MEDfileOpen(string2char(fichierMED), MED_ACC_CREAT);
|
||||
if (fid < 0)
|
||||
{
|
||||
ERREUR("Erreur MEDfileOpen\n");
|
||||
cout << "Erreur MEDfileOpen" << endl;
|
||||
ERREUR("Error MEDfileOpen\n");
|
||||
cout << "Error MEDfileOpen" << endl;
|
||||
}
|
||||
|
||||
// Création du maillage
|
||||
@ -967,8 +967,8 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
cerr << "unitname=" << unitname << endl;
|
||||
if (MEDmeshCr(fid, maa, spacedim, mdim, type, desc, "s", MED_SORT_DTIT, MED_CARTESIAN, axisname, unitname) < 0)
|
||||
{
|
||||
ERREUR("Erreur MEDmeshCr");
|
||||
cout << "Erreur MEDmeshCr" << endl;
|
||||
ERREUR("Error MEDmeshCr");
|
||||
cout << "Error MEDmeshCr" << endl;
|
||||
}
|
||||
|
||||
// ============================= CREATION FAMILLE ZERO
|
||||
@ -982,7 +982,7 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
strcpy(nomfam, "FAMILLE_0");
|
||||
numfam = 0;
|
||||
if (MEDfamilyCr(fid, maa, nomfam, numfam, 0, MED_NO_GROUP) < 0)
|
||||
ERREUR("Erreur MEDfamilyCr (creation famille 0)");
|
||||
ERREUR("Error MEDfamilyCr (create family 0)");
|
||||
|
||||
// ########################################################################
|
||||
// GROUPES DE NOEUDS
|
||||
@ -1101,7 +1101,7 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
|
||||
// Création de la famille
|
||||
if (MEDfamilyCr(fid, maa, nomfam, numfam, 0, MED_NO_GROUP) < 0)
|
||||
ERREUR("Erreur MEDfamilyCr");
|
||||
ERREUR("Error MEDfamilyCr");
|
||||
|
||||
}
|
||||
|
||||
@ -1259,8 +1259,8 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
if (MEDmeshNodeWr(fid, maa, MED_NO_DT, MED_NO_IT, MED_UNDEF_DT, MED_FULL_INTERLACE, nnoe, coo, inonoe, nomnoe,
|
||||
inunoe, numnoe, MED_TRUE, nufano) < 0)
|
||||
{
|
||||
ERREUR("Erreur MEDmeshNodeWr");
|
||||
cout << "Erreur MEDmeshNodeWr" << endl;
|
||||
ERREUR("Error MEDmeshNodeWr");
|
||||
cout << "Error MEDmeshNodeWr" << endl;
|
||||
}
|
||||
|
||||
// ########################################################################
|
||||
@ -1416,7 +1416,7 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
|
||||
// Création de la famille
|
||||
if (MEDfamilyCr(fid, maa, nomfam, numfam, 1, gro) < 0)
|
||||
ERREUR("Erreur MEDfamilyCr");
|
||||
ERREUR("Error MEDfamilyCr");
|
||||
}
|
||||
|
||||
}
|
||||
@ -1510,14 +1510,14 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
MED_FULL_INTERLACE, nTYPE, CNX[tm], inomTYPE, nomTYPE, inumTYPE, numTYPE, MED_FALSE,
|
||||
famTYPE) < 0)
|
||||
{
|
||||
ERREUR("Erreur MEDmeshElementWr");
|
||||
cout << "Erreur MEDmeshElementWr, type " << stype << endl;
|
||||
ERREUR("Error MEDmeshElementWr");
|
||||
cout << "Error MEDmeshElementWr, type " << stype << endl;
|
||||
}
|
||||
if (MEDmeshEntityFamilyNumberWr(fid, maa, MED_NO_DT, MED_NO_IT,
|
||||
MED_CELL, MGE, nTYPE, famTYPE) < 0)
|
||||
{
|
||||
ERREUR("Erreur MEDmeshEntityFamilyNumberWr");
|
||||
cout << "Erreur MEDmeshEntityFamilyNumberWr, type " << stype << endl;
|
||||
ERREUR("Error MEDmeshEntityFamilyNumberWr");
|
||||
cout << "Error MEDmeshEntityFamilyNumberWr, type " << stype << endl;
|
||||
}
|
||||
|
||||
// free(nomTYPE);
|
||||
@ -1534,8 +1534,8 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
|
||||
if (MEDfileClose(fid) < 0)
|
||||
{
|
||||
ERREUR("Erreur a la fermeture du fichier MED\n");
|
||||
cout << "Erreur a la fermeture du fichier MED" << endl;
|
||||
ERREUR("Error on close MED file\n");
|
||||
cout << "Error on close MED file" << endl;
|
||||
}
|
||||
|
||||
// cout << endl << endl << "Fin procédure outputMED" << endl;
|
||||
@ -1661,7 +1661,7 @@ int Maillage::NLOCAL(int nglobal, TYPE_MAILLE tm)
|
||||
- nPYRAM13 - nPENTA6 - nPENTA15 - nHEXA8 - 1;
|
||||
}
|
||||
else
|
||||
ERREUR("Routine NLOCAL: type non reconnu");
|
||||
ERREUR("method NLOCAL: unknown type");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1724,7 +1724,7 @@ void Maillage::eliminationMailles(TYPE_MAILLE tm, vector<int> listeMaillesSuppr)
|
||||
// Contrôle
|
||||
if (offset != listeMaillesSuppr.size())
|
||||
{
|
||||
ERREUR("Incohérence offset, fonction eliminationMailles");
|
||||
ERREUR("Incoherent offset, method eliminationMailles");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -1755,7 +1755,7 @@ void Maillage::eliminationMailles(TYPE_MAILLE tm, vector<int> listeMaillesSuppr)
|
||||
cout << "mailles.size() = " << mailles.size() << endl;
|
||||
cout << "cptMailles = " << cptMailles << endl;
|
||||
cout << "delta = " << delta << endl;
|
||||
ERREUR("Incohérence sur le nombre de mailles conservées, fonction eliminationMailles");
|
||||
ERREUR("Incoherent number of kept elements, method eliminationMailles");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ bool MESHCUT::estUnTypeMaille(std::string S)
|
||||
|
||||
void MESHCUT::ERREUR(const char* msg)
|
||||
{
|
||||
cout << endl << "====== ERREUR ====== " << msg << endl << endl;
|
||||
cout << endl << "====== ERROR ====== " << msg << endl << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ std::string MESHCUT::strip(std::string S)
|
||||
std::string MESHCUT::entierSur10_g(int i)
|
||||
{
|
||||
if (i > 999999999)
|
||||
ERREUR("Tentative d'ecriture sur 10 caracteres d'un entier plus grand que 999999999");
|
||||
ERREUR("trying to write a number superior to 999999999 on more than 10 chars");
|
||||
if (i < 10)
|
||||
return int2string(i) + (string) " ";
|
||||
else if (i < 100)
|
||||
@ -137,7 +137,7 @@ std::string MESHCUT::entierSur10_g(int i)
|
||||
std::string MESHCUT::entierSur10_d(int i)
|
||||
{
|
||||
if (i > 999999999)
|
||||
ERREUR("Tentative d'ecriture sur 10 caracteres d'un entier plus grand que 999999999");
|
||||
ERREUR("trying to write a number superior to 999999999 on more than 10 chars");
|
||||
if (i < 10)
|
||||
return (string) " " + int2string(i);
|
||||
else if (i < 100)
|
||||
@ -177,7 +177,7 @@ std::string MESHCUT::typeEnsight(std::string type)
|
||||
else if (type == (string) "QUAD8")
|
||||
return (string) "quad4"; // ATTENTION, triche!
|
||||
else if (type == (string) "QUAD9")
|
||||
ERREUR("Type QUAD9 non supporte par Ensight");
|
||||
ERREUR("Type QUAD9 not supported by Ensight");
|
||||
else if (type == (string) "TETRA4")
|
||||
return (string) "tetra4";
|
||||
else if (type == (string) "TETRA10")
|
||||
@ -195,9 +195,9 @@ std::string MESHCUT::typeEnsight(std::string type)
|
||||
else if (type == (string) "HEXA20")
|
||||
return (string) "hexa8"; // ATTENTION, triche!
|
||||
else if (type == (string) "HEXA27")
|
||||
ERREUR("Type HEXA27 non supporte par Ensight");
|
||||
ERREUR("Type HEXA27 not supported by Ensight");
|
||||
else
|
||||
ERREUR("Type maille non reconnu (routine \"typeEnsight\"");
|
||||
ERREUR("Type of element not accepted (method \"typeEnsight\"");
|
||||
return (string) "";
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ int MESHCUT::Nnoeuds(TYPE_MAILLE type)
|
||||
}
|
||||
//case HEXA27: { return 27; break; }
|
||||
default:
|
||||
ERREUR("Type maille non reconnu (routine Nnoeuds)");
|
||||
ERREUR("Type of elem not accepted (method Nnoeuds)");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -370,7 +370,7 @@ int MESHCUT::NnoeudsGeom(TYPE_MAILLE type)
|
||||
}
|
||||
//case HEXA27: { return 27; break; }
|
||||
default:
|
||||
ERREUR("Type maille non reconnu (routine NnoeudsGeom)");
|
||||
ERREUR("Type of elem not accepted (method NnoeudsGeom)");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -378,7 +378,7 @@ int MESHCUT::NnoeudsGeom(TYPE_MAILLE type)
|
||||
int MESHCUT::codeGMSH(std::string type)
|
||||
{
|
||||
if (type == (string) "POI1")
|
||||
ERREUR("POI1 non pris en charge par GMSH");
|
||||
ERREUR("POI1 not taken into account by GMSH");
|
||||
else if (type == (string) "SEG2")
|
||||
return 1;
|
||||
else if (type == (string) "SEG3")
|
||||
@ -410,7 +410,7 @@ int MESHCUT::codeGMSH(std::string type)
|
||||
else if (type == (string) "HEXA27")
|
||||
return 12;
|
||||
else
|
||||
ERREUR("Type maille non reconnu (routine codeGMSH)");
|
||||
ERREUR("Type of elem not accepted (method codeGMSH)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -472,7 +472,7 @@ std::string MESHCUT::ASTER8(std::string s)
|
||||
else if (s.size() == 8)
|
||||
return (s);
|
||||
else
|
||||
ERREUR("Depassement de la longueur max 8 pour une chaine ASTER");
|
||||
ERREUR("More than 8 char for an ASTER string");
|
||||
return (s);
|
||||
}
|
||||
|
||||
@ -564,7 +564,7 @@ med_geometry_type MESHCUT::InstanceMGE(TYPE_MAILLE TYPE)
|
||||
typeBanaliseMED = MED_HEXA20;
|
||||
break;
|
||||
default:
|
||||
ERREUR("Routine InstanceMGE, type inconnu ");
|
||||
ERREUR("Method InstanceMGE, unknown type ");
|
||||
}
|
||||
return typeBanaliseMED;
|
||||
}
|
||||
@ -607,7 +607,7 @@ TYPE_MAILLE MESHCUT::typeMaille(std::string type)
|
||||
else if (type == (string) "HEXA20")
|
||||
return HEXA20;
|
||||
else
|
||||
ERREUR("ERREUR procédure typeMaille, type non reconnu");
|
||||
ERREUR("ERROR method typeMaille, unknown type");
|
||||
return POI1;
|
||||
}
|
||||
|
||||
@ -646,7 +646,7 @@ std::string MESHCUT::MGE2string(med_geometry_type MGE)
|
||||
else if (MGE == MED_HEXA20)
|
||||
return (string) "HEXA20";
|
||||
else
|
||||
ERREUR("ERREUR procédure MGE2string, type non reconnu");
|
||||
ERREUR("ERROR method MGE2string, unknown type");
|
||||
return (string) "NOEUD";
|
||||
}
|
||||
|
||||
@ -683,7 +683,7 @@ std::string MESHCUT::TM2string(TYPE_MAILLE MGE)
|
||||
else if (MGE == HEXA20)
|
||||
return (string) "HEXA20";
|
||||
else
|
||||
ERREUR("ERREUR procédure TM2string, type non reconnu");
|
||||
ERREUR("ERROR method TM2string, unknown type");
|
||||
return (string) "POI1";
|
||||
}
|
||||
|
||||
@ -720,7 +720,7 @@ TYPE_MAILLE MESHCUT::string2TM(std::string stm)
|
||||
else if (stm == (string) "HEXA20")
|
||||
return HEXA20;
|
||||
else
|
||||
ERREUR("ERREUR procédure string2TM, type non reconnu");
|
||||
ERREUR("ERROR method string2TM, unknown type");
|
||||
return POI1;
|
||||
}
|
||||
|
||||
@ -822,8 +822,8 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
|
||||
med_field_type fieldType;
|
||||
|
||||
if (MEDfieldInfo(fid, ichamp, nomChamp, maa, &local, &fieldType, compChamp, unitChamp, dtunit, &nPasTemps) < 0)
|
||||
ERREUR("Erreur MEDfieldInfo");
|
||||
cout << type << " : " << (int) nPasTemps << " pas de temps " << endl;
|
||||
ERREUR("Error MEDfieldInfo");
|
||||
cout << type << " : " << (int) nPasTemps << " timestep " << endl;
|
||||
|
||||
for (ipt = 1; ipt <= nPasTemps; ipt++)
|
||||
{
|
||||
@ -833,11 +833,11 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
|
||||
if (debug)
|
||||
cout << "************************************************************" << endl;
|
||||
if (debug)
|
||||
cout << " CHAMP " << ichamp << endl;
|
||||
cout << " FIELD " << ichamp << endl;
|
||||
if (debug)
|
||||
cout << " " << nomChamp << endl;
|
||||
if (debug)
|
||||
cout << " " << type << " --- Pas de temps " << ipt << endl;
|
||||
cout << " " << type << " --- Timestep " << ipt << endl;
|
||||
if (debug)
|
||||
cout << "************************************************************" << endl;
|
||||
if (debug)
|
||||
@ -847,11 +847,11 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
|
||||
{
|
||||
cout << endl;
|
||||
cout << endl << "####################################################################" << endl;
|
||||
cout << " ERREUR MEDpasdetempsInfo " << endl;
|
||||
cout << " ERROR MEDpasdetempsInfo " << endl;
|
||||
cout << endl << "####################################################################" << endl;
|
||||
cout << " Champ: " << (string) nomChamp << endl;
|
||||
cout << " Géométrie: " << MGE2string(MGE) << endl;
|
||||
cout << " Pas de temps " << ipt << " ignoré" << endl;
|
||||
cout << " Field: " << (string) nomChamp << endl;
|
||||
cout << " Geometrie: " << MGE2string(MGE) << endl;
|
||||
cout << " Timestep " << ipt << " ignored" << endl;
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -860,30 +860,30 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
|
||||
nval = MEDfieldnValueWithProfile(fid, nomChamp, numdt, numo, MEM, MGE, ipt, MED_COMPACT_PFLMODE, nomprofil,
|
||||
&profilesize, locname, &nintegrationpoint);
|
||||
if (debug)
|
||||
cout << " Nombre de valeurs dans ce pas de temps : " << (int) nval << endl;
|
||||
cout << " Number of values in this timestep: " << (int) nval << endl;
|
||||
|
||||
if (typeChamp == MED_FLOAT64)
|
||||
valr = (med_float*) calloc(nCompChamp * nval, sizeof(med_float));
|
||||
else
|
||||
ERREUR("Type de champ non pris en compte");
|
||||
ERREUR("Type of field not taken into account");
|
||||
|
||||
if (MEDfieldValueWithProfileRd(fid, maa, numdt, numo, MEM, MGE, MED_COMPACT_PFLMODE, nomprofil,
|
||||
MED_FULL_INTERLACE, MED_ALL_CONSTITUENT, (unsigned char*) valr) < 0)
|
||||
{
|
||||
cout << endl;
|
||||
cout << endl << "####################################################################" << endl;
|
||||
cout << " ERREUR MEDchampLire " << endl;
|
||||
cout << " ERROR MEDchampLire " << endl;
|
||||
cout << endl << "####################################################################" << endl;
|
||||
cout << endl;
|
||||
cout << " Champ: " << (string) nomChamp << endl;
|
||||
cout << " Géométrie: " << MGE2string(MGE) << endl;
|
||||
cout << " Pas de temps " << ipt << " ignoré" << endl;
|
||||
cout << " Field: " << (string) nomChamp << endl;
|
||||
cout << " Geometry: " << MGE2string(MGE) << endl;
|
||||
cout << " Timestep " << ipt << " ignored" << endl;
|
||||
cout << endl << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
cout << " profil = " << (string) nomprofil << endl;
|
||||
cout << " profile = " << (string) nomprofil << endl;
|
||||
// Localisation du champ aux points de Gauss
|
||||
if (debug)
|
||||
cout << " locname = " << (string) locname << endl;
|
||||
@ -892,7 +892,7 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
|
||||
{
|
||||
ngauss = REFGAUSS[(string) locname];
|
||||
if (debug)
|
||||
cout << " " << ngauss << " points de Gauss par élément)" << endl;
|
||||
cout << " " << ngauss << " Gauss points by element)" << endl;
|
||||
}
|
||||
else
|
||||
ngauss = 1;
|
||||
@ -951,7 +951,7 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
|
||||
cout << endl;
|
||||
cout << endl << "********************************************************************" << endl;
|
||||
cout << "******************** ***********************" << endl;
|
||||
cout << "******************** ERREUR MEDchampEcr ***********************" << endl;
|
||||
cout << "******************** ERROR MEDchampEcr ***********************" << endl;
|
||||
cout << "******************** ***********************" << endl;
|
||||
cout << "********************************************************************" << endl;
|
||||
cout << endl;
|
||||
@ -963,7 +963,7 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
|
||||
}
|
||||
|
||||
if (debug)
|
||||
cout << " Ecriture des valeurs moyennées dans le nouveau champ: OK " << endl;
|
||||
cout << " Writing mean values in new field: OK " << endl;
|
||||
|
||||
// Restitution du champ moyenné
|
||||
if (debug)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
|
||||
# if not, copy this file as ${HOME}/Plugins/salome_plugins.py or ${APPLI}/Plugins/salome_plugins.py
|
||||
# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
|
||||
|
||||
import salome_pluginsmanager
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user