-// Copyright (C) 2006-2013 EDF R&D
+// Copyright (C) 2006-2021 EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
debug = false;
string ficMEDin;
string ficMEDout;
- float xNormal;
- float yNormal;
- float zNormal;
- float xm;
- float ym;
- float zm;
- float tolerance;
+ float xNormal = 0;
+ float yNormal = 0;
+ float zNormal = 0;
+ float xm = 0;
+ float ym = 0;
+ float zm = 0;
+ float tolerance = 0;
try
{
if (argc != 13)
//int NG[4]; // Num. globaux des sommets
// Acquisition maillage initial
- //cout << chrono() << " - Acquisition du maillage initial" << endl;
+ //cout << salome_chrono() << " - Acquisition du maillage initial" << endl;
MAILLAGE1 = new Maillage((string) "TEMP");
MAILLAGE1->inputMED(ficMEDin);
- cout << chrono() << " - End of mesh read" << endl;
+ cout << salome_chrono() << " - End of mesh read" << endl;
indexNouveauxNoeuds = MAILLAGE1->nombreNoeudsMaillage;
// Le maillage ne contient aucun TETRA4 : on rend le maillage initial sans modification
cout << "WARNING: mesh does not contain tetra4 elements, it will not be modified" << endl;
MAILLAGE1->ID = str_id_maillagenew;
MAILLAGE1->outputMED(ficMEDout);
- cout << chrono() << " - Finished!" << endl << endl;
+ cout << salome_chrono() << " - Finished!" << endl << endl;
exit(0);
}
// A partir de cet instant le maillage contient forcément des TETRA4
DNP = (float*) malloc(sizeof(float) * MAILLAGE1->nombreNoeudsMaillage);
for (int k = 0; k < MAILLAGE1->nombreNoeudsMaillage; k++)
DNP[k] = distanceNoeudPlan(k + 1);
- cout << chrono() << " - End of computation of distances between nodes and plane" << endl;
+ cout << salome_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;
{
bool plus = false;
bool moins = false;
- int *offset = MAILLAGE1->CNX[TETRA4] + 4 * it4;
+ med_int *offset = MAILLAGE1->CNX[TETRA4] + 4 * it4;
for (int is = 0; is < 4; is++)
{
int ng = *(offset + is);
<< endl;
MAILLAGE1->ID = str_id_maillagenew;
MAILLAGE1->outputMED(ficMEDout);
- cout << chrono() << " - Finished!" << endl << endl;
+ cout << salome_chrono() << " - Finished!" << endl << endl;
exit(0);
}
// A partir de cet instant le maillage contient forcément des TETRA4 intersectant le plan de coupe
epsilon = tolerance * longueurMoyenne;
int nT4coupe = cptLONGUEURS / 6;
- cout << chrono() << " - End of computation of mean length of tetra4 edges near the cut plane" << endl;
+ cout << salome_chrono() << " - End of computation of mean length of tetra4 edges near the cut plane" << endl;
cout << "Number of tetra4 to be cut = " << nT4coupe << endl;
cout << "Mean length = " << longueurMoyenne << endl;
else
POSN[k] = 0;
}
- cout << chrono() << " - End of nodes qualification above or below the cut plane" << endl;
+ cout << salome_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++)
ERREUR("Case not taken into account");
}
- cout << chrono() << " - End of iteration on tetra4" << endl;
+ cout << salome_chrono() << " - End of iteration on tetra4" << endl;
// cout << "indexNouveauxNoeuds = " << indexNouveauxNoeuds << endl;
newXX.resize(indexNouveauxNoeuds - MAILLAGE1->nombreNoeudsMaillage);
// 2. Constitution du maillage final
// =========================================================================================
- cout << chrono() << " - Constitution of final mesh" << endl;
+ cout << salome_chrono() << " - Constitution of final mesh" << endl;
MAILLAGE2 = new Maillage(str_id_maillagenew);
MAILLAGE2->dimensionMaillage = MAILLAGE1->dimensionMaillage;
// cout << "Legacy " << tm << " effectif " << MAILLAGE1->EFFECTIFS_TYPES[tm] << endl;
int tailleType = Nnoeuds(tm);
- MAILLAGE2->CNX[tm] = (int*) malloc(sizeof(int) * tailleType * (MAILLAGE1->EFFECTIFS_TYPES[tm]
+ MAILLAGE2->CNX[tm] = (med_int*) malloc(sizeof(med_int) * tailleType * (MAILLAGE1->EFFECTIFS_TYPES[tm]
+ cptNouvellesMailles[tm]));
for (int i = 0; i < MAILLAGE1->EFFECTIFS_TYPES[tm]; i++)
for (int j = 0; j < tailleType; j++)
MAILLAGE2->eliminationMailles(TETRA4, cutTetras);
- cout << chrono() << " - MED file writing" << endl;
+ cout << salome_chrono() << " - MED file writing" << endl;
MAILLAGE2->outputMED(ficMEDout);
- cout << chrono() << " - Finished!" << endl << endl;
+ cout << salome_chrono() << " - Finished!" << endl << endl;
return 0;