TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Schema_Temps_base.h
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#ifndef Schema_Temps_base_included
17#define Schema_Temps_base_included
18
19#include <Interface_blocs.h>
20#include <TRUST_Deriv.h>
21#include <TRUST_Ref.h>
22#include <TRUSTTab.h>
23#include <Parser_U.h>
24#include <SFichier.h>
25#include <math.h>
26
27class Probleme_base;
28class Equation_base;
29class Matrice_Base;
30class SFichier;
31class Motcle;
32class Param;
33
34/*! @brief class Schema_Temps_base
35 *
36 * This class represents a time scheme, i.e. a particular
37 * resolution algorithm that will be associated with a
38 * Probleme_base (a simple problem and not a coupling).
39 * Schema_Temps_base is the abstract class at the base of
40 * the time scheme hierarchy.
41 *
42 * We denote n as the current time, and n+1 as the time at the end of the time step.
43 * A time scheme computes u(n+1) knowing u up to u(n).
44 * It uses u(n), but may also need past values of u,
45 * such as u(n-1), ...
46 * It may also during computation use values of u at intermediate
47 * times between n and n+1, e.g. n+1/2.
48 * nb_valeurs_temporelles counts all allocated values:
49 * n, n+1, the retained past values and the intermediate values
50 * between n and n+1.
51 * nb_valeurs_futures counts n+1 and the intermediate values between n and n+1.
52 * It is therefore the number of notches the wheels turn when advancing one time step.
53 * temps_futur(i) returns the i-th future time value.
54 * Finally temps_defaut is the time that fields must return
55 * when valeurs() is called - particularly in operators.
56 * Currently only respected by Champ_Front of boundary conditions.
57 *
58 * @sa Equation_base Probleme_base Algo_MG_base
59 *
60 * Abstract class from which all time schemes must derive.
61 *
62 * Abstract methods:
63 * int faire_un_pas_de_temps_eqn_base(Equation_base&)
64 */
65
67{
68 Declare_base(Schema_Temps_base);
69
70public :
71 virtual void initialize();
72 virtual void terminate() ;
73 virtual double computeTimeStep(bool& stop) const;
74 virtual bool initTimeStep(double dt);
75 virtual void validateTimeStep();
76 virtual bool isStationary() const;
77 virtual void abortTimeStep();
78 virtual void resetTime(double time);
79
80 virtual bool iterateTimeStep(bool& converged);
81 int limpr() const;
82
83 ////////////////////////////////
84 // //
85 // Characteristics of the //
86 // time scheme //
87 // //
88 ////////////////////////////////
89
90 virtual int nb_valeurs_temporelles() const =0;
91 virtual int nb_valeurs_futures() const =0;
92 virtual double temps_futur(int i) const =0;
93 virtual double temps_defaut() const =0;
94
95 /////////////////////////////////////////
96 // //
97 // End of time scheme characteristics //
98 // //
99 /////////////////////////////////////////
100
101 inline void nommer(const Nom&) override;
102 inline const Nom& le_nom() const override;
104
105 virtual void set_param(Param& titi) const override;
106 int sauvegarder(Sortie& ) const override;
107 int reprendre(Entree& ) override ;
108 virtual int mettre_a_jour();
109 virtual void mettre_a_jour_dt(double toto) { abort(); }
110 virtual void mettre_a_jour_dt_stab();
111
112 inline double pas_de_temps() const;
113 inline const DoubleTab& pas_de_temps_locaux() const;
114
115 virtual bool corriger_dt_calcule(double& dt) const;
116 virtual void imprimer(Sortie& os) const;
117 virtual int impr(Sortie& os) const;
118 void imprimer(Sortie& os,Probleme_base& pb) const;
119 void imprimer(Sortie& os,const Probleme_base& pb) const;
120 virtual int impr(Sortie& os,Probleme_base& pb) const;
121 virtual int impr(Sortie& os,const Probleme_base& pb) const;
122 void imprimer_temps_courant(SFichier&) const;
123 inline double pas_temps_min() const;
124 inline double& pas_temps_min();
125 inline double pas_temps_max() const;
126 inline double& pas_temps_max();
127 inline int nb_impr() const;
128 inline double temps_courant() const;
129 inline double temps_precedent() const;
130 inline double temps_calcul() const;
131 virtual inline void changer_temps_courant(const double );
132 void update_critere_statio(const DoubleTab& tab_critere, Equation_base& equation);
133 inline double facteur_securite_pas() const;
134 inline double& facteur_securite_pas();
135 inline void notify_failed_timestep();
136 virtual int stop() const;
137 int lsauv() const;
138 inline int temps_final_atteint() const;
139 inline int nb_pas_dt_max_atteint() const;
140 inline int temps_cpu_max_atteint() const;
141 inline int stationnaire_atteint() const
142 {
143 assert(stationnaire_atteint_ != -1);
144 return stationnaire_atteint_;
145 }
146 inline int stationnaire_atteint_safe() const { return stationnaire_atteint_; }
147 int stop_lu() const;
148 inline int diffusion_implicite() const;
149 inline double seuil_diffusion_implicite() const { return seuil_diff_impl_; }
150 inline int impr_diffusion_implicite() const { return impr_diff_impl_; }
151 inline int impr_extremums() const { return impr_extremums_; }
155 int lire_motcle_non_standard(const Motcle&, Entree&) override;
159 virtual Entree& lire_residuals(Entree&);
160
161 virtual void completer() =0;
162
163 inline double temps_init() const ;
164 inline double temps_max() const ;
165 inline double temps_sauv() const ;
166 inline int nb_sauv_max() const;
167 inline double temps_impr() const ;
168 inline int precision_impr() const { return precision_impr_; }
169 inline int wcol() const
170 {
171 // minimum column width for .out files
172 // precision_impr_ + 9 because: -1.000e+150 we add the length of "-1." and "e+150" plus one space
173 return precision_impr_ + 9;
174 }
175 inline int gnuplot_header() const { return gnuplot_header_; }
176 inline double seuil_statio() const ;
177 inline int nb_pas_dt_max() const ;
178 inline int nb_pas_dt() const ;
179 inline double mode_dt_start() const { return mode_dt_start_; }
180 inline int indice_tps_final_atteint() const { return ind_tps_final_atteint; }
182 inline int lu() const { return lu_; }
183 inline int file_allocation() const { return file_allocation_; }
184
185 inline double& set_temps_init() { return tinit_; }
186 inline double& set_temps_max() { return tmax_; }
187 inline double& set_temps_courant() { return temps_courant_; }
188 inline double& set_temps_precedent() { return temps_precedent_; }
189 inline int& set_nb_pas_dt() { return nb_pas_dt_; }
190 inline int& set_nb_pas_dt_max() { return nb_pas_dt_max_; }
191 inline double& set_dt_min() { return dt_min_; }
192 inline double& set_dt_max()
193 {
194 dt_max_str_ = Nom(); //deactivates the function dt_max = f(t)
195 return dt_max_;
196 }
197 inline double& set_dt_sauv() { return dt_sauv_; }
198 inline double& set_dt_impr() { return dt_impr_; }
199 inline int& set_precision_impr() { return precision_impr_; }
200 inline double& set_dt() { return dt_; }
201 inline double& set_facsec() { return facsec_; }
202 inline double& set_seuil_statio() { return seuil_statio_; }
204 {
205 if (stationnaire_atteint_ == -1)
206 stationnaire_atteint_ = 1;
207 return stationnaire_atteint_;
208 }
209 inline void set_stationnaires_atteints(bool flag) { stationnaires_atteints_=flag; }
210 inline int& set_diffusion_implicite() { return ind_diff_impl_; }
213 inline double& set_mode_dt_start() { return mode_dt_start_; }
216 inline bool& set_lu() { return lu_; }
217 inline const double& residu() const { return residu_ ; }
218 inline double& residu() { return residu_ ; }
219 inline const Nom& norm_residu() const { return norm_residu_ ; }
220
221 inline int& schema_impr() { return schema_impr_ ; }
222 inline const int& schema_impr() const { return schema_impr_ ; }
223
224 virtual void associer_pb(const Probleme_base&);
226 const Probleme_base& pb_base() const;
227
228 // for multi-step time schemes
229 inline virtual void modifier_second_membre(const Equation_base& eqn, DoubleTab& secmem) { };
230
231 // for implicit schemes: add inertia to matrix and right-hand side
232 virtual void ajouter_inertie(Matrice_Base& mat_morse,DoubleTab& secmem,const Equation_base& eqn) const;
233
234 //interface ajouter_blocs
235 virtual void ajouter_blocs(matrices_t matrices, DoubleTab& secmem, const Equation_base& eqn, const tabs_t& semi_impl = {}) const;
236
237 // Flag to disable the writing of the .progress file
238 inline bool disable_progress() const
239 {
240 return disable_progress_ ;
241 }
242 void write_dt_ev(bool init);
243 void write_progress(bool init);
244 // Flag to disable the writing of the .dt_ev file
245 inline bool disable_dt_ev() const
246 {
247 return disable_dt_ev_ ;
248 }
249 void finir() const;
250
251protected :
252 OBS_PTR(Probleme_base) mon_probleme;
254 double dt_ = 0.0; ///< Computation time step
255 DoubleTab dt_locaux_; ///< Local time steps: Vector of size nb faces of the mesh
256
257 double temps_courant_ = -100.;
258 double temps_precedent_ = -100.;
259 double dt_failed_ = -100.; ///< Value of a time step if it failed
260 double dt_gf_ = DMAXFLOAT;
261 double tinit_ = -DMAXFLOAT;
262 double tmax_ = 1.e30;
263 double tcpumax_ = 1.e30;
264 int nb_pas_dt_ = 0;
265 int nb_pas_dt_max_ = std::numeric_limits<int>::max();
266 mutable int nb_impr_ = 0;
267 double dt_min_ = 1.e-16; ///< Minimum time step set by the user
268 mutable double dt_max_ = 1.e30; ///< Maximum time step set by the user
269 Nom dt_max_str_; ///< setting of dt_max as a function of time
270 mutable Parser_U dt_max_fn_; ///< Associated Parser_U
271 double dt_stab_=-100.; ///< Stability time step
272 mutable double facsec_ = 1.;
273 double seuil_statio_ = 1.e-12;
274 int seuil_statio_relatif_deconseille_ = 0; ///< Flag to specify whether seuil_statio_ is an absolute (default) or relative value
276 double dt_sauv_ = 1.e30;
277 mutable int nb_sauv_ = 0; ///< how many checkpoints have we performed so far?
278 int nb_sauv_max_ = 10; ///< Max number of checkpoints that will be performed (useful for PDI backup file)
279 double limite_cpu_sans_sauvegarde_ = 23 * 3600; ///< Default 23 hours;
280 double periode_cpu_sans_sauvegarde_ = 23 * 3600; ///< Default 23 hours;
282 double dt_impr_ = 1.e30; ///< Output time interval
283 int precision_impr_ = 8; ///< Number of significant digits for output
284 double mode_dt_start_ = -2; ///< Mode for computing the initial time step - contains a double if dt_init option is used
285 double residu_ = 0;
286 double residu_old_slope_ = -1000;
287 double cumul_slope_ = 1e-20;
289
290 bool adapt_dt_tmax_ = false;
294 bool lu_ = false;
296 double seuil_diff_impl_ = 1.e-6; ///< Threshold for implicit treatment of diffusion by CG
299 int niter_max_diff_impl_ = 1000; ///< Maximum iterations for CG diffusion implicitation - Above 1000 iterations, diffusion implicit algorithm may be diverging
302 int schema_impr_ = -1; // 1 if the scheme is allowed to print to .out and dt_ev files
303 int file_allocation_ = 0; // 1 = disk space allocation (default), 0 otherwise
304 int max_length_cl_ = -10;
305private:
306 int stationnaire_atteint_ = 0; ///< Stationary reached by the problem using this scheme
307 int stationnaires_atteints_ = 0; ///< Stationary reached by the calculation (means all the problems reach stationary)
308 SFichier progress_;
309 bool disable_progress_ = false; ///< Flag to disable the writing of the .progress file
310 bool disable_dt_ev_ = false; ///< Flag to disable the writing of the .dt_ev file
311};
312
313/*! @brief overrides Objet_U::nommer(const Nom&) Gives a name to the time scheme
314 *
315 * @param (Nom& name) the name to give to the time scheme
316 */
317inline void Schema_Temps_base::nommer(const Nom& name)
318{
319 nom_=name;
320}
321
322/*! @brief overrides Objet_U::le_nom() Returns the name of the time scheme
323 *
324 * @return (Nom&) the name of the time scheme
325 */
326inline const Nom& Schema_Temps_base::le_nom() const
327{
328 return nom_;
329}
330
335
336/*! @brief Returns a reference to the maximum number of time steps
337 *
338 * @return (double&)
339 */
341{
342 return nb_pas_dt_max_;
343}
344
345/*! @brief Returns a reference to the stationarity threshold
346 *
347 * @return (double&)
348 */
350{
351 return seuil_statio_;
352}
353
354/*! @brief Returns a reference to the output time interval
355 *
356 * @return (double&)
357 */
358inline double Schema_Temps_base::temps_impr() const
359{
360 return dt_impr_;
361}
362
363/*! @brief Returns a reference to the checkpoint time interval
364 *
365 * @return (double&)
366 */
367inline double Schema_Temps_base::temps_sauv() const
368{
369 return dt_sauv_;
370}
371
372/*! @brief Returns the maximum number of checkpoints (estimate)
373 *
374 * @return (int)
375 */
377{
378 return nb_sauv_max_;
379}
380
381/*! @brief Returns a reference to the maximum time
382 *
383 * @return (double&)
384 */
385inline double Schema_Temps_base::temps_max() const
386{
387 return tmax_;
388}
389
390/*! @brief Returns the current time step (delta_t).
391 *
392 * @return (double) the current time step
393 */
395{
396 return dt_;
397}
398inline const DoubleTab& Schema_Temps_base::pas_de_temps_locaux() const
399{
400 return dt_locaux_;
401}
402/*! @brief Returns the minimum time step.
403 *
404 * (const version)
405 *
406 * @return (double) the minimum time step of the time scheme
407 */
409{
410 return dt_min_;
411}
412
413/*! @brief Returns a reference to the minimum time step.
414 *
415 * @return (double&) the minimum time step of the time scheme
416 */
418{
419 return dt_min_;
420}
421
422/*! @brief Returns the maximum time step.
423 *
424 * (const version)
425 *
426 * @return (double) the maximum time step of the time scheme
427 */
429{
430 return dt_max_;
431}
432
433/*! @brief Returns a reference to the maximum time step.
434 *
435 * @return (double&) the maximum time step of the time scheme
436 */
438{
439 return dt_max_;
440}
441
442/*! @brief Returns the current time.
443 *
444 * @return (double) the current time of the time scheme
445 */
447{
448 return temps_courant_;
449}
450
451/*! @brief Returns the previous time.
452 *
453 * @return (double) the previous time of the time scheme
454 */
456{
457 return temps_precedent_;
458}
459
460/*! @brief Returns the elapsed computation time i.
461 *
462 * e. (current time - initial time).
463 *
464 * @return (double) the elapsed computation time
465 */
467{
468 return temps_courant_ - tinit_;
469}
470
471/*! @brief Returns the initial time.
472 *
473 * @return (double) the initial time
474 */
475inline double Schema_Temps_base::temps_init() const
476{
477 return tinit_;
478}
479
480/*! @brief Returns the number of time steps performed.
481 *
482 * @return (int) the number of time steps performed
483 */
485{
486 return nb_pas_dt_;
487}
488
489/*! @brief Returns the number of outputs performed.
490 *
491 * @return (int) the number of outputs performed
492 */
494{
495 return nb_impr_;
496}
497
498/*! @brief Changes the current time.
499 *
500 * @param (double& t) the new current time
501 */
503{
504 temps_courant_ = t;
505}
506
507/*! @brief Returns the safety factor or multiplier of delta_t.
508 *
509 * This factor is used during the correction/verification of
510 * the time step. See Schema_Temps_base::corriger_dt_calcule(double&)
511 * (const version)
512 *
513 * @return (double) the safety factor of the time scheme
514 */
516{
517 return facsec_;
518}
519
520/*! @brief Returns a reference to the safety factor or multiplier of delta_t.
521 *
522 * This factor is used during the correction/verification of
523 * the time step. See Schema_Temps_base::corriger_dt_calcule(double&)
524 *
525 * @return (double&) the safety factor of the time scheme
526 */
528{
529 return facsec_;
530}
531
532/*! @brief Returns 1 if the final time has been reached (or exceeded).
533 *
534 * Returns 1 if temps_courant_ >= tmax
535 * Returns 0 otherwise
536 *
537 * @return (int) 1 if the final time is reached, 0 otherwise
538 * @throws final time reached
539 */
541{
543}
544
545/*! @brief Returns 1 if (the number of time steps >= maximum number of time steps).
546 *
547 * Returns 0 otherwise
548 *
549 * @return (int) 1 if the maximum number of time steps is exceeded, 0 otherwise
550 * @throws maximum number of time steps reached
551 */
556
561
562/*! @brief Returns 1 if the time scheme has been read with diffusion_implicite.
563 *
564 * @return (int) 1 if the time scheme has been read, 0 otherwise.
565 */
567{
568 return ind_diff_impl_;
569}
570
571#endif /* Schema_Temps_base_included */
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Equation_base The role of an equation is the calculation of one or more fields....
Matrice_Base class - Base class of the matrix hierarchy.
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:71
friend class Sortie
Definition Objet_U.h:70
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Definition Objet_U.cpp:54
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class Parser_U Version of the Parser class, deriving from Objet_U.
Definition Parser_U.h:32
class Probleme_base It is a Probleme_U that is not a coupling.
static void abort()
Abort routine for TRUST on a fatal error.
Definition Process.cpp:573
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Definition SFichier.h:29
class Schema_Temps_base
int seuil_statio_relatif_deconseille_
Flag to specify whether seuil_statio_ is an absolute (default) or relative value.
int diffusion_implicite() const
Returns 1 if the time scheme has been read with diffusion_implicite.
virtual Entree & lire_periode_sauvegarde_securite_en_heures(Entree &)
bool & set_indice_nb_pas_dt_max_atteint()
int precision_impr_
Number of significant digits for output.
int limpr() const
Returns 1 if there is a need to perform a print (cf dt_impr) Returns 0 otherwise.
virtual double computeTimeStep(bool &stop) const
int nb_impr() const
Returns the number of outputs performed.
const Nom & le_nom() const override
overrides Objet_U::le_nom() Returns the name of the time scheme
virtual bool isStationary() const
Returns 1 if during the last time step, the problem has not evolved.
int stationnaire_atteint_safe() const
double temps_courant() const
Returns the current time.
int impr_diffusion_implicite() const
virtual void resetTime(double time)
int no_error_if_not_converged_diffusion_implicite() const
Nom dt_max_str_
setting of dt_max as a function of time
OBS_PTR(Probleme_base) mon_probleme
virtual bool corriger_dt_calcule(double &dt) const
Corrects the computed time step passed as parameter and verifies it is not "too" small (< dt_min_).
double temps_sauv() const
Returns a reference to the checkpoint time interval.
double temps_impr() const
Returns a reference to the output time interval.
int sauvegarder(Sortie &) const override
Saves the current time and the number of time steps to an output stream.
int nb_pas_dt_max_atteint() const
Returns 1 if (the number of time steps >= maximum number of time steps).
Parser_U dt_max_fn_
Associated Parser_U.
virtual void set_param(Param &titi) const override
int nb_sauv_
how many checkpoints have we performed so far?
const Nom & norm_residu() const
double dt_
Computation time step.
virtual void ajouter_inertie(Matrice_Base &mat_morse, DoubleTab &secmem, const Equation_base &eqn) const
virtual double temps_futur(int i) const =0
bool disable_progress() const
double dt_failed_
Value of a time step if it failed.
double pas_temps_max() const
Returns the maximum time step.
virtual void associer_pb(const Probleme_base &)
void write_dt_ev(bool init)
void nommer(const Nom &) override
overrides Objet_U::nommer(const Nom&) Gives a name to the time scheme
double temps_max() const
Returns a reference to the maximum time.
double dt_max_
Maximum time step set by the user.
double mode_dt_start_
Mode for computing the initial time step - contains a double if dt_init option is used.
virtual void abortTimeStep()
virtual void changer_temps_courant(const double)
Changes the current time.
double periode_cpu_sans_sauvegarde_
Default 23 hours;.
double limite_cpu_sans_sauvegarde_
Default 23 hours;.
double temps_calcul() const
Returns the elapsed computation time i.
int nb_sauv_max() const
Returns the maximum number of checkpoints (estimate).
int indice_tps_final_atteint() const
int temps_final_atteint() const
Returns 1 if the final time has been reached (or exceeded).
virtual int stop() const
Returns 1 if it is necessary to stop the computation for various reasons:
int & set_niter_max_diffusion_implicite()
Probleme_base & pb_base()
bool disable_dt_ev() const
virtual void validateTimeStep()
void imprimer_temps_courant(SFichier &) const
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
virtual int impr(Sortie &os) const
Prints the time step number, the time step value, and the current time.
double pas_temps_min() const
Returns the minimum time step.
int niter_max_diff_impl_
Maximum iterations for CG diffusion implicitation - Above 1000 iterations, diffusion implicit algorit...
virtual void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const Equation_base &eqn, const tabs_t &semi_impl={}) const
double pas_de_temps() const
Returns the current time step (delta_t).
double seuil_diffusion_implicite() const
double & set_temps_precedent()
DoubleTab dt_locaux_
Local time steps: Vector of size nb faces of the mesh.
const DoubleTab & pas_de_temps_locaux() const
virtual void imprimer(Sortie &os) const
Prints the time step to an output stream if appropriate.
virtual void initialize()
virtual bool initTimeStep(double dt)
double seuil_statio() const
Returns a reference to the stationarity threshold.
virtual int nb_valeurs_futures() const =0
virtual Entree & lire_residuals(Entree &)
virtual void modifier_second_membre(const Equation_base &eqn, DoubleTab &secmem)
int nb_sauv_max_
Max number of checkpoints that will be performed (useful for PDI backup file).
virtual int faire_un_pas_de_temps_eqn_base(Equation_base &)=0
int niter_max_diffusion_implicite() const
int nb_pas_dt() const
Returns the number of time steps performed.
const double & residu() const
double dt_impr_
Output time interval.
int stop_lu() const
Returns 1 if the .stop file contains a 1, returns 0 otherwise.
double mode_dt_start() const
double dt_min_
Minimum time step set by the user.
int reprendre(Entree &) override
Restarts (reads) the current time and the number of time steps performed from an input stream.
const int & schema_impr() const
virtual bool iterateTimeStep(bool &converged)
Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time sche...
double temps_init() const
Returns the initial time.
virtual int nb_valeurs_temporelles() const =0
virtual int mettre_a_jour()
Updates the current time (t+=dt) and the number of time steps performed (nb_pas_dt_++).
int stationnaire_atteint() const
double dt_stab_
Stability time step.
double & set_seuil_diffusion_implicite()
int indice_nb_pas_dt_max_atteint() const
int no_conv_subiteration_diffusion_implicite() const
virtual Entree & lire_temps_cpu_max(Entree &)
virtual void mettre_a_jour_dt_stab()
int temps_cpu_max_atteint() const
virtual void mettre_a_jour_dt(double toto)
virtual double temps_defaut() const =0
int file_allocation() const
virtual Entree & lire_nb_pas_dt_max(Entree &)
Reads the maximum number of time steps.
bool & set_indice_tps_final_atteint()
int nb_pas_dt_max() const
Returns a reference to the maximum number of time steps.
double seuil_diff_impl_
Threshold for implicit treatment of diffusion by CG.
void update_critere_statio(const DoubleTab &tab_critere, Equation_base &equation)
Updates stationnaire_atteint_ and residu_ (criterion: residu_ < seuil_statio_).
void write_progress(bool init)
Writes the .progress file (estimated remaining CPU time).
double facteur_securite_pas() const
Returns the safety factor or multiplier of delta_t.
virtual void completer()=0
void finir() const
Closes the .dt_ev file.
void set_stationnaires_atteints(bool flag)
double temps_precedent() const
Returns the previous time.
Base class for output streams.
Definition Sortie.h:52