16#include <Reorienter_triangles.h>
23template <
typename _SIZE_>
29template <
typename _SIZE_>
35template <
typename _SIZE_>
38 Cerr <<
"Reorientation of triangles for either direct..." << finl;
41 Cerr <<
"we can not reorientate (Reorienter) triangles in dimension " <<
Objet_U::dimension <<finl;
49 Cerr <<
"Reorientation of triangles... OK" << finl;
53template <
typename _SIZE_>
56 static const int SOM_Z = 0;
57 static const int SOM_A = 1;
58 static const int SOM_B = 2;
60 const int_t som_Z = les_elems(ielem,SOM_Z);
61 const int_t som_A = les_elems(ielem,SOM_A);
62 const int_t som_B = les_elems(ielem,SOM_B);
64 double ZA0 = coord_sommets(som_A,0) - coord_sommets(som_Z,0);
65 double ZB0 = coord_sommets(som_B,0) - coord_sommets(som_Z,0);
66 double ZA1 = coord_sommets(som_A,1) - coord_sommets(som_Z,1);
67 double ZB1 = coord_sommets(som_B,1) - coord_sommets(som_Z,1);
70 double pdtvect = ZA0*ZB1 - ZA1*ZB0;
80 return Sens_Orient::INDIRECT;
88 return Sens_Orient::DIRECT;
91template <
typename _SIZE_>
94 static const int SOM_A = 1;
95 static const int SOM_B = 2;
99 tmp = les_elems(num_element,SOM_A);
100 les_elems(num_element,SOM_A) = les_elems(num_element,SOM_B);
101 les_elems(num_element,SOM_B) = tmp;
102 return Sens_Orient::DIRECT;
108template <
typename _SIZE_>
120 for (
int_t ielem=0 ; ielem<nb_elems ; ielem++)
130 static const int SOM_Z = 0;
131 static const int SOM_A = 1;
132 static const int SOM_B = 2;
133 const int som_Z = les_elems(ielem,SOM_Z);
134 const int som_A = les_elems(ielem,SOM_A);
135 const int som_B = les_elems(ielem,SOM_B);
136 Process::Journal<<
" somZ= "<<som_Z<<
" coords= "<<coord_sommets(som_Z, 0)<<
" "<<coord_sommets(som_Z, 1)<<finl;
137 Process::Journal<<
" somA= "<<som_A<<
" coords= "<<coord_sommets(som_A, 0)<<
" "<<coord_sommets(som_A, 1)<<finl;
138 Process::Journal<<
" somB= "<<som_B<<
" coords= "<<coord_sommets(som_B, 0)<<
" "<<coord_sommets(som_B, 1)<<finl;
const DoubleTab_t & coord_sommets() const
Class defining operators and methods for all reading operation in an input flow (file,...
classe Interprete_geometrique_base .
void associer_domaine(Nom &nom_dom)
Domaine_t & domaine(int i=0)
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
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 Sortie & Journal(int message_level=0)
Renvoie un objet statique de type Sortie qui sert de journal d'evenements.
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
class Reorienter_triangle Balaye les triangles du maillage pour qu'ils soient directs.
IntTab_T< _SIZE_ > IntTab_t
void reorienter(Domaine_t &) const
Sens_Orient reorienter_triangle(IntTab_t &les_elems, int_t ielem) const
Sens_Orient test_orientation_triangle(IntTab_t &les_elems, int_t ielem, const DoubleTab_t &coord_sommets) const
Domaine_32_64< _SIZE_ > Domaine_t
DoubleTab_T< _SIZE_ > DoubleTab_t
Entree & interpreter_(Entree &) override
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.
_SIZE_ dimension(int d) const