16#include <NettoieNoeuds.h>
25template <
typename _SIZE_>
28template <
typename _SIZE_>
44template <
typename _SIZE_>
49 if (this->
domaine().les_sommets().size()!=0)
51 Cerr <<
"The keyword NettoiePasNoeuds must be placed before the ";
52 Cerr <<
"reading of the domain to avoid the cleaning of the double";
53 Cerr <<
"nodes of the domain." << finl;
62template <
typename _SIZE_>
82 for (
int_t i=0; i<nb_som_init ; i++)
83 renum_som_old2new[i]=-1;
85 for (
int_t i=0; i<nb_elem ; i++)
86 for (
int j=0; j< nb_som_elem; j++)
89 if (les_elems(i,j)==-1)
break;
90 int_t& tmp=renum_som_old2new[les_elems(i,j)];
91 assert (tmp < compteur);
97 for (
int ii=0; ii<nb_bords; ii++)
104 for(
int_t i=0; i<nb_faces; i++)
105 for(
int j=0; j<nb_som_face; j++)
108 if (faces_sommets(i,j)==-1)
break;
109 int_t& tmp=renum_som_old2new[faces_sommets(i,j)];
110 assert (tmp < compteur);
116 int_t nb_som_new=compteur;
117 Cerr <<
"Elimination of " << nb_som_init - nb_som_new <<
" unnecessary nodes in the domain " << dom.
le_nom() << finl;
118 if(nb_som_new!=nb_som_init)
123 for (
int_t i=0; i<nb_som_init ; i++)
124 if((j=renum_som_old2new[i])!=-1)
125 renum_som_new2old[j]=i;
132 for (i=0; i<nb_som_new ; i++)
135 new_coord(i,j)=coord_sommets(renum_som_new2old[i],j);
137 coord_sommets=new_coord;
139 for (i=0; i<nb_elem ; i++)
140 for (j=0; j<nb_som_elem ; j++)
142 int_t num_som=les_elems(i,j);
144 les_elems(i,j)=renum_som_old2new[num_som];
159 for (
int_t i = 0; i < nb_faces; i++)
160 for (
int j = 0; j < nb_som_face; j++)
162 int_t som = old_faces_sommets(i, j);
164 faces_sommets(i, j) = renum_som_old2new[som];
166 faces_sommets(i, j) = som;
171 auto renum_lamb = [&](
auto& itr_arg)
179 for (
int_t i = 0; i < nb_faces; i++)
180 for (
int j = 0; j < nb_som_face; j++)
181 faces_sommets(i, j) = renum_som_old2new[old_faces_sommets(i, j)];
200template <
typename _SIZE_>
203 Cerr<<finl<<
"Beginning of the search of identical nodes (can be long, algorithm in n^2)..."<<finl;
245 int_t tmp,pourcent=0;
246 for (
int_t sommet=0; sommet<ns; sommet++)
248 tmp =(sommet*100)/ns;
252 Cerr << pourcent <<
"% of nodes have been verified\r " << flush;
254 for (
int_t sommet2=sommet+1; sommet2<ns; sommet2++)
258 ok=ok&&(est_egal(coord_sommets(sommet,dir),coord_sommets(sommet2,dir)));
263 Cerr<< finl <<
"The nodes "<<sommet<<
" and "<<sommet2<<
" are the same !"<<finl;
269 Cerr<<
"End of the search of identical nodes."<<finl;
DoubleTab_t & les_sommets()
const Frontiere_t & frontiere(int i) const
Raccords_t & faces_raccord()
Bords_Internes_t & bords_int()
Groupes_Faces_t & groupes_faces()
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
Class defining operators and methods for all reading operation in an input flow (file,...
const IntTab_t & les_sommets() const
Renvoie le tableau des sommets de toutes les faces.
const Faces_t & faces() const
classe Interprete_geometrique_base .
void associer_domaine(Nom &nom_dom)
Domaine_t & domaine(int i=0)
Classe NettoieNoeuds x->alpha x.
Domaine_32_64< _SIZE_ > Domaine_t
ArrOfInt_T< _SIZE_ > ArrOfInt_t
static void nettoie(Domaine_t &)
Entree & interpreter_(Entree &) override
Fonction principale de l'interprete NettoieNoeuds_32_64 Structure du jeu de donnee (en dimension 2) :
IntTab_T< _SIZE_ > IntTab_t
Faces_32_64< _SIZE_ > Faces_t
Frontiere_32_64< _SIZE_ > Frontiere_t
DoubleTab_T< _SIZE_ > DoubleTab_t
static void verifie_noeuds(const Domaine_t &)
regarde si on n'a pas des noeuds doubles
static int NettoiePasNoeuds
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
static void init_sequential_domain(Domaine_32_64< _SIZE_ > &dom)
Create parallel descriptors for the vertex and element arrays of the domain (necessary because Scatte...
static void uninit_sequential_domain(Domaine_32_64< _SIZE_ > &dom)
methode utilisee par les interpretes qui modifient le domaine (sequentiel), detruit les descripteurs ...
Classe de base des flux de sortie.
int dimension_int(int d) const
_SIZE_ dimension(int d) const