TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Sonde_Int.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 <communications.h>
17#include <Postraitement.h>
18#include <Sonde_Int.h>
19
20Implemente_instanciable_sans_constructeur_ni_destructeur(Sonde_Int,"Sonde_Int",Objet_U);
21Sonde_Int::Sonde_Int():le_fichier(0) { }
22
24{
25 return s << que_suis_je();
26}
27
28/*! @brief Lit les specifications d'une sonde a partir d'un flot d'entree.
29 *
30 * Format:
31 * Sonde_Ints
32 * {
33 * [nom_sonde nom_champ Periode dts Points n x1 y1 [z1] ... xn yn [zn]
34 * [nom_sonde nom_champ Periode dts Segment ns x1 y1 [z1] x2 y2 [z2]
35 * ...
36 * }
37 *
38 * @param (Entree& is) un flot d'entree
39 * @return (Entree&) le flot d'entree modifie
40 * @throws donnees de la sonde non definies
41 * @throws erreur de format, mot clef inconnus
42 * @throws donnees de la sonde pas definies correctement
43 */
45{
46 assert(mon_post);
47
48 Probleme_base& pb = mon_post->probleme();
49 Motcle motlu;
50 Motcle accolade_fermee("}");
51 int nbre_points;
52
53 // Recherche du tableau sonde
54 // Remplissage de la reference au tableau
55
56 is >> motlu;
57 Noms liste_noms;
58 pb.get_noms_champs_postraitables(liste_noms);
59 for (int i=0; i<liste_noms.size(); i++)
60 {
61 if (liste_noms[i]==motlu)
62 {
63 OBS_PTR(IntVect) ref_tab;
64 if (pb.a_pour_IntVect(motlu,ref_tab))
65 mon_tableau = ref_tab;
66 else
67 {
68 Cerr << "The problem does not have the array " << motlu << finl;
69 exit();
70 }
71 }
72 }
73
74 // Lecture des caracteristiques de la sonde
75
76 IntVect fait(2);
77
78 Motcles les_motcles(6);
79 {
80 les_motcles[0] = "periode";
81 les_motcles[1] = "point";
82 les_motcles[2] = "points";
83 les_motcles[3] = "segment";
84 les_motcles[4] = "plan";
85 les_motcles[5] = "volume";
86 }
87
88 while ((fait(0) != 1) || (fait(1) != 1))
89 {
90 is >> motlu;
91 if (motlu == accolade_fermee)
92 {
93 Cerr << "Error while reading the probe " << nom_ <<finl;
94 Cerr << "The data of the probe were not defined" << finl;
95 exit();
96 }
97 int rang=les_motcles.search(motlu);
98 if (rang == -1)
99 {
100 Cerr << "Error while reading the probe " << nom_ <<finl;
101 Cerr << motlu << " is not understood; the keywords understood are : " << finl;
102 Cerr << les_motcles;
103 exit();
104 }
105
106 switch(rang)
107 {
108 case 0:
109 {
110 is >> periode;
111 break;
112 }
113 case 1:
114 case 2:
115 {
116 rang = 1;
117 dim = 0;
118 is >> nbre_points;
119 les_positions_.resize(nbre_points,dimension);
120
121 for (int i=0; i<nbre_points; i++)
122 for (int j=0; j<dimension; j++)
123 is >> les_positions_(i,j);
124
125 break;
126 }
127 case 3:
128 {
129 rang = 1;
130 dim = 1;
131 DoubleVect origine(dimension);
132 DoubleVect extremite(dimension);
133 DoubleVect dx(dimension);
134 int i=0,j=0;
135 is >> nbre_points;
136 les_positions_.resize(nbre_points,dimension);
137
138 for (; i<dimension; i++)
139 is >> origine(i);
140 for (i=0; i<dimension; i++)
141 is >> extremite(i);
142 for (i=0; i<dimension; i++)
143 dx(i)=(extremite(i)-origine(i))/(nbre_points-1);
144 for (i=0; i<nbre_points; i++)
145 for (j=0; j<dimension; j++)
146 les_positions_(i,j)=origine(j)+i*dx(j);
147 break;
148 }
149 case 4:
150 {
151 rang = 1;
152 dim = 2;
153 DoubleVect origine(dimension);
154 DoubleVect extremite1(dimension);
155 DoubleVect extremite2(dimension);
156 DoubleVect dx1(dimension);
157 DoubleVect dx2(dimension);
158 int i=0,j=0,k=0;
159 is >> nbre_points1;
160 is >> nbre_points2;
161 nbre_points=nbre_points1*nbre_points2;
162 les_positions_.resize(nbre_points,dimension);
163
164 for (; i<dimension; i++)
165 is >> origine(i);
166 for (i=0; i<dimension; i++)
167 is >> extremite1(i);
168 for (i=0; i<dimension; i++)
169 is >> extremite2(i);
170 for (i=0; i<dimension; i++)
171 dx1(i)=(extremite1(i)-origine(i))/(nbre_points1-1);
172 for (i=0; i<dimension; i++)
173 dx2(i)=(extremite2(i)-origine(i))/(nbre_points2-1);
174 for (i=0; i<nbre_points1; i++)
175 for (j=0; j<nbre_points2; j++)
176 for (k=0; k<dimension; k++)
177 les_positions_(i*nbre_points2+j,k)=origine(k)+i*dx1(k)+j*dx2(k);
178 break;
179 }
180 case 5:
181 {
182 rang = 1;
183 dim = 3;
184 DoubleVect origine(dimension);
185 DoubleVect extremite1(dimension);
186 DoubleVect extremite2(dimension);
187 DoubleVect extremite3(dimension);
188 DoubleVect dx1(dimension);
189 DoubleVect dx2(dimension);
190 DoubleVect dx3(dimension);
191 int i=0,j=0,k=0;
192 is >> nbre_points1;
193 is >> nbre_points2;
194 is >> nbre_points3;
195 nbre_points=nbre_points1*nbre_points2*nbre_points3;
196 les_positions_.resize(nbre_points,dimension);
197
198 for (; i<dimension; i++)
199 is >> origine(i);
200 for (i=0; i<dimension; i++)
201 is >> extremite1(i);
202 for (i=0; i<dimension; i++)
203 is >> extremite2(i);
204 for (i=0; i<dimension; i++)
205 is >> extremite3(i);
206 for (i=0; i<dimension; i++)
207 dx1(i)=(extremite1(i)-origine(i))/(nbre_points1-1);
208 for (i=0; i<dimension; i++)
209 dx2(i)=(extremite2(i)-origine(i))/(nbre_points2-1);
210 for (i=0; i<dimension; i++)
211 dx3(i)=(extremite3(i)-origine(i))/(nbre_points3-1);
212 for (i=0; i<nbre_points1; i++)
213 for (j=0; j<nbre_points2; j++)
214 for (int m=0; m<nbre_points3; m++)
215 for (k=0; k<dimension; k++)
216 les_positions_(i*nbre_points2*nbre_points1+j*nbre_points1+m,k)=origine(k)+i*dx1(k)+j*dx2(k)+m*dx3(k);
217 break;
218 }
219 default:
220 {
221 Cerr << motlu <<"is not yet understood!" << finl;
222 exit();
223 }
224 }
225 fait(rang) = 1;
226 }
227
228 if ( (fait[0] == 0) || (fait[1] == 0) )
229 {
230 Cerr << "Error while reading the probe " << nom_ << finl;
231 Cerr << "The data of the probe have not been properly defined" << finl;
232 exit();
233 }
234
235 const Domaine& le_dom =pb.domaine();
236 initialiser(le_dom);
237 return is;
238}
239
240
241/*! @brief Associer le postraitement a la sonde.
242 *
243 * @param (Postraitement& le_post) le postraitement a associer
244 */
246{
247 mon_post=le_post;
248 if (mon_post->noms_fichiers_sondes().contient(nom_)==0)
249 mon_post->noms_fichiers_sondes().add(nom_);
250 else
251 {
252 Cerr << "The filename " << nom_ << " is used several times for probes." << finl;
253 Cerr << "A probe must have a unique filename to avoid writing conflicts." << finl;
254 exit();
255 }
256
257}
258
259
260/*! @brief Initialise la sonde.
261 *
262 * Dimensionne les tableaux, de valeurs, verifie si les points specifies sont
263 * bien dans le domaine de calcul.
264 *
265 * @param (Domaine& domaine_geom) le domaine de calcul qui sera sondee
266 * @throws point de sondage en dehors du domaine de calcul
267 */
268void Sonde_Int::initialiser(const Domaine& domaine_geom)
269{
270 int nbre_points = les_positions_.dimension(0);
271 elem_.resize(nbre_points);
272 domaine_geom.chercher_elements(les_positions_,elem_);
273 for (int i=0; i<nbre_points; i++)
274 if (mp_max(elem_[i])==-1 && je_suis_maitre())
275 {
276 Cerr << "The point number " << i+1 << " of probe " << nom_ << finl;
277 Cerr << "is outside of the computational domain" << finl;
278 }
279 if (sub_type(IntTab,mon_tableau.valeur()))
280 {
281 const IntTab& tab_val = static_cast<const IntTab&>(mon_tableau.valeur());
282 valeurs.resize(nbre_points,tab_val.dimension(1));
283 }
284 else
285 valeurs.resize(nbre_points);
286
287}
288
289
290/*! @brief Ouvre le fichier associe a la sonde.
291 *
292 * (*.son)
293 *
294 */
296{
297 if(je_suis_maitre())
298 {
299 if( le_fichier)
300 delete le_fichier;
301 Nom nom_fich(nom_du_cas());
302 nom_fich += "_";
303 nom_fich += nom_;
304 nom_fich += ".son";
305 le_fichier=new SFichier(nom_fich);
306 SFichier& s = *le_fichier;
307 s.setf(ios::scientific);
308 s.precision(8);
309
310 // Ecriture de l'en tete des fichiers sondes :
311 if (dim==0 || dim==1)
312 {
313 const DoubleTab& p=les_positions();
314 int nbre_points = les_positions_.dimension(0);
315 s << "# " << nom_fich << finl;
316 s << "# Temps";
317 for(int i=0; i<nbre_points; i++)
318 {
319 s << " x=" << p(i,0) << " y=" << p(i,1) ;
320 if (dimension==3) fichier() << " z=" << p(i,2) ;
321 }
322 s << finl;
323 }
324 if (dim==2)
325 {
326 s << "TRUST Version1 01/09/96" << finl;
327 s << nom_du_cas() << finl;
328 s << "TRUST" << finl;
329 s << "GRILLE" << finl;
330 Nom nom_grille("Grille");
331 Nom nom_topologie("Topologie");
332 nom_grille += "_";
333 nom_grille += nom_;
334 nom_topologie += "_";
335 nom_topologie += nom_;
336 int k,kn;
337 int nbre_points = les_positions_.dimension(0);
338 const DoubleTab& p=les_positions();
339 double xn,yn,zn,norme;
340 if (dimension==3)
341 {
342 xn=(p(1,2)-p(0,2))*(p(nbre_points1,1)
343 -p(0,1))-(p(1,1)-p(0,1))*(p(nbre_points1,2)-p(0,2));
344 yn=(p(1,0)-p(0,0))*(p(nbre_points1,2)-p(0,2))
345 -(p(1,2)-p(0,2))*(p(nbre_points1,0)-p(0,0));
346 }
347 else// if (dimension==2)
348 {
349 assert(dimension==2);
350 xn=0.;
351 yn=0.;
352 }
353 zn=(p(1,1)-p(0,1))*(p(nbre_points1,0)-p(0,0))
354 -(p(1,0)-p(0,0))*(p(nbre_points1,1)-p(0,1));
355 norme=std::fabs(xn)+std::fabs(yn)+std::fabs(zn);
356 xn/=norme;
357 yn/=norme;
358 zn/=norme;
359 s << nom_grille << " 3 " << 2*nbre_points << finl;
360 int i;
361 for(i=0; i<nbre_points; i++)
362 {
363 s << p(i,0) << " " << p(i,1) ;
364 if (dimension==3) fichier() << " " << p(i,2) << finl;
365 else if (dimension==2) s << " 0." << finl;
366 }
367 for(i=0; i<nbre_points; i++)
368 {
369 s << p(i,0)+xn << " " << p(i,1)+yn ;
370 if (dimension==3) s << " " << p(i,2)+zn << finl;
371 else if (dimension==2) s << " " << zn << finl;
372 }
373 s << "TOPOLOGIE" << finl;
374 s << nom_topologie << " " << nom_grille << finl;
375 s << "MAILLE" << finl;
376 s << (nbre_points1-1)*(nbre_points2-1) << finl;
377 for(int j=0; j<nbre_points2-1; j++)
378 for(i=0; i<nbre_points1-1; i++)
379 {
380 k=j*nbre_points1+i+1;
381 kn=k+nbre_points;
382 s << "VOXEL8 " << k << " " << k+1 << " ";
383 s << k+nbre_points1 << " " << k+nbre_points1+1;
384 s << " " << kn << " " << kn+1 << " " << kn+nbre_points1;
385 s << " " << kn+nbre_points1+1 << finl;
386 }
387 s << "FACE" << finl;
388 s << "0" << finl;
389 }
390 if (dim==3)
391 {
392 s << "TRUST Version1 01/09/96" << finl;
393 s << nom_du_cas() << finl;
394 s << "TRUST" << finl;
395 s << "GRILLE" << finl;
396 Nom nom_grille("Grille");
397 Nom nom_topologie("Topologie");
398 nom_grille += "_";
399 nom_grille += nom_;
400 nom_topologie += "_";
401 nom_topologie += nom_;
402 int k,kn;
403 int nbre_points = les_positions_.dimension(0);
404 const DoubleTab& p=les_positions();
405 s << nom_grille << " 3 " << nbre_points << finl;
406 int i;
407 for(i=0; i<nbre_points; i++)
408 {
409 s << p(i,0) << " " << p(i,1) ;
410 s << " " << p(i,2) << finl;
411 }
412 s << "TOPOLOGIE" << finl;
413 s << nom_topologie << " " << nom_grille << finl;
414 s << "MAILLE" << finl;
415 s << (nbre_points1-1)*(nbre_points2-1)*(nbre_points3-1) << finl;
416 for(int m=0; m<nbre_points3-1; m++)
417 for(int j=0; j<nbre_points2-1; j++)
418 for(i=0; i<nbre_points1-1; i++)
419 {
420 k=m*nbre_points2*nbre_points1+j*nbre_points1+i+1;
421 kn=k+nbre_points2*nbre_points1;
422 s << "VOXEL8 " << k << " " << k+1 << " ";
423 s << k+nbre_points1 << " " << k+nbre_points1+1;
424 s << " " << kn << " " << kn+1 << " " << kn+nbre_points1;
425 s << " " << kn+nbre_points1+1 << finl;
426 }
427 s << "FACE" << finl;
428 s << "0" << finl;
429 }
430 }
431}
432
433
434/*! @brief Effectue une mise a jour en temps de la sonde effectue le postraitement.
435 *
436 * @param (double temps) le temps de mise a jour
437 * @param (double tinit) le temps initial de la sonde
438 */
439void Sonde_Int::mettre_a_jour(double un_temps, double tinit)
440{
441 double nb;
442 modf((un_temps-tinit)/periode, &nb);
443 if (nb>nb_bip)
444 {
445 nb_bip=nb;
446 postraiter(un_temps);
447 }
448}
449
450
451/*! @brief Effectue un postraitement.
452 *
453 * Imprime les valeurs du tableau aux positions demandees
454 * sur le fichier associe.
455 *
456 */
457void Sonde_Int::postraiter(double un_temps)
458{
459 if (sub_type(IntTab,mon_tableau.valeur()))
460 {
461 const IntTab& val_tab= static_cast<const IntTab&>(mon_tableau.valeur());
462 int nval = val_tab.dimension(1);
463 //int i,j;
464 // int nb_compo=valeurs.nb_dim();
465 int nbre_points = les_positions_.dimension(0);
466
467 for (int i=0; i<nbre_points; i++)
468 for (int j=0; j<nval; j++)
469 valeurs(i,j) = val_tab(elem_(i),j);
470
471 if(je_suis_maitre())
472 {
473 int p;
474 int nbproc = Process::nproc();
475 IntTab valeurs_pe;
476 int val_max;
477 for(p=1; p<nbproc; p++)
478 {
479 recevoir(valeurs_pe,p,0,p);
480 int n1=valeurs.dimension(0);
481 int n2=valeurs.dimension(1);
482 int k;
483 for(int i=0; i<n1; i++)
484 for(k=0; k<n2; k++)
485 {
486 val_max = std::max(std::abs(valeurs(i,k)),std::abs(valeurs_pe(i,k)));
487 if(val_max==(std::abs(valeurs_pe(i,k))))
488 valeurs(i,k)=valeurs_pe(i,k);
489 }
490 }
491
492 if (dim==0 || dim==1)
493 {
494 fichier() << un_temps;
495 for(int i=0; i<valeurs.dimension(0); i++)
496 for(int k=0; k<valeurs.dimension(1); k++)
497 fichier() << " " << valeurs(i,k);
498 fichier() << finl;
499 }
500
501 // Pour les sondes type plan, impression au format lml :
502 // num_sommet comp1 [comp2] [comp3]
503 // et dans la troisieme direction :
504 else if (dim==2 || dim==3)
505 {
506 Nom unite;
507 Nom nom_topologie("Topologie");
508 nom_topologie += "_";
509 nom_topologie += nom_;
510 fichier() << "TEMPS " << un_temps << "\n";
511 fichier() << "CHAMPOINT " << nom_ << " " << nom_topologie
512 << " " << un_temps << "\n";
513 fichier() << nom_ << " " << nval << " " << unite << "\n";
514 int nbp=nbre_points;
515 if (dim==2) nbp*=2;
516 fichier() << "type1 " << nbp << "\n";
517 int i;
518 for(i=0; i<nbre_points; i++)
519 {
520 fichier() << i+1;
521 for(int j=0; j<valeurs.dimension(1); j++)
522 fichier() << " " << valeurs(i,j);
523 // Pour ne pas flusher :
524 fichier() << "\n";
525 }
526 // Pour le 2D, on rajoute une direction
527 if (dim==2)
528 {
529 for(i=0; i<nbre_points; i++)
530 {
531 fichier() << nbre_points+i+1;
532 for(int j=0; j<valeurs.dimension(1); j++)
533 fichier() << " " << valeurs(i,j);
534 // Pour ne pas flusher :
535 fichier() << "\n";
536 }
537 }
538 }
539 fichier().flush();
540 }
541 else
542 envoyer(valeurs,Process::me(),0,Process::me());
543 }
544 else
545 {
546 const IntVect& val_tab= static_cast<const IntVect&>(mon_tableau.valeur());
547 int nval =1;
548
549
550 //int nb_compo=valeurs.nb_dim();
551 int nbre_points = les_positions_.dimension(0);
552
553 for (int i=0; i<nbre_points; i++)
554 valeurs(i) = val_tab(elem_(i));
555
556 if(je_suis_maitre())
557 {
558 int p;
559 int nbproc = Process::nproc();
560 IntTab valeurs_pe;
561 int val_max;
562 for(p=1; p<nbproc; p++)
563 {
564 recevoir(valeurs_pe,p,0,p);
565
566 for(int i=0; i<valeurs.dimension(0); i++)
567 {
568 val_max = std::max(std::abs(valeurs(i)), std::abs(valeurs_pe(i)));
569 if(val_max == std::abs(valeurs_pe(i)))
570 valeurs(i)=valeurs_pe(i);
571 }
572 }
573 if (dim==0 || dim==1)
574 {
575 fichier() << un_temps;
576 for(int i=0; i<valeurs.dimension(0); i++)
577 fichier() << " " << valeurs(i);
578 fichier() << finl;
579 }
580
581 // Pour les sondes type plan, impression au format lml :
582 // num_sommet comp1 [comp2] [comp3]
583 // et dans la troisieme direction :
584 else if (dim==2 || dim==3)
585 {
586 Nom unite;
587 Nom nom_topologie("Topologie");
588 nom_topologie += "_";
589 nom_topologie += nom_;
590 fichier() << "TEMPS " << un_temps << "\n";
591 fichier() << "CHAMPOINT " << nom_ << " " << nom_topologie
592 << " " << un_temps << "\n";
593 fichier() << nom_ << " " << nval << " " << unite << "\n";
594 int nbp=nbre_points;
595 if (dim==2) nbp*=2;
596 fichier() << "type0 " << nbp << "\n";
597 //int i;
598 for(int i=0; i<nbre_points; i++)
599 {
600 fichier() << i+1;
601 fichier() << " " << valeurs(i);
602 // Pour ne pas flusher :
603 fichier() << "\n";
604 }
605 // Pour le 2D, on rajoute une direction
606 if (dim==2)
607 {
608 for(int i=0; i<nbre_points; i++)
609 {
610 fichier() << nbre_points+i+1;
611 fichier() << " " << valeurs(i);
612 // Pour ne pas flusher :
613 fichier() << "\n";
614 }
615 }
616 }
617 fichier().flush();
618 }
619 else
620 envoyer(valeurs,Process::me(),0,Process::me());
621 }
622
623}
SmallArrOfTID_t & chercher_elements(const DoubleTab &pos, SmallArrOfTID_t &elem, int reel=0) const
Recherche des elements contenant les points dont les coordonnees sont specifiees.
Definition Domaine.cpp:405
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
classe Objet_U Cette classe est la classe de base des Objets de TRUST
Definition Objet_U.h:73
static int dimension
Definition Objet_U.h:99
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
static const Nom & nom_du_cas()
Renvoie une reference constante vers le nom du cas.
Definition Objet_U.cpp:146
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
classe Postraitement La classe est dotee -d une liste de champs generiques champs_post_complet_ qui c...
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
const Domaine & domaine() const
Renvoie le domaine associe au probleme.
virtual int a_pour_IntVect(const Motcle &, OBS_PTR(IntVect)&) const
static double mp_max(double)
Definition Process.cpp:376
static int nproc()
renvoie le nombre de processeurs dans le groupe courant Voir Comm_Group::nproc() et PE_Groups::curren...
Definition Process.cpp:104
static int me()
renvoie mon rang dans le groupe de communication courant.
Definition Process.cpp:125
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
static int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
Definition Process.cpp:86
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27
classe Sonde_Int Cette classe permet d'effectuer l'evolution d'un champ au cours du temps.
Definition Sonde_Int.h:36
SFichier & fichier()
Renvoie un flot de sortie Fichier, pointant sur le fichier de sortie utilise par la sonde.
Definition Sonde_Int.h:152
void ouvrir_fichier()
Ouvre le fichier associe a la sonde.
const DoubleTab & les_positions() const
Renvoie le tableau des positions du champ qui sont sondees.
Definition Sonde_Int.h:132
void associer_post(const Postraitement &)
Associer le postraitement a la sonde.
void initialiser(const Domaine &)
Initialise la sonde.
Sonde_Int(const Nom &)
Constructeur d'une sonde a partir de son nom.
Definition Sonde_Int.cpp:21
void mettre_a_jour(double temps, double tinit)
Effectue une mise a jour en temps de la sonde effectue le postraitement.
void postraiter(double)
Effectue un postraitement.
Sortie & flush() override
Force l'ecriture sur disque des donnees dans le tampon Utilise l'implementation de la classe ofstream...
void precision(int pre) override
void setf(IOS_FORMAT code) override
Classe de base des flux de sortie.
Definition Sortie.h:52
void resize(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTArray.h:156
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133