19#include <Sous_Domaine.h>
21#include <Poly_geom_base.h>
23#include <Octree_Double.h>
24#include <Periodique.h>
25#include <Reordonner_faces_periodiques.h>
26#include <Frontiere_dis_base.h>
29#include <NettoieNoeuds.h>
31#include <TRUST_2_MED.h>
32#include <Comm_Group_MPI.h>
33#include <Option_Interpolation.h>
34#include <Array_tools.h>
35#include <Schema_Comm.h>
36#include <Interprete_bloc.h>
37#include <Extraire_surface.h>
38#include <Domaine_VF.h>
39#include <MD_Vector_std.h>
40#include <MD_Vector_seq.h>
41#include <Reorder_Mesh.h>
42#include <Perf_counters.h>
52static double cached_memory = 0;
54template<
class LIST_FRONTIERE>
55void check_frontiere(
const LIST_FRONTIERE& list,
const char *msg)
58 if (!is_parallel_object(n))
60 Cerr <<
" Fatal error: processors don't have the same number of boundaries " << msg << finl;
64 for (
int i = 0; i < n; i++)
67 Cerr <<
" Boundary " << msg <<
" : " << nom << finl;
68 if (!is_parallel_object(nom))
70 Cerr <<
" Fatal error: processors don't have the same number of boundaries " << msg << finl;
79template <
class _SIZE_>
86 int typ_commun_i =
static_cast<int>(typ);
87 envoyer_broadcast(typ_commun_i, min_pe);
88 Type_Face typ_commun =
static_cast<Type_Face
>(typ_commun_i);
90 if (typ_commun != typ)
92 if (typ != Type_Face::vide_0D)
94 Cerr <<
"Error in Domaine.cpp corriger_type: invalid boundary face type" << finl;
97 faces.
typer(typ_commun);
107template<
typename _SZ_>
124 domaines_frontieres_.vide();
125 les_ss_domaines_.vide();
128 bords_a_imprimer_.vide();
129 bords_a_imprimer_sum_.vide();
153template<
typename _SZ_>
156 Cerr <<
"Writing of " << nb_som() <<
" nodes." << finl;
157#ifdef SORT_POUR_DEBOG
158 s.
setf(ios::scientific);
167 Cerr <<
"Writing of " << nb_elem() <<
" elements." << finl;
168 s <<
"DUMMY_ZONE" << finl;
171 s << mes_faces_bord_;
172 s << mes_faces_joint_;
173 s << mes_faces_raccord_;
175 if (nb_groupes_faces() !=0)
177 s << finl <<
"groupes_faces" << finl;
178 s << mes_groupes_faces_;
182 s << finl <<
"bords_perio" << finl;
192template<
typename _SZ_>
196 return readOn_has_perio(s, dnu);
207template<
typename _SZ_>
210#ifdef SORT_POUR_DEBOG
211 s.setf(ios::scientific);
225 Cerr <<
"Reading domain " <<
le_nom() << finl;
229 Cerr <<
" Number of nodes: " << nbsom << finl;
242 Cerr <<
" Number of nodes after node-cleanup: " << nbsom << finl;
257template<
typename _SZ_>
262 Cerr <<
" Reading part of domain " <<
le_nom() << finl;
277 if (acc ==
"groupes_faces")
284 if (acc ==
"bords_perio")
291 Process::exit(
"misformatted domain file : One expected a closing bracket } to end. ");
294template<
class LIST_FRONTIERE>
295void check_frontiere(
const LIST_FRONTIERE& list,
const char *msg)
298 if (!is_parallel_object(n))
300 Cerr <<
" Fatal error: processors don't have the same number of boundaries " << msg << finl;
303 for (
int i = 0; i < n; i++)
306 Cerr <<
" Boundary " << msg <<
" : " << nom << finl;
307 if (!is_parallel_object(nom))
309 Cerr <<
" Fatal error: processors don't have the same number of boundaries " << msg << finl;
315template<
class LIST_FRONTIERE>
316void check_frontiere_own_ptr(
const LIST_FRONTIERE& list,
const char *msg)
319 if (!is_parallel_object(n))
321 Cerr <<
" Fatal error: processors don't have the same number of boundaries " << msg << finl;
324 for (
int i = 0; i < n; i++)
327 Cerr <<
" Boundary " << msg <<
" : " << nom << finl;
328 if (!is_parallel_object(nom))
330 Cerr <<
" Fatal error: processors don't have the same number of boundaries " << msg << finl;
339template<
typename _SZ_>
346 for (i = 0; i < n; i++)
347 ::corriger_type(
frontiere(i).faces(), type_elem());
351 Cerr <<
"Warning, the reread domaine " <<
nom_ <<
" has no defined boundaries (none boundary or connector)." << finl;
358 elem_->associer_domaine(*
this);
362 Cerr <<
" Number of elements: " <<
nb_elem << finl;
381template<
typename _SZ_>
388 for (i = 0; i < sz_sommets; i++)
391 xg(i, k) += les_coord(sommets(i, j), k);
403template<
typename _SZ_>
406 bool set_cache =
false;
411 if (!deriv_octree_ || !deriv_octree_->construit())
414 cached_elements_.reset();
415 cached_positions_.reset();
420 for (
int i = 0; i < cached_positions_.size(); i++)
421 if (sameDoubleTab(positions, cached_positions_[i]))
423 int size = cached_positions_[i].dimension(0);
426 elements = cached_elements_[i];
437 elements.
resize_tab(sz, RESIZE_OPTIONS::NOCOPY_NOINIT);
439 for (
int i = 0; i < sz; i++)
441 double x = positions(i, 0);
452 if (cached_positions_.size()>100)
455 Cerr <<
"Warning, cache flushed in Domaine_32_64<_SZ_>::chercher_elements() cause too much lines used !" << finl;
456 cached_elements_.reset();
457 cached_positions_.reset();
463 cached_positions_.add(positions);
464 cached_elements_.add(elements);
466 int last = cached_positions_.size();
467 mapToDevice(cached_positions_[last-1]);
468 mapToDevice(cached_elements_[last-1]);
469 cached_memory += (double)(positions.
size_array() *
sizeof(
double));
470 cached_memory += (double)(elements.
size_array() *
sizeof(
int));
471 if (cached_memory > 1e7)
473 Cerr << 2 * cached_positions_.size() <<
" arrays cached in memory for Domaine_32_64<_SZ_>::chercher_elements(...): ";
474 if (cached_memory < 1e6)
475 Cerr << int(cached_memory / 1024) <<
" KBytes" << finl;
477 Cerr << int(cached_memory / 1024 / 1024) <<
" MBytes" << finl;
490template<
typename _SZ_>
493 int n = positions.
size();
496 Cerr <<
"Domaine_32_64::chercher_elements(const DoubleVect& positions, ArrOfInt& elements, int reel) const -> Coding is made to copy a doublevect(dimesnion) in a DoubleTab(1,dimension)" << finl;
497 Cerr <<
"But, it comes with a DoubleVect of size " << n <<
" instead of " <<
dimension << finl;
501 DoubleTab positions2(1, n);
502 for (
int ii = 0; ii < n; ii++)
503 positions2(0, ii) = positions(ii);
514template<
typename _SZ_>
520 if ((face) < compteur)
527 if (face < nbf + compteur)
530 if ((face - compteur) < nbf)
535 compteur += (2 * nbf);
538 Cerr <<
"TRUST error in Domaine_32_64<_SZ_>::face_bords_interne_conjuguee " << finl;
545template<
typename _SZ_>
553 for (
auto it = list.begin(); it != list.end(); ++it)
557 Journal() <<
"Domaine_32_64<_SZ_>::comprimer() bord : " << front.
le_nom() << finl;
560 for (
auto it2 = std::next(it); it2 != list.end(); )
567 it2 = list.erase(it2);
580 for (
auto it = list.begin(); it != list.end(); ++it)
583 for (
auto it2 = std::next(it); it2 != list.end(); )
589 it2 = list.erase(it2);
600 for (
auto it = list.begin(); it != list.end(); ++it)
603 for (
auto it2 = std::next(it); it2 != list.end(); )
609 it2 = list.erase(it2);
620 for (
auto it = list.begin(); it != list.end(); ++it)
624 for (
auto it2 = std::next(it); it2 != list.end(); )
630 it2 = list.erase(it2);
647template<
typename _SZ_>
661template<
typename _SZ_>
675template<
typename _SZ_>
689template<
typename _SZ_>
702template<
typename _SZ_>
708template<
typename _SZ_>
712 assert(tableau_echange.
dimension(1) >= 2);
715 const int moi =
me();
716 for (
int_t i = 0; i < n; i++)
718 tableau_echange(i, 0) = moi;
719 tableau_echange(i, 1) = i;
723 elem_virt_pe_num_cpy.
resize(n_virt, 2);
724 for (
int_t i = 0; i < n_virt; i++)
726 elem_virt_pe_num_cpy(i, 0) = tableau_echange(n + i, 0);
727 elem_virt_pe_num_cpy(i, 1) = tableau_echange(n + i, 1);
734template<
typename _SZ_>
748 c[j] += xp(i, j) * volumes(i);
749 volume += volumes(i);
762template<
typename _SZ_>
767 elem_->calculer_volumes(volumes);
772 for (
int_t i = 0; i < size; i++)
774 double v = volumes(i);
777 Cerr <<
"Volume[" << i <<
"]=" << v << finl;
778 Cerr <<
"Several volumes of the mesh are not positive." << finl;
779 Cerr <<
"Something is wrong in the mesh..." << finl;
782 inverse_volumes(i) = 1. / v;
790template<
typename _SZ_>
801template<
typename _SZ_>
808template<
typename _SZ_>
812 deriv_octree_.detach();
815template<
typename _SZ_>
819 deriv_octree_.typer(
"OctreeRoot");
831template<
typename _SZ_>
835 deriv_octree_.typer(
"OctreeRoot");
849template<
typename _SZ_>
858template<
typename _SZ_>
864 Cerr <<
"Internal error in Domaine_32_64<_SZ_>::md_vector_elements(): descriptor for elements not initialized\n"
865 <<
" You might use a buggy Domain constructor that does not build descriptors,\n"
866 <<
" Use the following syntax to finish the domain construction\n"
867 <<
" Scatter ; " <<
le_nom() << finl;
875template<
typename _SZ_>
882template<
typename _SZ_>
889 double min_=0.5*DMAXFLOAT;
890 double max_=-0.5*DMAXFLOAT;
891 for (
int_t i=0; i<nbsom; i++)
894 min_ = (c < min_ ? c : min_);
895 max_ = (c > max_ ? c : max_);
907template<
typename _SZ_>
914 for(
int_t i=0; i<ajoutsz; i++)
915 for(
int k=0; k<dim; k++)
927template<
typename _SZ_>
942 ArrOfDouble tab_coord(dim);
944 for(
int_t i=0; i< ajoutsz; i++)
946 for (
int j = 0; j < dim; j++)
947 tab_coord[j] = soms(i,j);
951 if (nb_sommets_proches == 0)
956 else if (nb_sommets_proches == 1)
960 nums(i) = liste_sommets[0];
967 Cerr <<
"Error : several nodes of the domain 1 are within radius epsilon="
968 <<
epsilon_ <<
" of point " << tab_coord <<
". We must reduce epsilon. " << finl;
972 Cerr << compteur <<
" double nodes were found \n";
973 sommets_.resize(oldsz+ajoutsz-compteur,dim);
975 for(
int_t i =0; i<ajoutsz; i++)
978 nums(i)=oldsz+compteur;
980 for(
int k=0; k<dim; k++)
989 for(
int_t i=0; i<ajoutsz; i++)
998template<
typename _SZ_>
1008template<
typename _SZ_>
1019 Cerr <<
"Reading vertices for domain " <<
le_nom() << finl;
1030template <
typename _SZ_>
1035 os << itr.le_nom() << finl;
1039 os << itr->le_nom() << finl;
1043 os << itr.le_nom() << finl;
1047 os << itr.le_nom() << finl;
1050template <
typename _SZ_>
1056 if (itr.le_nom() == un_nom)
1063 if (itr->le_nom() == un_nom)
1070 if (itr.le_nom() == un_nom)
1077 if (itr.le_nom() == un_nom)
1081 Cerr <<
"Domaine_32_64<_SZ_>::rang_frontiere(): We have not found a boundary with name " << un_nom << finl;
1086template <
typename _SZ_>
1093template <
typename _SZ_>
1100template <
typename _SZ_>
1103 Journal() <<
"Domaine_32_64<_SZ_>::fixer_premieres_faces_frontiere()" << finl;
1107 itr.fixer_num_premiere_face(compteur);
1108 compteur += itr.nb_faces();
1109 Journal() <<
"Boundary " << itr.le_nom() <<
" starts at face: " << itr.num_premiere_face() << finl;
1113 itr->fixer_num_premiere_face(compteur);
1114 compteur += itr->nb_faces();
1115 Journal() <<
"Connection " << itr->le_nom() <<
" starts at face: " << itr->num_premiere_face() << finl;
1117 if (std::is_same<_SZ_, int>::value)
1120 itr.fixer_num_premiere_face((
int)compteur);
1121 compteur += itr.nb_faces();
1122 Journal() <<
"Joint " << itr.le_nom() <<
" starts at face: " << itr.num_premiere_face() << finl;
1125 itr.fixer_num_premiere_face(-1);
1129template<
typename _SZ_>
1130template<
typename _BORD_TYP_>
1131void Domaine_32_64<_SZ_>::correct_type_single_border_type(std::list<_BORD_TYP_>& list)
1134 for (
auto it = list.begin(); it != list.end(); ++it)
1136 Frontiere_t& front = *it;
1137 if (front.faces().type_face() == Type_Face::vide_0D)
1140 for (
auto it2 = std::next(it); it2 != list.end();)
1142 Frontiere_t& front2 = *it2;
1143 if (front.le_nom() == front2.le_nom())
1145 front.faces().typer(front2.faces().type_face());
1160template<
typename _SZ_>
1182template<
typename _SZ_>
1185 Cerr <<
"==============================================" << finl;
1186 Cerr <<
"The extreme coordinates of the domain " <<
le_nom() <<
" are:" << finl;
1192 bb_min[j] = BB(j,0);
1193 bb_max[j] = BB(j,1);
1199 if (j==0) Cerr <<
"x ";
1200 if (j==1) Cerr <<
"y ";
1201 if (j==2) Cerr <<
"z ";
1202 Cerr <<
"is between " << bb_min[j] <<
" and " << bb_max[j] << finl;
1204 Cerr <<
"==============================================" << finl;
1209 Cerr <<
"==============================================" << finl;
1210 Cerr <<
"The volume cells of the domain " <<
le_nom() <<
" are:" << finl;
1211 const int_t i_vmax = imax_array(volumes);
1212 const int_t i_vmin = imin_array(volumes);
1213 const double vmin_local = (i_vmin < 0) ? 1e40 : volumes[i_vmin];
1214 const double vmax_local = (i_vmax < 0) ? -1e40 : volumes[i_vmax];
1215 const double volmin =
mp_min(vmin_local);
1216 const double volmax =
mp_max(vmax_local);
1221 Cerr <<
"mean(volume cells)= " << volmoy << finl;
1222 Cerr <<
"min(volume cells)= " << volmin << finl;
1223 Cerr <<
"max(volume cells)= " << volmax << finl;
1224 if (volmin*1000<volmoy)
1226 Cerr <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << finl;
1227 Cerr <<
"Warning, a cell volume is more than 1000 times smaller than the average cell volume. Check your mesh." << finl;
1228 Cerr <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << finl;
1230 Cerr <<
"==============================================" << finl;
1235template<
typename _SZ_>
1238 Cerr <<
" Merging elem info for domain "<<
nom_ <<
" with " << dom2.
nom_ << finl;
1250 int nb_ccord =
les_elems().dimension_int(1);
1253 elems1.
resize(sz1+sz2, nb_ccord);
1254 for(
int_t i=0; i<sz2; i++)
1255 for(
int j=0; j<nb_ccord; j++)
1256 elems1(sz1+i,j)=elems2(i,j);
1277 for (
const auto &b : bp2)
1297template<
typename _SZ_>
1311template<
typename _SZ_>
1316 for (
int_t i = 0; i < nb_s; i++)
1324template<
typename _SZ_>
1328 Cerr <<
"Domaine: Creating a MEDCouplingUMesh object for the domain '" <<
le_nom() <<
"'" << finl;
1330 using MEDCoupling::DataArrayInt;
1331 using MEDCoupling::DataArrayDouble;
1336 INTERP_KERNEL::NormalizedCellType cell_type = type_geo_trio_to_type_medcoupling(type_ele, mesh_dim);
1337 MCAuto<MEDCouplingUMesh>& mc_mesh = virt ? mc_mesh_virt_ : mc_mesh_;
1338 mc_mesh = MEDCouplingUMesh::New(
nom_.getChar(), mesh_dim);
1344 MCAuto<DataArrayDouble>
coord(DataArrayDouble::New());
1351 coord->setInfoOnComponent(0,
"x");
1352 coord->setInfoOnComponent(1,
"y");
1354 mc_mesh->setCoords(
coord);
1364 conn_trust_to_med(les_elems2, type_ele,
true);
1366 mc_mesh->allocateCells(ncells);
1367 if (cell_type == INTERP_KERNEL::NORM_POLYHED)
1376 assert(ncells <= polyhedronIndex.
size_array() - 1);
1378 for (
int_t i = 0; i < ncells; i++)
1381 for (
int_t face = polyhedronIndex[i]; face < polyhedronIndex[i + 1]; face++)
1382 size += (
int)(facesIndex[face + 1] - facesIndex[face] + 1);
1384 ArrOfTID cell_def(size);
1386 for (
int_t face = polyhedronIndex[i]; face < polyhedronIndex[i + 1]; face++)
1388 for (
int_t node = facesIndex[face]; node < facesIndex[face + 1]; node++)
1389 cell_def[size++] = nodes_glob[node];
1392 cell_def[size++] = -1;
1394 mc_mesh->insertNextCell(cell_type, cell_def.
size_array(), cell_def.
addr());
1400 if (std::is_same<_SZ_, trustIdType>::value)
1403 for (
int_t i = 0; i < ncells; i++)
1405 int nvertices = nverts;
1407 for (
int j = nverts-1; j >= 0 && les_elems2(i, j) < 0; j--) nvertices--;
1409 mc_mesh->insertNextCell(cell_type, nvertices, (trustIdType *)(les_elems2.
addr() + i * nverts));
1415 for (
int_t i = 0; i < ncells; i++)
1417 ArrOfTID cell_def(nverts);
1419 for (; j<nverts && les_elems2(i, j) >= 0; j++)
1420 cell_def[j] = (trustIdType)les_elems2(i, j);
1421 mc_mesh->insertNextCell(cell_type, j, cell_def.
addr());
1425 *(virt ? &mc_mesh_virt_ready_ : &mc_mesh_ready_) =
true;
1431template<
typename _SZ_>
1432void Domaine_32_64<_SZ_>::prepare_rmp_with(
const Domaine_32_64& other_domain,
bool virt)
const
1435 using namespace MEDCoupling;
1439 const MEDCouplingUMesh* oth_msh = other_domain.get_mc_mesh(virt);
1441 Cerr <<
"Building remapper between " << le_nom() <<
" (" << (int)mc_mesh_->getSpaceDimension() <<
"D) mesh with " << (int)mc_mesh_->getNumberOfCells()
1442 <<
" cells and " << other_domain.
le_nom() <<
" (" << (int)oth_msh->getSpaceDimension() <<
"D) mesh with "
1443 << (int)oth_msh->getNumberOfCells() <<
" cells" << finl;
1444 rmps[&other_domain].prepare(oth_msh, mc_mesh_,
"P0P0");
1445 Cerr <<
"remapper prepared with " << rmps.at(&other_domain).getNumberOfColsOfMatrix() <<
" columns in matrix, with max value = " << rmps.at(&other_domain).getMaxValueInCrudeMatrix() << finl;
1447 Process::exit(
"Domaine_32_64<_SZ_>::prepare_rmp_with should not be called since it requires a TRUST version compiled with MEDCoupling !");
1451template <
typename _SIZE_>
1452void Domaine_32_64<_SIZE_>::prepare_dec_with(
const Domaine_32_64& other_domain, MEDCouplingFieldDouble *dist, MEDCouplingFieldDouble *loc)
const
1454#if defined(MEDCOUPLING_) && defined(MPI_)
1455 using namespace MEDCoupling;
1458 Cerr <<
"Building DEC of nature" << MEDCouplingNatureOfField::GetRepr(dist->getNature())
1460 <<
" cells) to " << le_nom() <<
" (" <<
Process::mp_sum(loc->getMesh()->getNumberOfCells()) <<
" cells) : ";
1464 decs.emplace(std::piecewise_construct,
1465 std::forward_as_tuple(&other_domain, dist->getNature()),
1467 OverlapDEC& dec = decs.at({ &other_domain, dist->getNature()});
1469 dec.attachSourceLocalField(dist);
1470 dec.attachTargetLocalField(loc);
1473 Cerr << statistics().compute_time(t0) <<
" s" << finl;
1475 Process::exit(
"Domaine::prepare_dec_with() should not be called since it requires a TRUST version compiled with MEDCoupling and MPI!");
1481template <
typename _SIZE_>
1484 if (!rmps.count(&other_domain))
1485 prepare_rmp_with(other_domain, virt);
1486 return &rmps.at(&other_domain);
1490template <
typename _SIZE_>
1493 if (!decs.count({ &other_domain, dist->getNature() } ))
1494 prepare_dec_with(other_domain, dist, loc);
1495 return &decs.at({ &other_domain, dist->getNature() });
1506template <
typename _SIZE_>
1509 Cerr <<
"Filling domain from list of domains in progress... " << finl;
1511 Process::exit(
"Error in Domaine_32_64<_SIZE_>::fill_from_list() : compression prohibited in parallel mode");
1512 if (lst.size() == 0)
1513 Process::exit(
"Error in Domaine_32_64<_SIZE_>::fill_from_list() : compression prohibited in parallel mode");
1515 for(
auto& elem: lst)
1525 Cerr <<
" Concatenating Domains "<<
nom_ <<
" and " << dom2.
nom_ << finl;;
1527 assert(typ_elem == dom2.type_elem()->
que_suis_je());
1533 dom2.
renum(les_nums);
1538 Cerr <<
"Filling from list - End!" << finl;
1547template <
typename _SIZE_>
1550 for (
int i_joint = 0; i_joint <
nb_joints(); i_joint++)
1554 sommets_communs[index] = Les_Nums[sommets_communs[index]];
1557 elements_distants += elem_offset;
1564template <
typename _SIZE_>
1568 for (
auto it = list.begin(); it != list.end(); ++it)
1571 for (
auto it2 = std::next(it); it2 != list.end();)
1577 it2 = list.erase(it2);
1599void echanger_tableau_aretes(
const IntTab& elem_aretes,
int nb_aretes_reelles, ArrOfInt& tab_aretes)
1603 const int nb_elem = elem_aretes.
dimension(0);
1605 const int nb_aretes_elem = elem_aretes.
dimension(1);
1616 ArrOfInt pe_arete(nb_aretes_reelles);
1619 IntVect pe_elem(nb_elem_tot);
1623 pe_elem.echange_espace_virtuel();
1628 for (i = nb_elem; i < nb_elem_tot; i++)
1629 for (
int pe = pe_elem[i], j = 0, a; j < nb_aretes_elem && (a = elem_aretes(i, j)) >= 0; j++)
1630 if (a < nb_aretes_reelles && pe_arete[a] > pe)
1639 tmp.
copy(elem_aretes, RESIZE_OPTIONS::NOCOPY_NOINIT);
1642 for (i = 0; i < nb_elem; i++)
1643 for (
int j = 0, a; j < nb_aretes_elem && (a = elem_aretes(i, j)) >= 0; j++)
1644 tmp(i, j) = tab_aretes[a];
1653 for (i = nb_elem; i < nb_elem_tot; i++)
1654 for (
int pe = pe_elem[i], j = 0, a; j < nb_aretes_elem && (a = elem_aretes(i, j)) >= 0; j++)
1655 if (a < nb_aretes_reelles && pe_arete[a] == pe)
1656 tab_aretes[a] = tmp(i, j);
1666 for (i = 0; i < nb_elem; i++)
1667 for (
int j = 0, a; j < nb_aretes_elem && (a = elem_aretes(i, j)) >= 0; j++)
1668 tmp(i, j) = tab_aretes[a];
1673 for (i = nb_elem; i < nb_elem_tot; i++)
1674 for (
int j = 0, a; j < nb_aretes_elem && (a = elem_aretes(i, j)) >= 0; j++)
1675 tab_aretes[a] = tmp(i, j);
1691 int it_selection = -1;
1694 for (
int t = 1; t < 4; t++)
1697 decentre_face(t, dir) = 1.;
1705 assert(item_possible.
size() != 0);
1707 while ((item_possible.
size() != 1) && (t < 4))
1709 double distmin = DMAXFLOAT;
1710 int size_initiale = item_possible.
size();
1711 dist.
resize(size_initiale);
1714 for (
int ind_it = 0; ind_it < size_initiale; ind_it++)
1717 dist[ind_it] += (coord_possible(ind_it, dir) - (coord_ref(dir) + decentre_face(t, dir))) * (coord_possible(ind_it, dir) - (coord_ref(dir) + decentre_face(t, dir)));
1718 if (dist[ind_it] <= distmin)
1719 distmin = dist[ind_it];
1723 int nb_it_suppr = 0;
1724 while (ind_it < size_initiale)
1726 if (!est_egal(dist[ind_it], distmin))
1728 int ind_it_suppr = ind_it - nb_it_suppr;
1729 int it_suppr = item_possible[ind_it_suppr];
1730 item_possible.
suppr(it_suppr);
1732 int size_actuelle = item_possible.
size();
1733 for (
int ind = ind_it_suppr; ind < size_actuelle; ind++)
1734 for (
int dir = 0; dir <
dimension; dir++)
1735 coord_possible(ind, dir) = coord_possible(ind + 1, dir);
1736 coord_possible.
resize(size_actuelle,
dimension, RESIZE_OPTIONS::COPY_NOINIT);
1743 if (item_possible.
size() == 1)
1744 it_selection = item_possible[0];
1747 Cerr <<
"Domaine::identifie_item_unique()" << finl;
1748 Cerr <<
"An item has not been found among the list." << finl;
1749 Cerr <<
"Please contact TRUST support." << finl;
1752 return it_selection;
1755template <
typename _SIZE_>
1779 md_vect_faces_front.
copy(mdseq);
1783 for (
int i_frontiere = 0; i_frontiere < nb_frontieres; i_frontiere++)
1785 Frontiere& front =
frontiere(i_frontiere);
1791 const int nb_faces_front = front.
nb_faces();
1795 md_frontiere.
copy(mdseq_front);
1810 for (
int i = 0; i < nb_faces_fr; i++)
1820 const int nb_faces = vect_renum.
size();
1821 const int nb_faces_tot = vect_renum.
size_totale();
1822 const int nb_faces_virt = nb_faces_tot - nb_faces;
1824 for (
int i = 0; i < nb_faces_virt; i++)
1841 for (i_frontiere = 0; i_frontiere < nb_frontieres; i_frontiere++)
1843 Frontiere& front =
frontiere(i_frontiere);
1851 if (faces_sommets_frontiere.
dimension(1) < nb_som_faces)
1854 fsf_old = faces_sommets_frontiere;
1856 faces_sommets_frontiere = -1;
1858 for (j = 0; j < fsf_old.
dimension(1); j++)
1859 faces_sommets_frontiere(i, j) = fsf_old(i, j);
1864 const int nb_faces_front = front.
nb_faces();
1866 for (
int i = i_premiere_face; i < i_premiere_face + nb_faces_front; i++)
1878 faces_sommets_frontiere,
1884 assert(faces_sommets_frontiere.
dimension(0) == nb_faces_front);
1885 const int nb_faces_tot_frontiere = faces_sommets_frontiere.
dimension_tot(0);
1886 const int nb_faces_virt_frontiere = nb_faces_tot_frontiere - nb_faces_front;
1888 const int ndebut = nb_faces;
1889 const int nfin = nb_faces_tot;
1890 for (
int i = ndebut; i < nfin; i++)
1892 const int j = vect_renum[i];
1895 assert(j >= nb_faces_front && j < nb_faces_tot_frontiere);
1897 tab[j - nb_faces_front] = i;
1903template <
typename _SIZE_>
1917 const int nbelem = elem_som.
dimension(0);
1922 bool is_poly = sub_type(Poly_geom_base, type_elem().valeur());
1924 std::vector<std::vector<int> > v_e_a(nbelem_tot);
1925 int nb_aretes_reelles = 0, i;
1932 ArrOfInt chaine_aretes_sommets;
1935 premiere_arete_som = -1;
1937 std::map<std::array<double, 3>, std::array<int, 2> > aretes_loc;
1939 for (
int i_elem = 0; i_elem < nbelem_tot; aretes_loc.clear(), i_elem++)
1942 const Elem_geom_base& elem_g = ref_cast(Elem_geom_base, type_elem().valeur());
1946 const Poly_geom_base& poly_g = ref_cast(Poly_geom_base, type_elem().valeur());
1952 for (i = 0; i < f_e_r.
dimension(0) && f_e_r(i, 0) >= 0; i++)
1953 for (j = 0; j < f_e_r.
dimension(1) && f_e_r(i, j) >= 0; j++)
1955 int s1 = elem_som(i_elem, f_e_r(i, j)), s2 = elem_som(i_elem, f_e_r(i, j + 1 < f_e_r.
dimension(1) && f_e_r(i, j + 1) >= 0 ? j + 1 : 0));
1956 std::array<double, 3> key;
1957 for (
int l = 0; l < 3; l++)
1959 aretes_loc[key] = {{ std::min(s1, s2), std::max(s1, s2) }};
1962 for (
auto &&kv : aretes_loc)
1965 int k = premiere_arete_som[kv.second[0]];
1967 k = chaine_aretes_sommets[k];
1973 aretes_som_.append_line(kv.second[0], kv.second[1]);
1975 int old_head = premiere_arete_som[kv.second[0]];
1977 int new_head = chaine_aretes_sommets.
size_array();
1979 premiere_arete_som[kv.second[0]] = new_head;
1981 v_e_a[i_elem].push_back(k);
1983 if (i_elem == nbelem - 1)
1991 int nb_aretes_elem = 0;
1992 for (i = 0; i < nbelem_tot; i++)
1993 nb_aretes_elem = std::max(nb_aretes_elem, (
int) v_e_a[i].size());
1994 nb_aretes_elem =
mp_max(nb_aretes_elem);
1998 for (j = 0; j < (int) v_e_a[i].size(); j++)
2002 const int n_aretes_tot =
aretes_som_.dimension(0);
2006 Journal() <<
"Domaine " <<
le_nom() <<
" nb_aretes=" << nb_aretes_reelles <<
" nb_aretes_tot=" << n_aretes_tot << finl;
2012 ArrOfInt pe_aretes(n_aretes_tot);
2014 echanger_tableau_aretes(
elem_aretes_, nb_aretes_reelles, pe_aretes);
2017 ArrOfInt indice_aretes_owner;
2018 indice_aretes_owner.
resize_array(n_aretes_tot, RESIZE_OPTIONS::NOCOPY_NOINIT);
2019 for (i = 0; i < nb_aretes_reelles; i++)
2020 indice_aretes_owner[i] = i;
2021 echanger_tableau_aretes(
elem_aretes_, nb_aretes_reelles, indice_aretes_owner);
2024 ArrOfInt pe_voisins;
2025 for (i = 0; i < n_aretes_tot; i++)
2026 if (pe_aretes[i] != moi)
2030 reverse_send_recv_pe_list(pe_voisins, liste_pe);
2035 array_trier_retirer_doublons(pe_voisins);
2038 ArrOfInt indices_pe(
nproc());
2040 for (i = 0; i < nb_voisins; i++)
2041 indices_pe[pe_voisins[i]] = i;
2043 ArrsOfInt aretes_communes_to_recv(nb_voisins);
2044 ArrsOfInt blocs_aretes_virt(nb_voisins);
2045 ArrsOfInt aretes_to_send(nb_voisins);
2048 for (i = 0; i < nb_aretes_reelles; i++)
2050 const int pe = pe_aretes[i];
2053 const int indice_pe = indices_pe[pe];
2056 Cerr <<
"Error: indice_pe=" << indice_pe <<
" shouldn't be negative in Domaine_32_64<_SZ_>::creer_aretes." << finl;
2057 Cerr <<
"It is a TRUST bug on this mesh with the Pa discretization, contact support." << finl;
2058 Cerr <<
"You could also try another partitioned mesh to get around this issue." << finl;
2062 const int indice_distant = indice_aretes_owner[i];
2063 aretes_to_send[indice_pe].append_array(indice_distant);
2064 aretes_communes_to_recv[indice_pe].append_array(i);
2068 for (i = nb_aretes_reelles; i < n_aretes_tot; i++)
2070 const int pe = pe_aretes[i];
2071 assert(pe <
nproc() && pe != moi);
2072 const int indice_pe = indices_pe[pe];
2075 Cerr <<
"Error: indice_pe=" << indice_pe <<
" shouldn't be negative in Domaine_32_64<_SZ_>::creer_aretes." << finl;
2076 Cerr <<
"It is a TRUST bug on this mesh with the Pa discretization, contact support." << finl;
2077 Cerr <<
"You could also try another partitioned mesh to get around this issue." << finl;
2080 const int indice_distant = indice_aretes_owner[i];
2081 aretes_to_send[indice_pe].append_array(indice_distant);
2089 for (i = 0; i < nb_voisins; i++)
2090 schema.
send_buffer(pe_voisins[i]) << aretes_to_send[i];
2093 for (i = 0; i < nb_voisins; i++)
2094 schema.
recv_buffer(pe_voisins[i]) >> aretes_to_send[i];
2102 MD_Vector_std md_aretes(n_aretes_tot, nb_aretes_reelles, pe_voisins, aretes_to_send, aretes_communes_to_recv, blocs_aretes_virt);
2117template <
typename _SIZE_>
2131 const Nom expr_elements(
"1");
2132 const Nom expr_faces(
"1");
2134 domaines_frontieres_.vide();
2136 for (
int i=0; i<nb_frontieres; i++)
2139 Noms nom_frontiere(1);
2143 nom_domaine_surfacique+=
"_boundaries_";
2144 nom_domaine_surfacique+=
frontiere(i).le_nom();
2146 Cerr <<
"Creating a surface domain named " << nom_domaine_surfacique <<
" for the boundary " << nom_frontiere[0] <<
" of the domain " <<
le_nom() << finl;
2151 Cerr <<
"Domain " << nom_domaine_surfacique
2152 <<
" already exists, writing to this object." << finl;
2154 Domaine& dom_new = ref_cast(Domaine,
interprete().objet(nom_domaine_surfacique));
2160 ob.
typer(
"Domaine");
2161 interp.
ajouter(nom_domaine_surfacique, ob);
2163 Domaine& dom_new = ref_cast(Domaine,
interprete().objet(nom_domaine_surfacique));
2166 OBS_PTR(Domaine)& ref_dom_new=domaines_frontieres_.add(OBS_PTR(Domaine)());
2167 ref_dom_new=dom_new;
2171template <
typename _SIZE_>
2183template <
typename _SIZE_>
2189 for (
int_t i = 0; i < dim0; i++)
2190 for (
int j = 0; j < dim1; j++)
2193 for (
int i = 0; i <
nb_bords(); i++)
2210 const int nb_bords = les_cl.size();
2212 for (
int n_bord = 0; n_bord <
nb_bords; n_bord++)
2214 if (sub_type(
Periodique, les_cl[n_bord].valeur()))
2216 const Nom& nom_b =les_cl[n_bord]->frontiere_dis().frontiere().le_nom();
2217 if(bords_per.
rang(nom_b) < 0)
2219 Cerr <<
"ERROR: you have put a periodic boundary condition on a boundary ('" << nom_b <<
"') which is not periodic." << finl;
2220 Cerr <<
"Use the keyword: declarer_bord_perio { domaine " <<
le_nom() <<
" bord " << nom_b <<
" }" << finl;
2221 Cerr <<
"after the loading of the domain to declare this boundary as being periodic." << finl;
2232template<
typename _SZ_>
Empty class used as a base for all the arrays.
void associer_domaine(const Domaine_t &)
Associates a domain to all boundaries in the list.
void associer_domaine(const Domaine_t &)
Associates a domain to all Bord_Interne objects in the list.
: Class Comm_Group_MPI, derived from the abstract class Comm_Group.
class Conds_lim This class represents a vector of boundary conditions.
class Domaine_32_64 A Domain is a mesh composed of a set of geometric elements of the same type.
int_t nb_faces_bords_int() const
IntVect_T< _SIZE_ > IntVect_t
void calculer_mon_centre_de_gravite(ArrOfDouble &c)
Computes the center of gravity of the domain.
double volume_total() const
void construire_elem_virt_pe_num()
Bords_Internes_t mes_bords_int_
virtual void clear()
Reset the Domaine completely except for its name.
ArrOfInt_t renum_som_perio_
void rang_elems_sommet(SmallArrOfTID_t &elems, double x, double y=0, double z=0) const
const OWN_PTR(Elem_geom_base_32_64< _SIZE_ >) &type_elem() const
Frontiere_32_64< _SIZE_ > Frontiere_t
virtual const MD_Vector & md_vector_sommets() const
Joints_t mes_faces_joint_
int nb_som_elem() const
Returns the number of vertices of the geometric elements that make up the domain.
int_t nb_elem_tot() const
SmallArrOfTID_t & chercher_elements(const DoubleTab &pos, SmallArrOfTID_t &elem, int reel=0) const
Searches for the elements containing the points whose coordinates are specified.
SmallArrOfTID_T< _SIZE_ > SmallArrOfTID_t
DoubleTab_T< _SIZE_ > DoubleTab_t
const OctreeRoot_t & construit_octree() const
virtual void creer_tableau_elements(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Creates a parallel array of values at elements.
void creer_mes_domaines_frontieres(const Domaine_VF &domaine_vf)
SmallArrOfTID_t & chercher_aretes(const DoubleTab &pos, SmallArrOfTID_t &arr, int reel=0) const
void calculer_centres_gravite(DoubleTab_t &xp) const
Calculates the centers of gravity of the domain elements.
int_t nb_faces_frontiere() const
Returns the number of boundary faces of the domain (sum of boundaries, connections,...
Raccords_t mes_faces_raccord_
static int identifie_item_unique(IntList &item_possible, DoubleTab &coord_possible, const DoubleVect &coord_ref)
virtual void calculer_volumes(DoubleVect_t &volumes, DoubleVect_t &inv_volumes) const
Computes the volumes of the domain elements.
void init_faces_virt_bord(const MD_Vector &md_vect_faces, MD_Vector &md_vect_faces_bord)
DoubleTab_t & les_sommets()
void set_renum_som_perio(IntTab_t &renum)
int rang_frontiere(const Nom &) const
void fill_from_list(std::list< Domaine_32_64 * > &lst)
Fills the Domaine from a list of Domaine objects by aggregating them.
Entree & readOn_has_perio(Entree &s, bool &has_perio)
Reads the objects constituting a Domain from an input stream.
ArrOfInt_T< _SIZE_ > ArrOfInt_t
int associer_(Objet_U &) override
Associates a Sous_Domaine to the Domain.
const Frontiere_t & frontiere(int i) const
int nb_frontieres_internes() const
ArrOfInt_t ind_faces_virt_bord_
void add(const Sous_Domaine_t &sd)
DoubleTab getBoundingBox() const
Raccords_t & faces_raccord()
void fixer_premieres_faces_frontiere()
void init_renum_perio()
Initialize the renumerotation array for periodicity.
Sous_Domaine_32_64< _SIZE_ > Sous_Domaine_t
void merge_wo_vertices_with(Domaine_32_64 &z)
Merge another Domaine into this, without considering vertices which are handled separately.
void construire_renum_som_perio(const Conds_lim &, const Domaine_dis_base &)
void renum(const IntVect_t &nums)
Renumbering of nodes: node number k becomes node number Les_Nums[k].
void read_former_domaine(Entree &s, bool &read_perio)
read what was (before TRUST 1.9.2) the "domaine" part from the input stream i.e. (roughly) the elemen...
Bords_Internes_t & bords_int()
void read_vertices(Entree &s)
only read vertices from the stream s
Groupes_Faces_t mes_groupes_faces_
OctreeRoot_32_64< _SIZE_ > OctreeRoot_t
int_t nb_aretes() const
Returns the number of real edges.
Noms bords_perio_
List of periodic boundaries - this is filled by Interprete 'Declarer_bord_perio'.
SmallArrOfTID_t & chercher_sommets(const DoubleTab &pos, SmallArrOfTID_t &som, int reel=0) const
void calculer_centres_gravite_aretes(DoubleTab_t &xa) const
Computes the centers of gravity of the domain edges.
void check_domaine()
associate the read objects to the domaine and check that the reading objects are coherent
DoubleVect_T< _SIZE_ > DoubleVect_t
IntTab_t elem_virt_pe_num_
void correct_type_of_borders_after_merge()
Correcting type of borders if they were empty before merge (ie equal to vide_0D).
void build_mc_mesh(bool virt=false) const
Build the MEDCoupling mesh corresponding to the TRUST mesh.
void renum_joint_common_items(const IntVect_t &nums, const int_t elem_offset)
Renumbers the nodes and elements present in the common items of joints.
int_t face_bords_interne_conjuguee(int_t face) const
Returns -1 if face is not an internal boundary face, or the index of the duplicated face otherwise.
SmallArrOfTID_t & indice_elements(const IntTab &som, SmallArrOfTID_t &elem, int reel=0) const
Searches the indices of elements containing the vertices specified by the "sommets" parameter.
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.
double coord(int_t i, int j) const
void ajouter(const DoubleTab_t &soms)
Adds nodes (or vertices) to the domain (without checking for duplicates).
int nb_groupes_faces() const
void ecrire_noms_bords(Sortie &) const
Writes the boundary names to an output stream.
Groupes_Faces_t & groupes_faces()
IntTab_T< _SIZE_ > IntTab_t
int comprimer()
Merges boundaries with the same name for: boundaries, periodic boundaries, internal boundaries and fa...
const Noms & bords_perio() const
int comprimer_joints()
Merges joints with the same name.
Base class for domains description. This class holds all the data shared by all domains and not sensi...
double volume_total_
Total volume of the domain (sum over all processors).
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class Elem_geom_base This class is the base class for the definition of elements.
virtual int nb_som_face(int=0) const =0
Nb of vertices for one face of the element.
virtual int get_tab_faces_sommets_locaux(IntTab &faces_som_local) const
Fills faces_som_local(i,j) giving for 0 <= i < nb_faces() and 0 <= j < nb_som_face(i) the local verte...
Class defining operators and methods for all reading operation in an input flow (file,...
Class Faces Faces describes a set of faces by their type (point, segment, triangle or quadrangle),...
void typer(const Motcle &)
Sets the type of the faces.
const IntTab_t & les_sommets() const
Returns the array of vertices of all faces.
Type_Face type_face() const
const ArrOfInt_t & get_faces_virt() const
const Domaine_t & domaine() const
Returns the domain associated with the boundary (const version).
int_t num_premiere_face() const
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
int_t nb_faces() const
Returns the number of faces of the boundary.
void associer_domaine(const Domaine_t &)
Associates the boundary to the domain it belongs to.
IntTab_t & les_sommets_des_faces()
Returns the vertices of the boundary faces.
void add(const Frontiere_32_64 &)
Adds the vertices (and faces) of the given boundary to this object (Frontiere_32_64).
void associer_domaine(const Domaine_t &)
Associates a domain to all Groupe_Faces objects in the list.
Interprets a block of instructions in the data set.
Objet_U & ajouter(const Nom &nom, DerObjU &object_to_add)
Adds object ob to the interpreter's object list and names it with nom.
static int objet_global_existant(const Nom &nom)
Returns a flag indicating whether an object with this name exists in interprete_courant() or one of i...
static Interprete_bloc & interprete_courant()
Returns the Interprete_bloc currently being read from the data set.
void associer_domaine(const Domaine_t &)
Associates a domain with all joints in the list.
virtual int get_nb_items_tot() const
static void append_item_to_blocs(ArrOfInt &blocs, int item)
Helper method to append an item to a "blocs"-type array containing series of blocks.
Dummy parallel descriptor used for sequential computations.
This is the simplest descriptor, used for arrays of values at vertices, elements, faces,...
: This class is an OWN_PTR but the pointed object is shared among multiple
void copy(const MD_Vector_base &)
Constructs an MD_Vector object by copying an existing object.
static void nettoie(Domaine_t &)
static int NettoiePasNoeuds
class Nom: a character string for naming TRUST objects.
const Nom & le_nom() const override
Returns *this.
An array of character strings (VECT(Nom)).
int rang(const char *const ch) const
Objet_U * typer(const char *nom_type)
Tries to create an instance of type "type".
virtual int associer_(Objet_U &)
Associates the Objet_U with another Objet_U. Virtual method to override.
const Interprete & interprete() const
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
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
int_t rang_sommet(double x, double y=0, double z=0) const
int_t rang_elem(double x, double y=0, double z=0) const
void construire(int reel=0)
void rang_elems_sommet(SmallArrOfTID_t &, double x, double y=0, double z=0) const
int construit() const
Returns true if the domain associated with the octree is non-null.
int_t rang_arete(double x, double y=0, double z=0) const
void associer_Domaine(const Domaine_t &d)
: An octree allowing to search in space for elements or points described by real-valued coordinates.
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.
static const Comm_Group & current_group()
Returns a reference to the current active processor group.
std::chrono::time_point< clock > time_point
class Periodique This class represents a periodic boundary condition.
int get_tab_faces_sommets_locaux(IntTab &faces_som_local) const override=0
Fills faces_som_local(i,j) giving for 0 <= i < nb_faces() and 0 <= j < nb_som_face(i) the local verte...
Class Polyedre: represents the Polyedre geometric element.
const ArrOfInt_t & getPolyhedronIndex() const
void remplir_Nodes_glob(ArrOfInt_t &Nodes_glob, const IntTab_t &les_elems) const
const ArrOfInt_t & getFacesIndex() const
static void mp_max_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static double mp_min(double)
static double mp_max(double)
static bool is_parallel()
static Sortie & Journal(int message_level=0)
Returns a static Sortie object used as an event journal.
static int nproc()
Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current...
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 void barrier()
Synchronizes all processors in the current group (waits until all processors have reached the barrier...
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 void mp_min_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static bool is_sequential()
void associer_domaine(const Domaine_t &)
Associates a domain with all connectors in the list.
static void renum_som_perio(const Domaine_32_64< int > &dom, ArrOfInt_T< int > &renum_som_perio, bool calculer_espace_virtuel)
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 construire_espace_virtuel_traduction(const MD_Vector &md_indice, const MD_Vector &md_valeur, IntTab &tableau, const int error_is_fatal=1)
Builds the items_communs + virtual space structure of an array containing indices of geometric items,...
static void uninit_sequential_domain(Domaine_32_64< _SIZE_ > &dom)
Method used by interpreters that modify the domain (sequential), destroys the descriptors of vertices...
void echange_taille_et_messages() const
Launches the data exchange between all processors.
Sortie & send_buffer(int num_PE) const
Returns the buffer corresponding to processor num_PE to stack data to send.
void end_comm() const
Clears the buffers and releases resources: reading of received data from buffers is complete.
Entree & recv_buffer(int num_PE) const
Returns the buffer corresponding to processor num_PE to read received data.
void begin_comm() const
Reserves communication buffers for a new communication.
void set_send_recv_pe_list(const ArrOfInt &send_pe_list, const ArrOfInt &recv_pe_list, const int me_to_me=0)
Defines the list of processors to send data to and receive data from.
Base class for output streams.
virtual void precision(int)
virtual void setf(IOS_FORMAT)
void append_array(_TYPE_ valeur)
_SIZE_ size_array() const
virtual void resize_tab(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
void resize_array(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
void suppr(_TYPE_)
Supprime un element contenu dans la liste.
void set_md_vector(const MD_Vector &) override
int dimension_int(int d) const
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension_tot(int) const override
void copy(const TRUSTTab &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension(int d) const
_SIZE_ size_totale() const
void resize(_SIZE_, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
virtual const MD_Vector & get_md_vector() const
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")