16#include <Connectivite_som_elem.h>
17#include <Check_espace_virtuel.h>
18#include <MD_Vector_composite.h>
19#include <VEF_discretisation.h>
20#include <EcrFicPartageBin.h>
21#include <Static_Int_Lists.h>
22#include <MD_Vector_tools.h>
23#include <Domaine_Cl_VEF.h>
24#include <Quadrangle_VEF.h>
25#include <Octree_Double.h>
26#include <Hexaedre_VEF.h>
27#include <Domaine_VEF.h>
28#include <EFichierBin.h>
29#include <Quadri_VEF.h>
30#include <Periodique.h>
31#include <TRUSTLists.h>
32#include <Periodique.h>
50 os <<
"____ h_carre " << finl;
51 os << h_carre << finl;
52 os <<
"____ type_elem_ " << finl;
53 os << type_elem_.valeur() << finl;
54 os <<
"____ nb_elem_std_ " << finl;
56 os <<
"____ volumes_entrelaces_ " << finl;
58 os <<
"____ face_normales_ " << finl;
60 os <<
"____ facette_normales_ " << finl;
61 facette_normales_.ecrit(os);
62 os <<
"____ nb_faces_std_ " << finl;
64 os <<
"____ rang_elem_non_std_ " << finl;
73 os << h_carre << finl;
74 os << type_elem_.valeur() << finl;
78 os << facette_normales_ << finl;
95 if (type ==
"Tri_VEF")
96 type_elem_ = Tri_VEF();
97 else if (type ==
"Tetra_VEF")
98 type_elem_ = Tetra_VEF();
99 else if (type ==
"Quadri_VEF")
100 type_elem_ = Quadri_VEF();
101 else if (type ==
"Hexa_VEF")
102 type_elem_ = Hexa_VEF();
105 Cerr << type <<
" is not an Elem_VEF!" << finl;
113 is >> facette_normales_;
121void exemple_champ_non_homogene(
const Domaine_VEF& domaine_VEF, DoubleTab& tab)
123 const DoubleTab& xp = domaine_VEF.
xp();
124 const Domaine& domaine=domaine_VEF.
domaine();
126 const DoubleTab& xa=domaine_VEF.
xa();
130 int nb_elem=domaine.nb_elem();
131 int nb_elem_tot=domaine.nb_elem_tot();
132 int nb_som=domaine.nb_som();
133 int nb_som_tot=domaine.nb_som_tot();
134 int nb_aretes=domaine.nb_aretes();
135 for (
int I=0 ; I<nb_elem; I++)
137 tab(I)=(1.1+xp(I,0))*(1.1+2*xp(I,1));
140 for (
int I=0; I<nb_som; I++)
142 tab(nb_elem_tot+I)=(1.1+coord(I,0))*(1.1+2*coord(I,1));
145 tab(nb_elem_tot+I)=tab(nb_elem_tot+domaine.get_renum_som_perio(I));
151 for (
int I=0; I<nb_aretes; I++)
153 tab(nb_elem_tot+nb_som_tot+I)=(1.1+xa(I,0))*(1.1+2*xa(I,1))*(1.1+3*xa(I,2));
155 tab(nb_elem_tot+nb_som_tot+I)=tab[nb_elem_tot+nb_som_tot+renum_arete_perio[I]];
157 assert(ok_arete(I)==ok_arete(renum_arete_perio[I]));
169 Domaine& domaine_geom =
domaine();
171 Elem_geom_base& elem_geom = domaine_geom.type_elem().valeur();
186 for (
int i = debut; i < fin; i++)
190 face_vois(i, 0) = face_vois(i, 1);
191 face_vois(i, 1) = -1;
199 if (sub_type(
Tri_VEF, type_elem_.valeur()))
201 if (!sub_type(Triangle, elem_geom))
203 Cerr <<
" The geometric element type " << elem_geom.
que_suis_je() <<
" is incorrect" << finl;
204 Cerr <<
" Only the Triangle type is compatible with VEF discretization in 2D" << finl;
205 Cerr <<
" The domain must be triangulated when using the internal mesher";
206 Cerr <<
" using the instruction: Trianguler nom_dom" << finl;
210 else if (sub_type(
Tetra_VEF, type_elem_.valeur()))
212 if (!sub_type(Tetraedre, elem_geom))
214 Cerr <<
" The geometric element type " << elem_geom.
que_suis_je() <<
" is incorrect" << finl;
215 Cerr <<
" Only the Tetraedre type is compatible with VEF discretization in 3D" << finl;
216 Cerr <<
" The domain must be tetrahedralized when using the internal mesher";
217 Cerr <<
" using the instruction: Tetraedriser nom_dom" << finl;
222 else if (sub_type(
Quadri_VEF, type_elem_.valeur()))
225 if (!sub_type(Quadrangle_VEF, elem_geom))
227 Cerr <<
" The geometric element type " << elem_geom.
que_suis_je() <<
" is incorrect" << finl;
231 else if (sub_type(
Hexa_VEF, type_elem_.valeur()))
234 if (!sub_type(Hexaedre_VEF, elem_geom))
236 Cerr <<
" The geometric element type " << elem_geom.
que_suis_je() <<
" is incorrect" << finl;
254 type_elem_->creer_face_normales(
face_normales_, face_som, face_vois, elem_face, domaine_geom);
261 Cerr <<
"Informations of the Domaine VEF of the domain " <<
domaine().
le_nom() <<
" : " << finl;
272 const int nb_som_elem = elements.
dimension(1);
276 const DoubleVect& volume_elem =
volumes();
277 assert_espace_virtuel_vect(volume_elem);
281 operator_egal(volumes_som_, 0., VECT_ALL_ITEMS);
282 for(
int k=0; k<n; k++)
284 double volume = coeff * volume_elem(k);
285 for(
int isom=0; isom<nb_som_elem; isom++)
287 int som = elements(k, isom);
288 volumes_som_(som)+=volume;
291 volumes_som_.echange_espace_virtuel();
327 md_vector_p1b_.copy(md_p1b);
329 Cerr <<
"the Domaine_VEF has been filled successfully" << finl;
356static int next(
int S,
357 const ArrOfInt& contenu)
375 const Domaine& dom =
domaine();
383 const int nb_aretes = aretes_som.
dimension(0);
388 for (
int i = 0; i < nb_aretes; i++)
390 const int s0 = aretes_som(i, 0);
391 const int s1 = aretes_som(i, 1);
392 for (
int j = 0; j < dim; j++)
393 xa_(i, j) = (coord(s0, j) + coord(s1, j)) * 0.5;
395 xa_.echange_espace_virtuel();
404 const int nb_aretes_elem = elem_aretes.
dimension(1);
406 assert(nb_aretes_elem == 6);
409 for (
int elem = 0; elem < nbr_elem; elem++)
411 double vol =
volumes(elem) / 6.0;
412 for(
int j = 0; j < nb_aretes_elem; j++)
414 int arete = elem_aretes(elem, j);
415 volumes_aretes[arete] += vol;
424 Cerr <<
"Build array ok_arete..." << finl;
427 const int nb_som_reel=
nb_som();
436 const int nb_aretes = aretes_som.
dimension(0);
437 Static_Int_Lists som_aretes;
442 aretes_som2.
copy(aretes_som, RESIZE_OPTIONS::NOCOPY_NOINIT);
444 for (
int i = 0; i < nb_aretes; i++)
446 if (renum_arete_perio[i] == i)
456 aretes_som2(i, 0) = nb_som_reel;
457 aretes_som2(i, 1) = nb_som_reel;
461 construire_connectivite_som_elem(nb_som_reel+1, aretes_som2, som_aretes, 0 );
465 ArrOfInt contenu(nb_som_reel);
472 for (
int i = 0; i < nb_som_reel; i++)
487 int nombre_aretes_superflues_prevues_sur_le_dom=0;
488 for (
int i=0; i<nb_som_reel; i++)
490 nombre_aretes_superflues_prevues_sur_le_dom++;
495 while (min_array(contenu)==0)
498 int Aroot=-1,Sroot=-1;
502 while (ok_arete(++Aroot)==0) {};
506 while (Aroot<nb_aretes && contenu[S0]!=0 && contenu[S1]!=0);
508 assert(Aroot<nb_aretes);
510 Aroot=renum_arete_perio[Aroot];
518 else if (!contenu[S1])
527 const int nb_aretes_voisines = som_aretes.
get_list_size(Sroot);
528 for(
int i=0; i<nb_aretes_voisines; i++)
530 int A=renum_arete_perio[som_aretes(Sroot,i)];
551 while((Sroot=next(Sroot, contenu))!=-1);
554 for(
int i=0; i<nb_aretes; i++)
555 ok_arete(i)=ok_arete[renum_arete_perio[i]];
556 for(
int i=0; i<nb_som_reel; i++)
561 ok_arete.echange_espace_virtuel();
571 Cerr <<
"Writing file " << fichier << finl;
573 if (!fic_ok_arete_.
ouvrir(fichier,ios::out))
575 Cerr <<
"Error: cannot open file " << fichier <<
" for writing." << finl;
579 ArrOfBit marqueurs_aretes;
585 fic_ok_arete_ << nb_aretes_seq << finl;
589 for (
int i = 0; i < n; i++)
591 if (marqueurs_aretes[i])
592 fic_ok_arete_ <<
xa_(i,0) << tspace <<
xa_(i,1) << tspace <<
xa_(i,2) << tspace << ok_arete(i) << finl;
595 fic_ok_arete_.
close();
600 Cerr <<
"Build array renum_arete_perio..." << finl;
606 renum_arete_perio.resize_array(nb_aretes_tot);
607 for (
int i=0; i<nb_aretes_tot; i++)
608 renum_arete_perio[i]=i;
614 for (
auto& itr : conds_lim)
626 IntVect fait(nf_bord_tot);
628 for(
int ind_face=0; ind_face<nf_bord_tot; ind_face++)
631 int face=le_bord.
num_face(ind_face);
633 int face_assciee=le_bord.
num_face(ind_faassociee);
634 fait(ind_faassociee)=fait(ind_face)=1;
639 for(
int j=0; j<6; j++)
641 aretes1[j]=elem_aretes(elem1,j);
642 aretes2[j]=elem_aretes(elem2,j);
645 for(
int j1=0; j1<6; j1++)
648 int& ar1_perio = renum_arete_perio[ar1];
650 int som11=aretes_som(ar1, 0);
651 int som12=aretes_som(ar1, 1);
653 int nbf =
domaine().type_elem()->nb_som_face();
655 for (
int k=0; k<nbf; k++)
656 if (sommet(face,k)==som11 || sommet(face,k)==som12) ok++;
662 for(
int j2=0; j2<6; j2++)
665 int& ar2_perio = renum_arete_perio[ar2];
666 int som21=aretes_som(ar2, 0);
667 int som22=aretes_som(ar2, 1);
670 for (
int k=0; k<nbf; k++)
671 if (sommet(face_assciee,k)==som21 || sommet(face_assciee,k)==som22) ok++;
679 if ( ( (s21==s11)||(s22==s11) ) && ( (s22==s12)||(s21==s12) ) )
683 int arete_perio = (
xa(ar1_perio,dir_perio)<=
xa(ar2_perio,dir_perio)) ? ar1_perio : ar2_perio;
696 ar2_perio = arete_perio;
697 ar1_perio = arete_perio;
698 volumes_aretes(ar2)+=volumes_aretes(ar1);
699 volumes_aretes(ar1)+=volumes_aretes(ar2);
710 for (
int i = 0; i < nb_aretes_tot; i++)
712 int j = renum_arete_perio[i];
714 while (j != renum_arete_perio[j])
715 j = renum_arete_perio[j];
716 renum_arete_perio[i] = j;
724 for (
int i=0; i<n; i++)
725 tmp[i] = renum_arete_perio[i];
732 Cerr <<
"Check array ok_arete..." << finl;
739 const int nb_som_reel=
nb_som();
741 int nb_aretes_pour_verbose=60;
742 ArrOfInt sommet_relie_arete_superflue(nb_som_reel);
743 sommet_relie_arete_superflue=0;
744 for (
int i=0; i<nb_som_reel; i++)
746 sommet_relie_arete_superflue[i]=1;
748 double nombre_aretes_reelles_superflues=0;
752 for (
int i=0; i<nb_aretes_tot; i++)
756 int S0=aretes_som(i,0);
759 sommet_relie_arete_superflue[S0]=1;
762 int S1=aretes_som(i,1);
765 sommet_relie_arete_superflue[S1]=1;
768 if (renum_arete_perio[i]==i)
770 if (nb_aretes_tot<nb_aretes_pour_verbose)
772 if (renum_arete_perio[i]==i) Cerr <<
"[" <<
Process::me() <<
"] Arete " << i <<
" superflue non perio: " << S0 <<
" " << S1 << finl;
773 else Cerr <<
"[" <<
Process::me() <<
"] Arete " << i <<
" superflue perio: " << S0 <<
" " << S1 <<
" Periodique avec " << renum_arete_perio[i] << finl;
775 int aretes_superflues_communes=1;
779 int nb_aretes_sur_le_joint = dom.
faces_joint()(j).joint_item(JOINT_ITEM::ARETE).items_communs().size_array();
780 for (
int k=0; k<nb_aretes_sur_le_joint; k++)
781 if (dom.
faces_joint()(j).joint_item(JOINT_ITEM::ARETE).items_communs()[k]==i) aretes_superflues_communes++;
784 if (i<nb_aretes_reelles)
785 nombre_aretes_reelles_superflues+=1./aretes_superflues_communes;
790 if (nb_som_reel > 0 && min_array(sommet_relie_arete_superflue)==0)
792 Cerr << finl <<
"[" <<
Process::me() <<
"] There is at least one vertex not linked to a redundant edge:" << finl;
793 for (
int i=0; i<sommet_relie_arete_superflue.
size_array(); i++)
794 if (sommet_relie_arete_superflue[i]==0) Cerr <<
"Vertex " << i << finl;
797 Cerr <<
"[" <<
Process::me() <<
"] Verification that each non-periodic vertex is linked to at least one redundant edge: OK!" << finl;
799 double nb_sommets_non_periodiques=0;
800 for (
int i=0; i<nb_som_reel; i++)
803 int sommets_communs=1;
806 for (
int k=0; k<dom.
faces_joint()(j).joint_item(JOINT_ITEM::SOMMET).items_communs().size_array(); k++)
807 if (dom.
faces_joint()(j).joint_item(JOINT_ITEM::SOMMET).items_communs()[k]==i) sommets_communs++;
808 nb_sommets_non_periodiques+=1./sommets_communs;
810 double total_nombre_aretes_superflues =
mp_sum(nombre_aretes_reelles_superflues);
811 double somme_nombre_aretes_superflues_prevues_par_domaine =
mp_sum_as_double(nombre_aretes_superflues_prevues_sur_le_dom);
812 double total_nb_sommets_non_periodiques =
mp_sum(nb_sommets_non_periodiques);
819 for (
int i=0; i<nb_aretes_tot; i++)
821 if (renum_arete_perio[i]!=i)
824 assert(ok_arete(i)==ok_arete(renum_arete_perio[i]));
836 if (!est_egal(somme_nombre_aretes_superflues_prevues_par_domaine,total_nombre_aretes_superflues) &&
je_suis_maitre())
838 Cerr <<
"The sum of redundant edges predicted per domain is not equal to the number of redundant edges found on the domain." << finl;
839 Cerr << somme_nombre_aretes_superflues_prevues_par_domaine <<
" != " << total_nombre_aretes_superflues << finl;
842 Cerr <<
"Total number of redundant edges: " << somme_nombre_aretes_superflues_prevues_par_domaine << finl;
843 Cerr <<
"Total number of non-periodic vertices = " << total_nb_sommets_non_periodiques << finl;
844 Cerr <<
"Verifying equality between total number of redundant edges and total number of vertices: ";
846 if (!est_egal(somme_nombre_aretes_superflues_prevues_par_domaine,total_nb_sommets_non_periodiques) &&
je_suis_maitre())
848 Cerr <<
"Mismatch. Failure of the redundant edge search algorithm." << finl;
851 Cerr <<
"OK!" << finl <<
"Redundant edge verification correct." << finl;
864 Cerr <<
"Trying to read file " << fichier <<
" (edges to remove from the set of degrees of freedom)" << finl;
867 if (!fic_ok_arete_.
ouvrir(fichier,ios::out))
869 Cerr <<
"File " << fichier <<
" does not exist." << finl;
877 Cerr <<
"File " << fichier <<
" is not compatible with the current mesh." << finl;
881 Octree_Double octree;
884 ArrOfInt liste_aretes;
890 for (
int i = 0; i < n; i++)
894 fic_ok_arete_ >> x >> y >> z >> flag;
900 Cerr <<
"File " << fichier <<
" is not compatible with the current mesh." << finl;
905 const int arete = liste_aretes[0];
906 ok_arete[arete] = flag;
916 if (max_array(marqueurs) > 1 || min_array(marqueurs) < 1)
918 Cerr <<
"File " << fichier <<
" is not compatible with the current mesh." << finl;
922 Cerr <<
"File " << fichier <<
" is OK." << finl;
923 fic_ok_arete_.
close();
924 assert_espace_virtuel_vect(ok_arete);
940 h_carre_.resize(nbe);
944 CDoubleArrView volumes_v =
volumes().view_ro();
946 DoubleArrView h_carre_v = h_carre_.view_rw();
947 Kokkos::parallel_reduce(start_gpu_timer(__KERNEL_NAME__), range_1D(0, nbe),
948 KOKKOS_LAMBDA(
const int num_elem,
double& h_carre_local)
951 for (
int i = 0; i < nb_faces_elem; i++)
953 double surf = face_surfaces_v(elem_faces_v(num_elem, i));
954 surf_max = (surf > surf_max) ? surf : surf_max;
956 double vol = volumes_v(num_elem) / surf_max;
958 h_carre_v(num_elem) = vol;
959 if (vol < h_carre_local) h_carre_local = vol;
960 }, Kokkos::Min<double>(h_carre));
961 end_gpu_timer(__KERNEL_NAME__);
962 h_carre =
mp_min(h_carre);
963 Cerr <<
"Lowest cell size h=(Volume/max(Surface))= " << sqrt(h_carre) << finl;
965 Kokkos::parallel_reduce(start_gpu_timer(__KERNEL_NAME__), range_1D(0, nbe),
966 KOKKOS_LAMBDA(
const int i,
double& sum)
970 end_gpu_timer(__KERNEL_NAME__);
971 moyenne =
mp_sum(moyenne);
972 double h_carre_moyen = moyenne /
mp_sum((
double) nbe);
973 Cerr <<
"Average cell size <h>= " << sqrt(h_carre_moyen) << finl;
974 if (h_carre * 1e6 < h_carre_moyen)
975 Cerr <<
"Warning, a cell size is more than 1000 times smaller than the average cell size of the domain. Check your mesh." << finl;
976 Cerr <<
"==============================================" << finl;
995 const double facteur = 1. / nb_faces_elem;
996 for (num_face = 0; num_face < nmax; num_face++)
1002 for (; num_face < nmax; num_face++)
1013 Journal() <<
"Domaine_VEF::Modifier_pour_Cl" << finl;
1014 for (
auto &itr : conds_lim)
1026 ToDo_Kokkos(
"critical");
1027 for (
int ind_face = 0; ind_face < la_front_dis.
nb_faces_tot(); ind_face++)
1029 int face = la_front_dis.
num_face(ind_face);
1063 static DoubleVect* ptr=0;
1064 if(ptr!=&volumes_som_)
1069 DoubleArrView volumes_som = volumes_som_.view_rw();
1070 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), range_1D(0, ns), KOKKOS_LAMBDA(
const int i)
1072 int j = renum_som_perio(i);
1074 Kokkos::atomic_add(&volumes_som(j), volumes_som(i));
1076 end_gpu_timer(__KERNEL_NAME__);
1077 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), range_1D(0, ns), KOKKOS_LAMBDA(
const int i)
1079 int j = renum_som_perio(i);
1081 volumes_som(i) = volumes_som(j);
1083 end_gpu_timer(__KERNEL_NAME__);
1084 volumes_som_.echange_espace_virtuel();
1085 ptr = &volumes_som_;
1092 const Domaine& dom =
domaine();
1095 for (
int i=0; i<n; i++)
1129 const Elem_geom_base& elem_geom = domaine_geom.type_elem().valeur();
1130 if (sub_type(Rectangle, elem_geom))
1131 domaine_geom.
typer(
"Quadrangle");
1132 else if (sub_type(Hexaedre, elem_geom))
1133 domaine_geom.
typer(
"Hexaedre_VEF");
1135 const Nom& type_elem_geom = domaine_geom.type_elem()->
que_suis_je();
1137 if (
Motcle(type_elem_geom) !=
"Segment")
1140 if (type_elem_geom ==
"Triangle")
1142 else if (type_elem_geom ==
"Tetraedre")
1144 else if (type_elem_geom ==
"Quadrangle")
1145 type =
"Quadri_VEF";
1146 else if (type_elem_geom ==
"Hexaedre_VEF")
1150 Cerr <<
"typing problem in Elem_VEF::typer" << finl;
1153 type_elem_.typer(type);
1161 if (vecteur_face_facette_.size() == 0 ||
domaine().deformable())
1166 vecteur_face_facette_.resize(nb_poly_tot, nfa7,
dimension, 2);
1170 const DoubleTab& xg =
xp();
1172 for (
int poly = 0; poly < nb_poly_tot; poly++)
1175 for (
int fa7 = 0; fa7 < nfa7; fa7++)
1184 double coord_centre_fa7 = xg(poly, i);
1185 for (
int num_som_fa7 = 0; num_som_fa7 < nb_som_facette - 1; num_som_fa7++)
1187 int isom_loc = KEL(num_som_fa7 + 2, fa7);
1188 int isom_glob = les_Polys(poly, isom_loc);
1189 coord_centre_fa7 += coord(isom_glob, i);
1191 coord_centre_fa7 /= nb_som_facette;
1193 vecteur_face_facette_(poly,fa7,i,0) = coord_centre_fa7 -
xv_(num1,i);
1194 vecteur_face_facette_(poly,fa7,i,1) = coord_centre_fa7 -
xv_(num2,i);
1199 Cerr <<
"Build of vecteur_face_facette() size:" << vecteur_face_facette_.size_array() << finl;
1201 return vecteur_face_facette_;
int_t size_array() const
Returns the size of the array in bits.
Empty class used as a base for all the arrays.
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
class Conds_lim This class represents a vector of boundary conditions.
static void verifier_indices_items(const char *const msg, const MD_Vector &, const IntVect &)
Tests the content of the vector v assuming it contains item indices associated with the descriptor md...
static void verifier_getref(const char *const msg, double val, double &refval)
like verifier(), but, in "read&compare" mode, put the reference value found in the file in the ref va...
static int active()
Returns 1 if we are in Debog mode, 0 otherwise.
static void verifier(const char *const msg, double)
int_t nb_aretes_tot() const
returns the total number of edges (real+virtual).
virtual const MD_Vector & md_vector_sommets() const
const IntTab_t & aretes_som() const
returns the connectivity array edges/vertices.
DoubleTab_t & les_sommets()
int_t get_renum_som_perio(int_t i) const
int nb_faces_elem(int=0) const
Returns the number of faces of type i of the geometric elements that make up the domain.
int_t nb_aretes() const
Returns the number of real edges.
void typer(const Nom &)
Sets the element type of the domain using the name passed as parameter.
const DoubleTab_t & coord_sommets() const
virtual void creer_tableau_sommets(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Creates an array with one "row" per mesh vertex.
virtual const MD_Vector & md_vector_elements() const
Returns the parallel descriptor of element arrays of the domain.
int_t elem_aretes(int_t i, int j) const
returns the number of the j-th edge of the i-th element.
virtual void creer_tableau_p1bulle(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
void verifie_ok_arete(int) const
void construire_ok_arete()
const IntVect & get_ok_arete() const
IntVect & rang_elem_non_std()
void modifier_pour_Cl(const Conds_lim &) override
DoubleTab & vecteur_face_facette()
void calculer_volumes_entrelaces()
void typer_elem(Domaine &) override
const Elem_VEF_base & type_elem() const
const ArrOfInt & get_renum_arete_perio() const
virtual void discretiser_suite(const VEF_discretisation &)
virtual const MD_Vector & md_vector_p1b() const
void construire_renum_arete_perio(const Conds_lim &)
void discretiser() override
IntVect rang_elem_non_std_
void creer_tableau_aretes(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
virtual const DoubleVect & face_surfaces() const
int nb_faces() const
Returns the total number of faces.
IntTab & face_sommets() override
Returns the face/vertex connectivity array.
DoubleVect volumes_entrelaces_
const MD_Vector & md_vector_faces() const
const MD_Vector & md_vector_aretes() const
int nb_faces_tot() const
Returns the total number of faces.
double xa(int num_arete, int k) const
void creer_tableau_faces(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
void discretiser() override
Generates the faces and builds the boundaries.
IntTab & elem_faces()
Returns the element/face connectivity array.
double xp(int num_elem, int k) const
void construire_num_fac_loc()
int premiere_face_int() const
A face is internal if and only if it separates two elements.
MD_Vector md_vector_aretes_
IntTab & face_voisins() override
Returns the face-element connectivity array; see above.
void marquer_faces_double_contrib(const Conds_lim &)
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
const Domaine & domaine() const
Reading from a file of objects written in binary format.
Writing to a shared file. This class derives from Ecr_Fic_Par, using binary output.
int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::out) override
Opens the file with the given mode and prot parameters. These parameters are the parameters of the st...
Sortie & syncfile() override
Triggers writing to disk of the data accumulated on the different processors since the last call to s...
const IntTab & KEL() const
virtual int nb_facette() const =0
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in)
Class defining operators and methods for all reading operation in an input flow (file,...
int num_face(const int) const
int get_sequential_items_flags(ArrOfBit &flags, int line_size=1) const
virtual trustIdType nb_items_seq_tot() const
Metadata for a distributed composite vector.
void add_part(const MD_Vector &part, int shape=0, Nom name="")
Append the "part" descriptor to the composite vector.
: This class is an OWN_PTR but the pointed object is shared among multiple
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
static double precision_geom
static const Nom & nom_du_cas()
Returns a constant reference to the case name. This method is static.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static int_t search_nodes_close_to(double x, double y, double z, const DoubleTab_t &coords, ArrOfInt_t &node_list, double epsilon)
Non-member method. Searches among the vertices in node_list for those within a distance.
void build_nodes(const DoubleTab_t &coords, const bool include_virtual, const double epsilon=0.)
builds an octree containing the points with coordinates coords.
int_t search_elements_box(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax, ArrOfInt_t &elements) const
searches for all elements or points potentially having a non-empty intersection with the given box.
class Periodique This class represents a periodic boundary condition.
int face_associee(int i) const
int direction_periodicite() const
static double mp_min(double)
static Sortie & Journal(int message_level=0)
Returns a static Sortie object used as an event journal.
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
static double mp_sum_as_double(int v)
static int me()
Returns the rank of the local processor in the current communication group. See Comm_Group::rank() an...
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
static bool is_sequential()
Base class for output streams.
int_t get_list_size(int_t i_liste) const
Returns the number of elements in list i.
_SIZE_ size_array() const
void copy(const TRUSTTab &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, ConstView< _TYPE_, _SHAPE_ > > view_ro() const
_SIZE_ dimension(int d) const
virtual const MD_Vector & get_md_vector() const
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
int get_modif_div_face_dirichlet() const
int get_cl_pression_sommet_faible() const