TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Debog_Pb.cpp
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#include <Octree_Double.h>
17#include <Probleme_base.h>
18#include <PE_Groups.h>
19#include <Debog_Pb.h>
20#include <Equation_base.h>
21#include <EChaine.h>
22#include <Domaine_VF.h>
23#include <Domaine.h>
24#include <Param.h>
25
26OBS_PTR(Debog_Pb) Debog_Pb::instance_debog_;
27
28Implemente_instanciable(Debog_Pb,"Debog_pb",Objet_U);
29Implemente_instanciable(Debog_Pb_Wrapper,"Debog",Interprete);
30// XD debog interprete debog NO_BRACE Class to debug some differences between two TRUST versions on a same data file.
31// XD_CONT NL2 If you want to compare the results of the same code in sequential and parallel calculation, first run
32// XD_CONT (mode=0) in sequential mode (the files fichier1 and fichier2 will be written first) then the second run in
33// XD_CONT parallel calculation (mode=1). NL2 During the first run (mode=0), it prints into the file DEBOG, values at
34// XD_CONT different points of the code thanks to the C++ instruction call. see for example in
35// XD_CONT Kernel/Framework/Resoudre.cpp file the instruction: Debog::verifier(msg,value); Where msg is a string and
36// XD_CONT value may be a double, an integer or an array. NL2 During the second run (mode=1), it prints into a file
37// XD_CONT Err_Debog.dbg the same messages than in the DEBOG file and checks if the differences between results from
38// XD_CONT both codes are less than a given value (error). If not, it prints Ok else show the differences and the lines
39// XD_CONT where it occured.
40// XD attr pb ref_pb_gen_base pb REQ Name of the problem to debug.
41// XD attr fichier1 chaine file1 REQ Name of the file where domain will be written in sequential calculation.
42// XD attr fichier2 chaine file2 REQ Name of the file where faces will be written in sequential calculation.
43// XD attr seuil floattant seuil REQ Minimal value (by default 1.e-20) for the differences between the two codes.
44// XD attr mode entier mode REQ By default -1 (nothing is written in the different files), you will set 0 for the
45// XD_CONT sequential run, and 1 for the parallel run.
46
47
49{
50 exit();
51 return os;
52}
53
54/*! @brief Method called as soon as an error is found in real space.
55 *
56 * (useful for setting a breakpoint in gdb)
57 *
58 */
60{
62 {
63 Cerr << "Error found in Debog_Pb (see debog.log files)" << finl;
65 }
66}
67
69{
70 fichier_domaine_ = "dom.debog";
71 fichier_faces_ = "faces.debog";
72 fichier_debog_ = "DEBOG";
73
74 Param param(que_suis_je());
75 param.ajouter("nom_pb", &nom_pb_, Param::REQUIRED);
76 param.ajouter("fichier_domaine", &fichier_domaine_);
77 param.ajouter("fichier_faces", &fichier_faces_);
78 param.ajouter("fichier_debog", &fichier_debog_);
79 param.ajouter("seuil_absolu", &seuil_absolu_);
80 param.ajouter("seuil_relatif", &seuil_relatif_);
81 param.ajouter("ignorer_messages", &msg_a_ignorer_);
82 param.ajouter("noeuds_doubles_ignores",&noeuds_doubles_ignores_);
83 param.ajouter("mode_db", &mode_db_, Param::REQUIRED);
84 param.dictionnaire("write", 0);
85 param.dictionnaire("read", 1);
86 param.ajouter("exit_on_error", &exit_on_error_);
87 param.lire_avec_accolades(is);
88
90 if (!sub_type(Probleme_base, obj))
91 {
92 Cerr << "Error in Debog::interpreter: " << obj << " is not a Problem_base object" << finl;
94 }
95
96 Probleme_base& pb = ref_cast(Probleme_base, obj);
97 ref_pb_ = pb;
98
99 if (mode_db_ == 0)
100 {
101 // Writing:
104 write_debog_data_file_.setf(ios::scientific);
105 write_debog_data_file_.precision(20);
106 }
107 else
108 {
111 debog_data_file_.set_error_action(Entree::ERROR_EXIT);
112 }
113
114 if (Process::je_suis_maitre()) log_file_.ouvrir("debog.log");
115
116 detailed_log_file_.ouvrir("debog_detail.log");
117
118 instance_debog_ = *this;
119 return is;
120}
121
122
123int Debog_Pb::test_ignore_msg(const char* const msg)
124{
125 return msg_a_ignorer_.rang(msg) >= 0;
126}
127
128void Debog_Pb::goto_msg(const char *const message)
129{
130 assert(mode_db_ == 1);
131 Nom dummy;
132 Nom n;
133 int num;
134 Nom msg(message); // copy without leading/trailing spaces
135 while (msg.debute_par(" "))
136 msg.suffix(" ");
137 while (msg.finit_par(" "))
138 msg.prefix(" ");
139 while (1)
140 {
141 // read until we find a "msg" word:
142 do
143 {
144 debog_data_file_ >> dummy;
145 }
146 while (dummy != "msg");
147
148 debog_data_file_ >> dummy;
149 if (dummy != ":")
150 {
151 Cerr << "Error in Debog_Pb::goto_msg(" << msg << ")\n invalid data in DEBOG file" << finl;
152 exit();
153 }
154 num = -1;
155 debog_data_file_ >> num;
156 debog_data_file_ >> dummy;
157 if (dummy != ":")
158 {
159 Cerr << "Error in Debog_Pb::goto_msg(" << msg << ")\n invalid data in DEBOG file" << finl;
160 exit();
161 }
162 n = "";
163 while (1)
164 {
165 debog_data_file_ >> dummy;
166 if (dummy == "FinMsg")
167 break;
168 n += dummy;
169 n += " ";
170 }
171 if (n.debute_par(msg))
172 break;
174 {
175 log_file_ << "Skipping message " << n << " (looking for " << msg << ")" << finl;
176 }
177 }
179 log_file_ << "Reading message " << num << "(file) " << debog_msg_count_ << "(current) " << msg << finl;
180
181 detailed_log_file_ << "Reading message " << num << "(file) " << debog_msg_count_ << "(current) " << msg << finl;
182}
183
185{
187 {
188 Cerr << "Error in Debog.cpp: cannot write geometry data in parallel." << finl;
190 }
191 const Domaine& dom = ref_pb_->domaine();
192 const Domaine_dis_base& zd = ref_pb_->domaine_dis();
193 const Domaine_VF& zvf = ref_cast(Domaine_VF, zd);
194 {
196 f.precision(20);
197 f << dom;
198 }
199 {
201 f.precision(20);
202 f << zvf.elem_faces();
203 f << zvf.xv();
204 f << zvf.face_voisins();
205 if (zvf.xa().dimension(0) > 0)
206 f << zvf.xa();
207 }
208 register_item(dom.md_vector_sommets(), "SOM");
209 register_item(dom.md_vector_elements(), "ELEM");
210 register_item(zvf.md_vector_faces(), "FACE");
211 if (zvf.md_vector_aretes())
212 register_item(zvf.md_vector_aretes(), "ARETES");
213}
214
215void Debog_Pb::register_item(const MD_Vector& md, const Nom& id)
216{
217 known_md_.add(md);
218 renum_id_.add(id);
219}
220
221void Debog_Pb::add_renum_item(const DoubleTab& coord_ref, const DoubleTab& coord_par, const MD_Vector& md, const Nom& id)
222{
223 register_item(md, id);
224
225 const double epsilon = Objet_U::precision_geom;
226
227 // We create an octree containing the points of the reference domain
228 // and we search for each point of the local domain in this octree.
229 Octree_Double octree;
230 octree.build_nodes(coord_ref, 1 /* include_virtual_items */);
231
232 // Add a new renum array:
233 renum_array_.add(IntVect());
234 IntVect& renum = renum_array_[renum_array_.size()-1];
235 MD_Vector_tools::creer_tableau_distribue(md, renum, RESIZE_OPTIONS::NOCOPY_NOINIT);
236
237 if (renum.size_totale() != coord_par.dimension_tot(0))
238 {
239 Cerr << "Internal error in Debog::add_renum_item: coordinate array does not match md descriptor" << finl;
241 }
242 const int dim = coord_par.dimension(1);
243 ArrOfDouble center(dim);
244 ArrOfInt elements;
245
246 const int n = renum.size_totale();
247 for (int i = 0; i < n; i++)
248 {
249 for (int j = 0; j < dim; j++)
250 center[j] = coord_par(i,j);
251 octree.search_elements_box(center, epsilon, elements);
252 // the first search returns all potentially close vertices.
253 // a test must then be performed on each vertex:
254 octree.search_nodes_close_to(center, coord_ref, elements, epsilon);
255 const int k = elements.size_array();
256 if (k != 1)
257 {
258 Cerr << "Debog::add_renum_item: Error. Id=" << id
259 << "\n Item " << i << " with following coordinates was found " << k << " times within epsilon=" << epsilon << " in the reference geometry: " << center << finl;
261 {
262 Cerr << "If you want to discard nodes comparison in the mesh, add 'noeuds_doubles_ignores 1' option in debog_pb keyword." << finl;
263 exit();
264 }
265 else
266 {
267 Cerr << "Warning, this item will be ignored during the comparison..." << finl;
268 renum[i] = -1;
269 }
270 }
271 else
272 {
273 // renum[i] is the index of the i-th local item in the reference geometry
274 renum[i] = elements[0];
275 }
276 }
277}
278
280{
281 const Domaine& dom = ref_pb_->domaine();
282 const Domaine_dis_base& zd = ref_pb_->domaine_dis();
283 const Domaine_VF& zvf = ref_cast(Domaine_VF, zd);
284 {
285 DoubleTab coord_som_seq; // vertices
286 DoubleTab xp_seq; // element centers
287 // We must enter a single-processor group for Domaine::readOn:
288 {
289 OWN_PTR(Comm_Group) group;
290 ArrOfInt liste_procs(1); // List of 1 processor containing proc 0
291 PE_Groups::create_group(liste_procs, group, 1);
292 if (PE_Groups::enter_group(group.valeur()))
293 {
295 Domaine dom_seq;
296 f >> dom_seq;
297 coord_som_seq = dom_seq.coord_sommets();
298 const Elem_geom_base& elem = dom_seq.type_elem().valeur();
299 elem.calculer_centres_gravite(xp_seq);
301 }
302 }
303 // All processors receive the coordinates of the reference vertices
304 // (destroy the descriptor otherwise printOn refuses to send the vector)
305 coord_som_seq.set_md_vector(MD_Vector());
306 envoyer_broadcast(coord_som_seq, 0);
307 // Same for element centers
308 xp_seq.set_md_vector(MD_Vector());
309 envoyer_broadcast(xp_seq, 0);
310
311 // Compute the renumberings:
312 const DoubleTab& coord_som = dom.coord_sommets();
313 const MD_Vector& md_som = dom.coord_sommets().get_md_vector();
314 add_renum_item(coord_som_seq, coord_som, md_som, "SOM");
315 const DoubleTab& xp = zvf.xp();
316 // The xp array has no parallel structure, we take it from the elements...
317 const MD_Vector& md_elem = dom.les_elems().get_md_vector();
318 add_renum_item(xp_seq, xp, md_elem, "ELEM");
319 }
320 {
321 DoubleTab xv_seq;
322 DoubleTab xa_seq;
323 int avec_aretes = 1;
325 {
327 f.precision(20);
328 {
329 IntTab elem_faces;
330 f >> elem_faces; // not used
331 }
332 f >> xv_seq;
333 {
334 IntTab face_voisins;
335 f >> face_voisins; // not used
336 }
338 try
339 {
340 f >> xa_seq;
341 }
342 catch (Entree_Sortie_Error&)
343 {
344 avec_aretes = 0;
345 }
346 }
347 envoyer_broadcast(xv_seq, 0);
348 const DoubleTab& xv = zvf.xv();
349 const MD_Vector& md_face = zvf.md_vector_faces();
350 add_renum_item(xv_seq, xv, md_face, "FACE");
351
352 envoyer_broadcast(avec_aretes, 0);
353 if (avec_aretes)
354 {
355 envoyer_broadcast(xa_seq, 0);
356 const DoubleTab& xa = zvf.xa();
357 const MD_Vector& md_arete = zvf.md_vector_aretes();
358 add_renum_item(xa_seq, xa, md_arete, "ARETE");
359 }
360 }
361}
362
363enum Debog_Exceptions { RENUM_ARRAY_NOT_FOUND };
364
365const IntVect& Debog_Pb::find_renum_vector(const MD_Vector& mdv, Nom& id) const
366{
367 const int n = renum_array_.size();
368 for (int i = 0; i < n; i++)
369 {
370 const IntVect& renum = renum_array_[i];
371 if (renum.get_md_vector() == mdv)
372 {
373 id = renum_id_[i];
374 return renum;
375 }
376 }
377 Cerr << "Error, we don't find renum_vector for the array on item: "<< id << finl;
378 throw RENUM_ARRAY_NOT_FOUND;
379}
380
382{
383 nom_pb_actuel_ = nom;
384}
385
386/*! @brief md_lignes: descriptor of row indices (i.e. descriptor of vector b in A*x=b) md_colonnes: same, column indices (i.e. descriptor of vector x in A*x=b)
387 *
388 */
389void Debog_Pb::verifier_matrice(const char *const msg, const Matrice_Base& matrice, const MD_Vector& md_lignes, const MD_Vector& md_colonnes)
390{
391 // Warning: this implementation only works for md_colonnes types registered in renum_array_
392 // (i.e. simple types: vertices, elements, faces, edges, and not MD_Vector_composite)
393 // and only for linesize==1 (one row and one column of the matrix per item)
394
395 // For each column i of the matrix, writing the product matrix * vector_i
396 // with vector_i[j] = (i==j);
397 DoubleVect vecteur_i;
398 DoubleVect tmp;
399 MD_Vector_tools::creer_tableau_distribue(md_colonnes, vecteur_i);
401 Nom id;
402
403 // Loop over the sequential items of the vector x in A*x=b
404 const trustIdType nbc0 = md_colonnes->nb_items_seq_tot();
405 if (nbc0 > std::numeric_limits<int>::max())
406 Process::exit("Debog_Pb::verifier_matrice() - total number of items too big!");
407 const int nb_colonnes = static_cast<int>(nbc0);
408
409 for (int i = 0; i < nb_colonnes; i++)
410 {
411 int renum_i;
412 if (mode_db_ == 0)
413 {
414 renum_i = i;
415 }
416 else
417 {
418 // Search for the local index corresponding to the sequential index i
419 // If i is a virtual item we take it anyway: vecteur_i will have its virtual space up to date
420 // If i does not exist on this processor, we set -1
421 renum_i = -1;
422 // Renum_colonnes[j] is the index in the sequential reference vector of item j on this processor
423 const IntVect& renum_colonnes = find_renum_vector(md_colonnes, id);
424 const int sz = renum_colonnes.size_totale();
425 for (int j = 0; j < sz; j++)
426 {
427 if (renum_colonnes[j] == i)
428 {
429 renum_i = j;
430 break;
431 }
432 }
433 }
434 if (renum_i >= 0)
435 vecteur_i[renum_i] = 1.;
436 matrice.multvect(vecteur_i, tmp);
437 Nom msg2(msg);
438 msg2 += " produit avec base ";
439 msg2 += Nom(i);
440 verifier(msg2, tmp);
441 if (renum_i >= 0)
442 vecteur_i[renum_i] = 0.;
443 }
444}
445
446void Debog_Pb::verifier_Mat_elems(const char* const msg, const Matrice_Base& la_matrice)
447{
448 // Search for the md_vector of elements
449
450 const int n = renum_id_.size();
451 int i;
452 for (i = 0; i < n; i++)
453 {
454 if (renum_id_[i] == "ELEM")
455 break;
456 }
457 if (i == n)
458 {
459 Cerr << "Error in Debog_Pb::verifier_Mat_elems no registered MD_Vector for ELEM type" << finl;
460 exit();
461 }
462 const MD_Vector& md = known_md_[i];
463 verifier_matrice(msg, la_matrice, md, md);
464}
465
466////////////////////////////////////////////////////////////////
467
469{
471 return os;
472}
473
475{
477 return is;
478}
479
481{
482 Nom nom_pb, nom_fic, nom_fic_faces, seuil;
483 is >> nom_pb;
484 int mode_db;
485 is >> nom_fic >> nom_fic_faces >> seuil >> mode_db;
486
487 Nom n("Debog_pb debog Lire debog { nom_pb ");
488 n += nom_pb;
489 n += " fichier_domaine ";
490 n += nom_fic;
491 n += " fichier_faces ";
492 n += nom_fic_faces;
493 n += " fichier_debog DEBOG";
494 n += " seuil_absolu ";
495 n += Nom(seuil);
496 n += " seuil_relatif ";
497 n += Nom(seuil);
498 n += " mode_db ";
499 if (mode_db == 0) n += "write";
500 else n += "read";
501 n += " }";
502
503 if (je_suis_maitre()) Cerr << "Debog_Pb_Wrapper: convert to new syntax: " << finl << n << finl;
504
505 EChaine echaine(n);
506 Interprete_bloc::interprete_courant().interpreter_bloc(echaine, Interprete_bloc::BLOC_EOF, 0 /* verifie_sans_interpreter */);
507 return is;
508}
: This class describes a group of processors on which
Definition Comm_Group.h:37
Entree & interpreter(Entree &is) override
Definition Debog_Pb.cpp:480
double seuil_relatif_
Definition Debog_Pb.h:91
SFichier write_debog_data_file_
Definition Debog_Pb.h:111
void add_renum_item(const DoubleTab &coord_ref, const DoubleTab &coord_par, const MD_Vector &md, const Nom &id)
Definition Debog_Pb.cpp:221
int noeuds_doubles_ignores_
Definition Debog_Pb.h:92
void verifier_Mat_elems(const char *const msg, const Matrice_Base &la_matrice)
Definition Debog_Pb.cpp:446
Nom nom_pb_actuel_
Definition Debog_Pb.h:119
const IntVect & find_renum_vector(const MD_Vector &, Nom &id) const
Definition Debog_Pb.cpp:365
int mode_db_
Definition Debog_Pb.h:96
void goto_msg(const char *const msg)
Definition Debog_Pb.cpp:128
void verifier_matrice(const char *const msg, const Matrice_Base &, const MD_Vector &md_lignes, const MD_Vector &md_colonnes)
md_lignes: descriptor of row indices (i.e. descriptor of vector b in A*x=b) md_colonnes: same,...
Definition Debog_Pb.cpp:389
Nom fichier_debog_
Definition Debog_Pb.h:89
EFichier debog_data_file_
Definition Debog_Pb.h:113
Nom nom_pb_
Definition Debog_Pb.h:85
EcrFicCollecte detailed_log_file_
Definition Debog_Pb.h:117
Motcles msg_a_ignorer_
Definition Debog_Pb.h:94
void register_item(const MD_Vector &md, const Nom &id)
Definition Debog_Pb.cpp:215
int exit_on_error_
Definition Debog_Pb.h:98
void error_function()
Method called as soon as an error is found in real space.
Definition Debog_Pb.cpp:59
IntVects renum_array_
Definition Debog_Pb.h:108
void set_nom_pb_actuel(const Nom &nom)
Definition Debog_Pb.cpp:381
Nom fichier_faces_
Definition Debog_Pb.h:88
std::enable_if_t<(std::is_convertible< _TYPE_, double >::value)||(std::is_convertible< _TYPE_, int >::value), void > verifier(const char *const msg, _TYPE_, _TYPE_ *refvalue=0)
Definition Debog_Pb.tpp:375
void write_geometry_data()
Definition Debog_Pb.cpp:184
double seuil_absolu_
Definition Debog_Pb.h:90
Noms renum_id_
Definition Debog_Pb.h:103
SFichier log_file_
Definition Debog_Pb.h:115
Nom fichier_domaine_
Definition Debog_Pb.h:87
int debog_msg_count_
Definition Debog_Pb.h:84
void read_geometry_data()
Definition Debog_Pb.cpp:279
int test_ignore_msg(const char *const msg)
Definition Debog_Pb.cpp:123
virtual const MD_Vector & md_vector_sommets() const
Definition Domaine.h:369
IntTab_t & les_elems()
Definition Domaine.h:129
const DoubleTab_t & coord_sommets() const
Definition Domaine.h:112
virtual const MD_Vector & md_vector_elements() const
Returns the parallel descriptor of element arrays of the domain.
Definition Domaine.cpp:859
class Domaine_VF
Definition Domaine_VF.h:44
const MD_Vector & md_vector_faces() const
Definition Domaine_VF.h:158
const MD_Vector & md_vector_aretes() const
Definition Domaine_VF.h:160
double xa(int num_arete, int k) const
Definition Domaine_VF.h:78
double xv(int num_face, int k) const
Definition Domaine_VF.h:76
int elem_faces(int i, int j) const
Returns the index of the i-th face of element num_elem; the face numbering convention is.
Definition Domaine_VF.h:542
double xp(int num_elem, int k) const
Definition Domaine_VF.h:77
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
Definition Domaine_VF.h:418
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
An input stream whose source is a character string.
Definition EChaine.h:31
File for reading. This class is to the C++ ifstream class what the Entree class is to the.
Definition EFichier.h:29
virtual void calculer_centres_gravite(DoubleTab_t &) const
Compute all centers of mass of all elements in the domain.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
@ ERROR_EXCEPTION
Definition Entree.h:93
@ ERROR_EXIT
Definition Entree.h:93
virtual void set_error_action(Error_Action)
Changes the error behaviour of the input; see error_handle_() and get_error_action().
Definition Entree.cpp:379
Entree & interpreter_bloc(Entree &is, Bloc_Type bloc_type, int verifier_sans_interpreter)
Interprets a block of instructions read from input is.
static Interprete_bloc & interprete_courant()
Returns the Interprete_bloc currently being read from the data set.
Base class for "interpreter" objects.
Definition Interprete.h:38
static Objet_U & objet(const Nom &)
See Interprete_bloc::objet_global(). BM: the Interprete class is not the best place for this.
virtual trustIdType nb_items_seq_tot() const
static void creer_tableau_distribue(const MD_Vector &, Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Transforms v into a parallel array having the structure md.
: This class is an OWN_PTR but the pointed object is shared among multiple
Definition MD_Vector.h:48
Matrice_Base class - Base class of the matrix hierarchy.
virtual DoubleVect & multvect(const DoubleVect &, DoubleVect &) const
Multiplication of a vector by the matrix.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
virtual int finit_par(const char *const n) const
Definition Nom.cpp:319
virtual int debute_par(const char *const n) const
Definition Nom.cpp:314
Nom & prefix(const char *const)
Definition Nom.cpp:324
Nom & suffix(const char *const)
Suffix extraction: Nom x("azerty");.
Definition Nom.cpp:266
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68
friend class Entree
Definition Objet_U.h:71
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
static double precision_geom
Definition Objet_U.h:81
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
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 int enter_group(const Comm_Group &group)
If the local processor belongs to the group, the current group for this processor becomes "group" and...
static void create_group(const ArrOfInt &liste_pe, OWN_PTR(Comm_Group) &group, int force_Comm_Group_NoParallel=0)
Creates a new processor group (can be called anywhere in the code).
Definition PE_Groups.cpp:55
static void exit_group()
Returns to the group that was active before the last successful enter_group() call (which returned 1)...
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
@ REQUIRED
Definition Param.h:115
class Probleme_base It is a Probleme_U that is not a coupling.
static bool is_parallel()
Definition Process.cpp:108
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
Definition Process.cpp:82
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Definition SFichier.h:29
void precision(int pre) override
Base class for output streams.
Definition Sortie.h:52
_SIZE_ size_array() const
void set_md_vector(const MD_Vector &) override
Definition TRUSTTab.tpp:673
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
_SIZE_ size_totale() const
Definition TRUSTVect.tpp:61
virtual const MD_Vector & get_md_vector() const
Definition TRUSTVect.h:123