16#ifndef Schema_Temps_base_included
17#define Schema_Temps_base_included
19#include <Interface_blocs.h>
20#include <TRUST_Deriv.h>
102 inline const Nom&
le_nom()
const override;
136 virtual int stop()
const;
143 assert(stationnaire_atteint_ != -1);
144 return stationnaire_atteint_;
182 inline int lu()
const {
return lu_; }
205 if (stationnaire_atteint_ == -1)
206 stationnaire_atteint_ = 1;
207 return stationnaire_atteint_;
235 virtual void ajouter_blocs(matrices_t matrices, DoubleTab& secmem,
const Equation_base& eqn,
const tabs_t& semi_impl = {})
const;
240 return disable_progress_ ;
247 return disable_dt_ev_ ;
306 int stationnaire_atteint_ = 0;
307 int stationnaires_atteints_ = 0;
309 bool disable_progress_ =
false;
310 bool disable_dt_ev_ =
false;
Class defining operators and methods for all reading operation in an input flow (file,...
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.
class Nom: a character string for naming TRUST objects.
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Helper class to factorize the readOn method of Objet_U classes.
class Parser_U Version of the Parser class, deriving from Objet_U.
class Probleme_base It is a Probleme_U that is not a coupling.
static void abort()
Abort routine for TRUST on a fatal error.
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
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 &)
int impr_extremums() const
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 & set_stationnaire_atteint()
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
bool ind_nb_pas_dt_max_atteint
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.
double & set_temps_courant()
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.
int gnuplot_header() const
virtual void ajouter_inertie(Matrice_Base &mat_morse, DoubleTab &secmem, const Equation_base &eqn) const
virtual double temps_futur(int i) const =0
int precision_impr() const
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.
int no_error_if_not_converged_diff_impl_
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.
int & set_precision_impr()
virtual void abortTimeStep()
virtual void changer_temps_courant(const double)
Changes the current time.
double periode_cpu_sans_sauvegarde_
Default 23 hours;.
bool ind_tps_final_atteint
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 & set_diffusion_implicite()
int niter_max_diff_impl_
Maximum iterations for CG diffusion implicitation - Above 1000 iterations, diffusion implicit algorit...
double & set_temps_init()
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).
int no_conv_subiteration_diff_impl_
double seuil_diffusion_implicite() const
void notify_failed_timestep()
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.
int & set_nb_pas_dt_max()
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.
double & set_seuil_statio()
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_).
bool ind_temps_cpu_max_atteint
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
double & set_mode_dt_start()
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.