16#include <Schema_Euler_Semi_Implicite.h>
25 s <<
"----------> Coefficient theta for semi-implicit scheme = " <<
theta_ << finl;
33 Cout <<
"Semi-implicit Euler time scheme (theta interpolation) is chosen."<< finl;
34 Cout <<
"----------> Coefficient theta for semi-implicit scheme = " <<
theta_ << finl;
50 return abs(
theta_) < 1.e-16;
55 Cerr <<
"[Schema_Euler_Semi_Implicite] Coupled problems are not taken into account yet." << finl;
65 int compteur = 0, ok = 1;
66 bool convergence_eqn =
false;
78 while ((!convergence_eqn)&&(compteur<
nb_ite_max))
81 Cout<<
"==================================================================================" << finl;
82 Cout<<
"Schema_Euler_Semi_Implicite: Implicit iteration " << compteur <<
" on the "<<eqn.
que_suis_je() <<
" equation of the problem "<< eqn.
probleme().
le_nom()<<
" :" <<finl;
83 Cout<<
"==================================================================================" << finl;
84 const DoubleTab& inut=futur;
86 convergence_eqn=le_solveur->iterer_eqn(eqn, inut, present,
theta_*
dt_, compteur, ok);
92 DoubleTrav passe_with_theta(passe);
93 passe_with_theta = passe;
94 passe_with_theta *= (1 -
theta_);
95 present -= passe_with_theta;
102 Cout<<
"==================================================================================" << finl;
103 Cout<<
"Schema_Euler_Semi_Implicite: Explicit case on the "<<eqn.
que_suis_je() <<
" equation of the problem "<< eqn.
probleme().
le_nom()<<
" :" <<finl;
104 Cout<<
"==================================================================================" << finl;
106 DoubleTrav dudt(futur);
DoubleTab & futur(int i=1) override
Returns field values at instant t+i.
DoubleTab & passe(int i=1) override
Returns field values at instant t-i.
DoubleTab & valeurs() override
Returns the array of field values at the current time.
Champ_Inc_base & avancer(int i=1)
Advances the current pointer by i time steps, in the list of kept temporal values.
Champ_Inc_base & reculer(int i=1)
Rewinds the current pointer by i time steps, in the list of kept temporal values.
virtual void imposer_cond_lim(Champ_Inc_base &, double)=0
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 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.
Probleme_base & probleme()
Returns the problem associated with the 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.
Probleme_Couple This is the historical coupling class of TRUST.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
void set_param(Param &) const override
class Schema_Euler_Semi_Implicite Il herite de schema Euler implicite et porte un solveur,...
void set_param(Param &) const override
int faire_un_pas_de_temps_eqn_base(Equation_base &) override
int faire_un_pas_de_temps_pb_couple(Probleme_Couple &, int &ok) override
bool is_explicit()
Renvoie TRUE si le schéma semi-implicite est totalement explicite (important, car theta = 0 pose prob...
double temps_courant() const
Returns the current time.
double dt_
Computation time step.
double pas_de_temps() const
Returns the current time step (delta_t).
void update_critere_statio(const DoubleTab &tab_critere, Equation_base &equation)
Updates stationnaire_atteint_ and residu_ (criterion: residu_ < seuil_statio_).
Base class for output streams.