17#include <Schema_Cahn_Hilliard_Navier_Stokes.h>
40 if (mot ==
"Schema_convection")
44 schema_convection_.typer(type_sch);
45 is >> schema_convection_.valeur();
81 schema_convection_->associer_pb(un_probleme);
93 schema_convection_->initialize();
99 schema_convection_->initTimeStep(dt);
106 schema_convection_->changer_temps_courant(t);
115 for (
int i = nb_eqn - 1; i > -1; i--)
120 Cout <<
"====================================================" << finl;
121 Cout << eqn_i.
que_suis_je() <<
" equation is not solved." << finl;
122 Cout <<
"====================================================" << finl;
141 if (eqn.
que_suis_je() ==
"Cahn_Hilliard_Convection")
149 schema_convection_->faire_un_pas_de_temps_eqn_base(eqn);
157 bool ok = schema_convection_->corriger_dt_calcule(dt);
164 schema_convection_->mettre_a_jour();
175 schema_convection_->imprimer(os);
DoubleTab & valeurs() override
Returns the array of field values at the current time.
double temps() const
Returns the time of the field.
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 Milieu_base & milieu() const =0
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.
virtual void mettre_a_jour(double temps)
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
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_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
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
: class Schema_CH_NS_Partitionne
void initialize() override
void set_param(Param &) const override
void associer_pb(const Probleme_base &) override
int faire_un_pas_de_temps_eqn_base(Equation_base &) override
Effectue un pas de temps sur l'equation de Cahn-Hilliard, d'où le test sur le sub_type.
bool iterateTimeStep(bool &converged) override
Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time sche...
bool initTimeStep(double dt) override
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
Returns 1 if it is necessary to stop the computation for various reasons:
void changer_temps_courant(const double t) override
Changes the current time.
void completer() override
bool corriger_dt_calcule(double &dt) const override
Corrects the computed time step passed as parameter and verifies it is not "too" small (< dt_min_).
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void imprimer(Sortie &os) const override
Prints the time step to an output stream if appropriate.
class Schema_Cahn_Hilliard. Il herite de schema Euler semi implicite et ne s'applique qu'à Cahn-Hilli...
int faire_un_pas_de_temps_eqn_base(Equation_base &) override
Effectue un pas de temps sur l'equation de Cahn-Hilliard, d'où le test sur le sub_type.
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.
virtual void associer_pb(const Probleme_base &)
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:
Probleme_base & pb_base()
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
double pas_temps_min() const
Returns the minimum time step.
double & set_temps_init()
double pas_de_temps() const
Returns the current time step (delta_t).
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()
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_++).
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.
virtual void completer()=0
double & set_mode_dt_start()
Base class for output streams.