TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Format_Post_Lml.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#include <Format_Post_Lml.h>
16#include <communications.h>
17#include <Param.h>
18
19Implemente_instanciable_sans_constructeur(Format_Post_Lml,"Format_Post_Lml",Format_Post_base);
20
21
22/////////////////////////////////////////////////////////////////////////////
23//Parameter: lml_basename_
24// Meaning: beginning of the file name
25//Extension lml
26
27//Specifics of this format
28//Writing to a single file (sequential or parallel)
29///////////////////////////////////////////////////////////////////////////
30
31/*! @brief Default constructor: specify in comments what is set by default
32 *
33 */
34
39
40/*! @brief Resets the object to the state obtained by the default constructor.
41 *
42 */
44{
45 lml_basename_ = "??";
46}
47/*! @brief error => exit
48 *
49 */
51{
52 Cerr << "Format_Post_Lml::printOn : error" << finl;
53 exit();
54 return os;
55}
56
57/*! @brief Reads post-processing parameters in "dataset" format. The expected format is:
58 *
59 * {
60 * nom_fichier basename_sans_extension
61 * }
62 *
63 */
65{
67 return is;
68}
69
71{
72 param.ajouter("nom_fichier",&lml_basename_,Param::REQUIRED);
73}
74
75/*! @brief Initializes the class with default parameters.
76 *
77 */
79{
80 lml_basename_= file_basename;
81 return 1;
82}
83
84int Format_Post_Lml::initialize(const Nom& file_basename, const int format, const Nom& option_para)
85{
86
87 lml_basename_= file_basename;
88 return 1;
89}
90
91int Format_Post_Lml::ecrire_entete(const double temps_courant,const int reprise,const int est_le_premier_post)
92{
93
94 Nom nom_fich(lml_basename_);
95 nom_fich +=".";
96 Nom format="lml";
97 nom_fich += format;
98
99 ecrire_entete_lml(nom_fich,est_le_premier_post);
100 return 1;
101
102}
103
104int Format_Post_Lml::finir(const int est_le_dernier_post)
105{
106
107 Nom nom_fich(lml_basename_);
108 nom_fich +=".";
109 Nom format="lml";
110 nom_fich += format;
111
112 finir_lml(nom_fich,est_le_dernier_post);
113 return 1;
114}
115
116
117int Format_Post_Lml::completer_post(const Domaine& dom,const int is_axi,
118 const Nature_du_champ& nature,const int nb_compo,const Noms& noms_compo,
119 const Motcle& loc_post,const Nom& le_nom_champ_post)
120{
121
123 return 1;
124
125}
126
127int Format_Post_Lml::preparer_post(const Nom& id_du_domaine,const int est_le_premier_post,
128 const int reprise,
129 const double t_init)
130{
131
133 return 1;
134
135}
136
137/*! @brief see Format_Post_base::ecrire_domaine
138 *
139 */
140int Format_Post_Lml::ecrire_domaine(const Domaine& domaine,const int est_le_premier_post)
141{
142 //Call to the static method specific to lml format
143 Nom nom_fich(lml_basename_);
144 nom_fich +=".";
145 Nom format="lml";
146 nom_fich += format;
147 ecrire_domaine_lml(domaine,nom_fich);
148 return 1; // ok all is well
149}
150
151/*! @brief Starts writing a new time step. For the LML format specifically:
152 *
153 * Opens the master file in APPEND mode and adds a line
154 * "TEMPS xxxxx"
155 *
156 */
157int Format_Post_Lml::ecrire_temps(const double temps)
158{
159
160 Nom nom_fich(lml_basename_);
161 nom_fich +=".";
162 Nom format="lml";
163 nom_fich += format;
164
165 ecrire_temps_lml(temps,nom_fich);
166
167 return 1;
168}
169
170/*! @brief see Format_Post_base::ecrire_champ
171 *
172 */
173int Format_Post_Lml::ecrire_champ(const Domaine& domaine,const Noms& unite_, const Noms& noms_compo,
174 int ncomp,double temps_,
175 const Nom& id_champ,
176 const Nom& id_du_domaine,
177 const Nom& localisation,
178 const Nom& nature,
179 const DoubleTab& valeurs)
180
181{
182
183 //Call to the static method specific to lml format
184 Nom nom_fich(lml_basename_);
185 nom_fich +=".";
186 Nom format="lml";
187 nom_fich += format;
188
189 ecrire_champ_lml(domaine,unite_,noms_compo,ncomp,temps_,id_champ,id_du_domaine,localisation,valeurs,nom_fich);
190
191 return 1;
192}
193
194/*! @brief
195 *
196 */
198 const Nom& id_du_domaine,
199 const Nom& id_domaine,
200 const Nom& localisation,
201 const Nom& reference,
202 const IntVect& valeurs,
203 const int reference_size)
204{
205
206 Nom nom_fich(lml_basename_);
207 nom_fich +=".";
208 Nom format="lml";
209 nom_fich += format;
210 Nom id_domaine_dom(id_domaine);
211 id_domaine_dom+="_";
212 id_domaine_dom+=id_du_domaine;
213 ecrire_item_int_lml(id_item,id_domaine,valeurs,nom_fich);
214
215 return 1;
216}
217
218int Format_Post_Lml::ecrire_entete_lml(Nom& nom_fich,const int est_le_premier_post)
219{
220 if (est_le_premier_post)
221 {
222
224 s.ouvrir(nom_fich);
225
227 {
228 s << "TRUST" << " " << "Version " << TRUST_VERSION << finl;
229 s << nom_du_cas() << finl;
230 s << "TRUST" << finl;
231 }
232
233 s.flush();
234 s.syncfile();
235
236 }
237 return 1;
238}
239
240int Format_Post_Lml::finir_lml(Nom& nom_fich, const int est_le_dernier_post)
241{
242
244 s.ouvrir(nom_fich,ios::app);
245
246 if (est_le_dernier_post)
247 {
249 {
250 s << "FIN" << finl;
251 }
252 }
253
254 s.flush();
255 s.syncfile();
256
257 return 1;
258}
259
261{
262 return 1;
263}
264
266{
267 return 1;
268}
269
270int Format_Post_Lml::ecrire_domaine_lml(const Domaine& domaine,Nom& nom_fich)
271{
272 //Currently an identical copy of the Domaine::postraiter_lml() method
273
275 s.ouvrir(nom_fich,ios::app);
276 Nom nom_grille("Grille_");
277 nom_grille+= domaine.le_nom();
278
279 if(je_suis_maitre())
280 s << "GRILLE" << finl;
281
282 trustIdType nb_som_tot0 = Process::mp_sum(domaine.nb_som());
283 trustIdType nb_elem_tot0 = static_cast<int>(Process::mp_sum(domaine.nb_elem()));
284 if (nb_som_tot0 >= std::numeric_limits<int>::max() || nb_elem_tot0 >= std::numeric_limits<int>::max())
285 {
286 Cerr << "Too many items in the domain to be written in LML (exceeds the 32b limit) - the support for this is not implemented." << finl;
287 Cerr << "Please contact TRUST support!" << finl;
288 Process::exit(-1);
289 }
290 int nb_som_tot = static_cast<int>(nb_som_tot0);
291 int nb_elem_tot = static_cast<int>(nb_elem_tot0);
292 int dim = domaine.les_sommets().dimension(1);
293
294 // Writing node coordinates
295 // All quantities appearing in the .lml file must
296 // be expressed in the Cartesian coordinate frame.
297 // If the Axi option was chosen, Cartesian coordinates
298 // are recomputed from the cylindrical coordinates.
299
300 if (axi)
301 {
302 // Writing mesh nodes
303 if ( dim == 3)
304 {
305 if(je_suis_maitre())
306 s << nom_grille << " " << "3 " << nb_som_tot << "" << finl;
307 s.lockfile();
308
309 for (int nsom=0; nsom<domaine.nb_som(); nsom++)
310 {
311 s << domaine.coord(nsom,0)*cos(domaine.coord(nsom,1)) << " "
312 << domaine.coord(nsom,0)*sin(domaine.coord(nsom,1)) << " "
313 << domaine.coord(nsom,2) << "" << finl;
314 }
315
316 s.unlockfile();
317 s.syncfile();
318 }
319 else if ( dim == 2)
320 {
321 if(je_suis_maitre())
322 s << nom_grille << " " << "3 " << 2*nb_som_tot << "" << finl;
323 s.lockfile();
324 // Writing mesh nodes
325 int nsom;
326
327 for (nsom=0; nsom<domaine.nb_som(); nsom++)
328 {
329 s << domaine.coord(nsom,0)*cos(domaine.coord(nsom,1)) << " "
330 << domaine.coord(nsom,0)*sin(domaine.coord(nsom,1)) << " "
331 << 0. << "" << finl;
332 }
333 for (nsom=0; nsom<domaine.nb_som(); nsom++)
334 {
335 s << domaine.coord(nsom,0)*cos(domaine.coord(nsom,1)) << " "
336 << domaine.coord(nsom,0)*sin(domaine.coord(nsom,1)) << " "
337 << 1. << "" << finl;
338 }
339
340 s.unlockfile();
341 s.syncfile();
342 }
343 }
344 else
345 {
346 // Writing mesh nodes
347 if ( dim == 3)
348 {
349 if(je_suis_maitre())
350 s << nom_grille << " " << "3 " << nb_som_tot << "" << finl;
351 s.lockfile();
352
353 for (int nsom=0; nsom<domaine.nb_som(); nsom++)
354 {
355 for (int j=0; j<3; j++)
356 s << domaine.coord(nsom, j) << " " ;
357 s << "" << finl;
358 }
359
360 s.unlockfile();
361 s.syncfile();
362 }
363 else if ( dim == 2)
364 {
365 if(je_suis_maitre())
366 s << nom_grille << " " << "3 " << 2*nb_som_tot << "" << finl;
367 s.lockfile();
368 // Writing mesh nodes
369 int nsom;
370
371 for (nsom=0; nsom<domaine.nb_som(); nsom++)
372 {
373 s << domaine.coord(nsom,0) << " "
374 << domaine.coord(nsom,1) << " "
375 << 0. << "" << finl;
376 }
377 for (nsom=0; nsom<domaine.nb_som(); nsom++)
378 {
379 s << domaine.coord(nsom,0) << " "
380 << domaine.coord(nsom,1) << " "
381 << 1. << "" << finl;
382 }
383
384 s.unlockfile();
385 s.syncfile();
386 }
387 }
388
389 //Currently an identical copy of the Domaine::postraiter_lml() method
390
391 //////////////////////////////////////////////////////////////
392
393 int j;
394 int nsom = domaine.nb_som();
395 Nom nom_top("Topologie_");
396 nom_top+= domaine.le_nom();
397 nom_top+="_";
398 nom_top+=domaine.le_nom();
399 Nom type_maille=domaine.type_elem()->nom_lml();
400
401
402 //Added for syntax modification below
403 int nb_elem = domaine.nb_elem() ;
404 int nb_som_elem = domaine.nb_som_elem();
405 const IntTab& sommet_elem = domaine.les_elems();
406 int nb_som_PE = static_cast<int>(mppartial_sum(nsom));
407 if(je_suis_maitre())
408 {
409 s << "TOPOLOGIE" << finl;
410 s << nom_top << " " << nom_grille << "" << finl;
411 s << "MAILLE" << finl;
412 s << nb_elem_tot << "" << finl;
413 }
414
415 // Writing mesh elements
416 if (dim == 3 )
417 {
418 s.lockfile();
419
420 for (int nelem=0; nelem<nb_elem; nelem++)
421 {
422 s << type_maille << " ";
423 for (j=0; j<nb_som_elem; j++)
424 s << sommet_elem(nelem,j)+1+nb_som_PE << " " ;
425 s << "" << finl;
426 }
427 s.unlockfile();
428 s.syncfile();
429 }
430 else if ( dim == 2)
431 {
432 s.lockfile();
433 for (int nelem=0; nelem<nb_elem; nelem++)
434 {
435 s << type_maille << " ";
436 int count = 0;
437 for (j=0; j<nb_som_elem && (sommet_elem( nelem,j) > -1); j++)
438 s << sommet_elem( nelem,j)+1+2*nb_som_PE << " ", count++;
439 for (j=0; j<nb_som_elem && (sommet_elem( nelem,j) > -1); j++)
440 s << sommet_elem( nelem,j)+1+2*nb_som_PE+nsom << " ", count++;
441 for (int k = count; k < 2 * nb_som_elem; k++) s << (int)0 << " ";
442 s << "" << finl;
443 s.flush();
444 }
445 s.unlockfile();
446 s.syncfile();
447 }
448 if(je_suis_maitre())
449 {
450 s << "FACE" << finl ;
451 s << (int)0 << "" << finl;
452 }
453
454
455 //////////////////////////////////////////////////////////////
456
457 s.flush();
458 s.syncfile();
459
460 return 1;
461}
462
463int Format_Post_Lml::ecrire_temps_lml(const double temps,Nom& nom_fich)
464{
465
467 s.ouvrir(nom_fich,ios::app);
468 if (je_suis_maitre())
469 s << "TEMPS " << temps << finl;
470 s.flush();
471 s.syncfile();
472
473 return 1;
474}
475
476int Format_Post_Lml::ecrire_champ_lml(const Domaine& domaine,const Noms& unite_,const Noms& noms_compo,
477 int ncomp, double temps_,
478 const Nom& id_du_champ,
479 const Nom& id_du_domaine,
480 const Nom& localisation,
481 const DoubleTab& data,Nom& nom_fich)
482
483{
484 EcrFicPartage os;
485 os.ouvrir(nom_fich,ios::app);
486 Nom nom_top("Topologie_");
487 nom_top+= domaine.le_nom();
488 nom_top+="_";
489 nom_top+=domaine.le_nom();
490 int dim = domaine.les_sommets().dimension(1);
491 Nom nom_post = id_du_champ;
492 //Nom nom_dom= domaine.le_nom();
493
494 if (ncomp==-1)
495 {
496 int nb_compo_ = data.nb_dim()>1 ? data.dimension(1) : 1;
497 if(localisation=="SOM")
498 {
499 int nb_som = domaine.nb_som();
500 int nb_som_tot = static_cast<int>(Process::mp_sum(nb_som));
501 int nb_som_PE = static_cast<int>(mppartial_sum(nb_som));
502 if (dim==2)
503 {
504 nb_som_tot*=2;
505 nb_som_PE*=2;
506 }
507 int nb_compo_dv = (nb_compo_==2 ? 3 : nb_compo_);
508
509 if(je_suis_maitre())
510 {
511 os << "CHAMPPOINT " << nom_post << " " << nom_top << " " << temps_ << finl;
512 os << nom_post << " " << nb_compo_dv << " " << unite_[0] << " "
513 << "type0" << " " << nb_som_tot << finl;
514 }
515 os.lockfile();
516 for (int i=0; i<4-dim; i++)
517 for (int j = 0; j < nb_som; j++)
518 {
519 os << i * nb_som + j + 1 + nb_som_PE << " ";
520 for (int comp = 0; comp < nb_compo_; comp++)
521 os << data(j, comp) << " ";
522 if (nb_compo_ == 2) os << "0.";
523 os << finl;
524 }
525 os.unlockfile();
526 os.syncfile();
527 }
528 else if(localisation=="ELEM")
529 {
530 int nb_elem=domaine.nb_elem();
531 int nb_elem_tot = static_cast<int>(Process::mp_sum(nb_elem));
532 int nb_elem_PE = static_cast<int>(mppartial_sum(nb_elem));
533 for (int comp=0; comp<nb_compo_; comp++)
534 {
535 if (je_suis_maitre())
536 {
537 os << "CHAMPMAILLE ";
538 os << (nb_compo_ == 1 ? nom_post : noms_compo[comp]) << " " << nom_top << " " << temps_ << finl;
539 os << (nb_compo_ == 1 ? nom_post : noms_compo[comp]) << " " << (int)1 << " " << unite_[comp] << " " ;
540 os << "type0" << " " << nb_elem_tot << finl;
541 }
542 os.lockfile();
543 for (int j=0; j<nb_elem; j++)
544 os << j+1+nb_elem_PE << " " << data(j,comp) << finl;
545 os.unlockfile();
546 os.syncfile();
547 }
548 }
549 else
550 {
551 Cerr << "We do not know to postprocess " << id_du_champ
552 << " with the keyword " << localisation << finl;
553 return -1;
554 }
555 }
556 else
557 {
558 if(localisation=="SOM")
559 {
560 int nb_som=domaine.nb_som();
561 int nb_som_tot = static_cast<int>(Process::mp_sum(nb_som));
562 int nb_som_PE = static_cast<int>(mppartial_sum(nb_som));
563 if (dim==2)
564 {
565 nb_som_tot*=2;
566 nb_som_PE*=2;
567 }
568 if(je_suis_maitre())
569 {
570 os << "CHAMPPOINT ";
571 os << nom_post << " " << nom_top << " " << temps_ << finl;
572 os << nom_post << " " << (int)1 << " " << unite_[ncomp] << " "
573 << "type0" << " " << nb_som_tot << finl;
574 }
575 os.lockfile();
576 for (int i=0; i<4-dim; i++)
577 for (int j=0; j<nb_som; j++)
578 os << i*nb_som+j+1+nb_som_PE << " " << data(j) << finl;
579 os.unlockfile();
580 os.syncfile();
581 }
582 else if(localisation=="ELEM")
583 {
584 int nb_elem=domaine.nb_elem();
585 int nb_elem_tot = static_cast<int>(Process::mp_sum(nb_elem));
586 int nb_elem_PE = static_cast<int>(mppartial_sum(nb_elem));
587 if(je_suis_maitre())
588 {
589 os << "CHAMPMAILLE ";
590 os << nom_post << " " << nom_top << " " << temps_ << finl;
591 os << nom_post << " " << (int)1 << " " << unite_[ncomp] << " " ;
592 os << "type0" << " " << nb_elem_tot << finl;
593 }
594 os.lockfile();
595 for (int j=0; j<nb_elem; j++)
596 os << j+1+nb_elem_PE << " " << data(j) << finl;
597 os.unlockfile();
598 os.syncfile();
599 }
600 else
601 {
602 Cerr << "We do not know to postprocess " << id_du_champ
603 << " with the keyword " << localisation << finl;
604 return -1;
605 }
606 }
607 return 1;
608}
609
610
612 const Nom& id_domaine,
613 const IntVect& vect,
614 const Nom& nom_fic)
615{
616 EcrFicPartage os;
617 os.ouvrir(nom_fic,ios::app);
618
619 Nom nom_vect(id_item);
620 nom_vect += "_elem_dom";
621
622 Nom nom_topologie("Topologie_");
623 nom_topologie+= id_domaine;
624
625 //Currently temps_courant is not passed as argument
626 ////os << "CHAMPMAILLE " << nom_vect << " "<< nom_topologie << " " << temps_courant << finl;
627
628 const IntTab* intT = dynamic_cast<const IntTab*>(&vect);
629 if (intT)
630 {
631 const IntTab& tab = *intT;
632 os.lockfile();
633 os << nom_vect << tab.dimension(1) << " 1 " << " type0 " << tab.dimension(0) << finl;
634 os.unlockfile();
635 os.syncfile();
636 {
637 int tab_dimension0_opt=tab.dimension(0);
638 os.lockfile();
639 for (int i=0; i<tab_dimension0_opt; i++)
640 {
641 for (int j=0; j<tab.dimension(1); j++)
642 {
643 int tab_dimension1_opt=tab.dimension(1);
644 for (int j2=0; j2<tab_dimension1_opt; j2++)
645 os << i+1 << " " << tab(i,j2) << " ";
646 }
647 os << finl;
648 }
649 os.unlockfile();
650 os.syncfile();
651 }
652
653 }
654 else
655 {
656 os.lockfile();
657 os << nom_vect << " 1" << " 1 " << " type0 " << vect.size() << finl;
658 for (int i=0; i<vect.size(); i++)
659 os << i+1 << " " << vect(i) << finl;
660 os.unlockfile();
661 os.syncfile();
662 }
663
664 os.flush();
665 os.syncfile();
666
667 return 1;
668}
669
670
Sortie & unlockfile() override
Releases the critical resource for the next process.
Sortie & lockfile() override
Allows the calling process to block waiting for the common resource shared by all processes,...
Sortie & flush() override
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...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
: Post-processing class for Eulerian fields in LML format.
Nom lml_basename_
static int ecrire_champ_lml(const Domaine &domaine, const Noms &unite_, const Noms &noms_compo, int ncomp, double temps_, const Nom &id_du_champ, const Nom &id_du_domaine, const Nom &localisation, const DoubleTab &data, Nom &nom_fic)
void reset() override
Resets the object to the state obtained by the default constructor.
int ecrire_champ(const Domaine &domaine, const Noms &unite_, const Noms &noms_compo, int ncomp, double temps_, const Nom &id_du_champ, const Nom &id_du_domaine, const Nom &localisation, const Nom &nature, const DoubleTab &data) override
see Format_Post_base::ecrire_champ
static int ecrire_domaine_lml(const Domaine &domaine, Nom &nom_fic)
static int finir_lml(Nom &nom_fic, const int est_le_dernier_post)
int preparer_post(const Nom &id_du_domaine, const int est_le_premier_post, const int reprise, const double t_init) override
int finir(const int est_le_dernier_post) override
int initialize(const Nom &file_basename, const int format, const Nom &option_para) override
void set_param(Param &param) const override
int initialize_by_default(const Nom &file_basename) override
Initializes the class with default parameters.
static int ecrire_entete_lml(Nom &nom_fic, const int est_le_premier_post)
int ecrire_entete(const double temps_courant, const int reprise, const int est_le_premier_post) override
static int ecrire_item_int_lml(const Nom &id_item, const Nom &id_domaine, const IntVect &data, const Nom &nom_fic)
int ecrire_domaine(const Domaine &domaine, const int est_le_premie_post) override
see Format_Post_base::ecrire_domaine
Format_Post_Lml()
Default constructor: specify in comments what is set by default.
int ecrire_item_int(const Nom &id_item, const Nom &id_du_domaine, const Nom &id_domaine, const Nom &localisation, const Nom &reference, const IntVect &data, const int reference_size) override
Writing an integer array to the post-processing file.
int ecrire_temps(const double temps) override
Starts writing a new time step. For the LML format specifically:
static int completer_post_lml()
static int ecrire_temps_lml(const double temps, Nom &nom_fic)
static int preparer_post_lml()
int completer_post(const Domaine &dom, const int axi, const Nature_du_champ &nature, const int nb_compo, const Noms &noms_compo, const Motcle &loc_post, const Nom &le_nom_champ_post) override
Base class for post-processing output formats for fields (lata, med, cgns, lml, single_lata).
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
const Nom & le_nom() const override
Returns *this.
Definition Nom.cpp:555
An array of character strings (VECT(Nom)).
Definition Noms.h:26
static int dimension
Definition Objet_U.h:94
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
static const Nom & nom_du_cas()
Returns a constant reference to the case name. This method is static.
Definition Objet_U.cpp:145
static int axi
Definition Objet_U.h:96
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
Definition Param.cpp:364
@ REQUIRED
Definition Param.h:115
static trustIdType mppartial_sum(trustIdType i)
Computes the partial sum of x over processors 0 to me()-1 (returns 0 on processor 0).
Definition Process.cpp:403
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
Definition Process.cpp:145
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
Base class for output streams.
Definition Sortie.h:52
int nb_dim() const
Definition TRUSTTab.h:199
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
_SIZE_ size() const
Definition TRUSTVect.tpp:45