16#include <Multi_Sch_ThHyd.h>
17#include <Probleme_base.h>
18#include <Navier_Stokes_std.h>
40 return std::max(sch_ns_->nb_valeurs_temporelles(),sch_scalaires_->nb_valeurs_temporelles());
50 int n=sch_ns_->nb_valeurs_futures();
51 assert (n==sch_scalaires_->nb_valeurs_futures());
62 double t=sch_ns_->temps_futur(i);
63 assert(t==sch_scalaires_->temps_futur(i));
74 double t=sch_ns_->temps_defaut();
75 assert(t==sch_scalaires_->temps_defaut());
146 sch_ns_->mettre_a_jour();
147 sch_scalaires_->mettre_a_jour();
152 param.
ajouter(
"nb_ss_pas_dt",&nb_ss_pas_dt_);
153 param.
ajouter(
"Schema_Temps_NS",&sch_ns_);
154 param.
ajouter(
"Schema_Temps_scalaires",&sch_scalaires_);
170 sch_ns_->faire_un_pas_de_temps_eqn_base(eqn);
177 sch_scalaires_->faire_un_pas_de_temps_eqn_base(eqn);
188 for(
int i=nb_eqn-1; i>-1; i--)
193 Cout<<
"====================================================" << finl;
194 Cout<< eqn_i.
que_suis_je()<<
" equation is not solved."<<finl;
195 Cout<<
"====================================================" << finl;
220 bool ok=sch_ns_->corriger_dt_calcule(dt);
221 ok = ok && sch_scalaires_->corriger_dt_calcule(dt);
233 sch_ns_->changer_temps_courant(t);
234 sch_scalaires_->changer_temps_courant(t);
251 int ls2 = sch_ns_->stop();
252 int ls3 = sch_scalaires_->stop();
263 sch_ns_->imprimer(os);
264 sch_scalaires_->imprimer(os);
DoubleTab & valeurs() override
Returns the array of field values at the current time.
virtual void mettre_a_jour(double temps)
Performs a time update of all boundary conditions.
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....
virtual int equation_non_resolue() const
virtual const Champ_Inc_base & inconnue() const =0
virtual DoubleTab & derivee_en_temps_inco(DoubleTab &)
Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources...
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
Time scheme that splits the time step between a Navier-Stokes sub-scheme and a scalar sub-scheme.
int faire_un_pas_de_temps_eqn_base(Equation_base &) override
Performs one explicit Euler time step on the given equation.
void completer() override
void imprimer(Sortie &) const override
Call to the underlying object. Prints the time scheme to an output stream (if applicable).
int nb_valeurs_futures() const override
Returns the number of future time values.
int mettre_a_jour() override
Updates the current time (t+=dt) and the number of time steps performed (nb_pas_dt_++).
int stop() const override
Call to the underlying object. Returns 1 if the calculation should be stopped for various reasons:
int nb_valeurs_temporelles() const override
Returns the number of time values to keep.
void set_param(Param &titi) const override
bool iterateTimeStep(bool &converged) override
Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time sche...
double temps_defaut() const override
Returns the time that fields should return when calling valeurs().
bool corriger_dt_calcule(double &) const override
Corrects the time step so that dt_min <= dt <= dt_max.
double temps_futur(int i) const override
Returns the time at the i-th future value.
void changer_temps_courant(const double) override
Call to the underlying object. Changes the current time.
Navier_Stokes_std This class carries the terms of the momentum equation.
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
class Probleme_base It is a Probleme_U that is not a coupling.
virtual int nombre_d_equations() const =0
virtual const Equation_base & equation(int) const =0
int diffusion_implicite() const
Returns 1 if the time scheme has been read with diffusion_implicite.
bool & set_indice_nb_pas_dt_max_atteint()
int & set_stationnaire_atteint()
virtual bool isStationary() const
Returns 1 if during the last time step, the problem has not evolved.
double temps_courant() const
Returns the current time.
double & set_temps_courant()
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.
virtual void set_param(Param &titi) const override
double dt_
Computation time step.
double pas_temps_max() const
Returns the maximum time step.
double temps_max() const
Returns a reference to the maximum time.
virtual void changer_temps_courant(const double)
Changes the current time.
int indice_tps_final_atteint() const
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()
double pas_temps_min() const
Returns the minimum time step.
int & set_diffusion_implicite()
double & set_temps_init()
double pas_de_temps() const
Returns the current time step (delta_t).
double seuil_diffusion_implicite() const
virtual void imprimer(Sortie &os) const
Prints the time step to an output stream if appropriate.
double seuil_statio() const
Returns a reference to the stationarity threshold.
int & set_nb_pas_dt_max()
int niter_max_diffusion_implicite() const
int nb_pas_dt() const
Returns the number of time steps performed.
double mode_dt_start() const
double temps_init() const
Returns the initial time.
double & set_seuil_statio()
virtual int mettre_a_jour()
Updates the current time (t+=dt) and the number of time steps performed (nb_pas_dt_++).
double & set_seuil_diffusion_implicite()
int indice_nb_pas_dt_max_atteint() const
bool & set_indice_tps_final_atteint()
int nb_pas_dt_max() const
Returns a reference to the maximum number of time steps.
double facteur_securite_pas() const
Returns the safety factor or multiplier of delta_t.
double & set_mode_dt_start()
Base class for output streams.