16#include <Source_Con_Phase_field_base.h>
17#include <Navier_Stokes_phase_field.h>
18#include <Milieu_Phase_field.h>
19#include <Schema_Phase_field.h>
20#include <Equation_base.h>
21#include <Probleme_base.h>
41 return std::max(sch_CH_->nb_valeurs_temporelles(),
sch_NS_->nb_valeurs_temporelles());
51 int n = sch_CH_->nb_valeurs_futures();
52 assert(n ==
sch_NS_->nb_valeurs_futures());
63 double t = sch_CH_->temps_futur(i);
75 double t = sch_CH_->temps_defaut();
88 sch_CH_->initialize();
95 sch_CH_->initTimeStep(dt);
106 sch_CH_->mettre_a_jour();
118 sch_CH_->changer_temps_courant(t);
119 sch_NS_->changer_temps_courant(t);
136 int ls2 = sch_CH_->stop();
148 sch_CH_->imprimer(os);
161 bool ok = sch_CH_->corriger_dt_calcule(dt);
162 ok = ok &&
sch_NS_->corriger_dt_calcule(dt);
225 Cerr <<
"mot=" << mot << finl;
226 if (mot ==
"schema_CH")
229 Cerr <<
"Lecture du schema utilise dans l'equation Phase_field" << finl;
231 sch_CH_.typer(type_sch);
232 is >> sch_CH_.valeur();
234 else if (mot ==
"schema_NS")
237 Cerr <<
"Lecture du schema utilise dans l'equation Navier-Stokes" << finl;
264 if (eqn.
que_suis_je() ==
"Convection_Diffusion_Phase_field")
275 sch_NS_->faire_un_pas_de_temps_eqn_base(eqn);
295 for (
int i = nb_eqn - 1; i > -1; i--)
300 Cout <<
"====================================================" << finl;
301 Cout << eqn_i.
que_suis_je() <<
" equation is not solved." << finl;
302 Cout <<
"====================================================" << finl;
357 DoubleTab intermediaire(present);
358 intermediaire = present;
365 sch_CH_->faire_un_pas_de_temps_eqn_base(eq_c);
367 present = intermediaire;
376 sch_CH_->associer_pb(un_probleme);
377 sch_NS_->associer_pb(un_probleme);
DoubleTab & valeurs() override
Returns the array of field values at the current time.
const Champ_Inc_base & inconnue() const override
Returns the unknown field of the equation: the concentration.
classe Convection_Diffusion_Phase_field Cas particulier de Convection_Diffusion_Concentration
const DoubleTab & get_c_demi() const
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
Sources & sources()
Returns the source terms associated with the equation.
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.
void calculer_rho(const bool init=false)
Calcule rho_n+1 pour utilisation dans la pression.
A character string (Nom) in uppercase.
classe Navier_Stokes_phase_field Cette classe porte les termes de l'equation de la dynamique
const Milieu_base & milieu() const override
Returns the physical medium of the equation (Fluide_base upcast to Milieu_base).
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
classe Schema_Phase_field
bool iterateTimeStep(bool &converged) override
faire_un_pas_de_temps_pb_base avec NS = equation(0) et CH = equation(1) Sert a calculer l'equation de...
virtual int faire_un_pas_de_temps_C_D_Phase_field(Convection_Diffusion_Phase_field &)
Effectue un pas de temps sur l'equation de type Convection_Diffusion_Phase_field.
void changer_temps_courant(const double) override
Appel a l'objet sous-jacent Change le temps courant.
int mettre_a_jour() override
Mise a jour du temps courant (t+=dt) et du nombre de pas de temps effectue (nb_pas_dt_++).
void completer() override
Complete les attributs de sch2.
int faire_un_pas_de_temps_eqn_base(Equation_base &) override
Effectue un pas de temps sur l'equation passee en parametre.
int stop() const override
Appel a l'objet sous-jacent Renvoie 1 si il y lieu de stopper le calcul pour differente raisons:
bool initTimeStep(double dt) override
int nb_valeurs_temporelles() const override
Renvoie le nombre de valeurs temporelles a conserver.
bool corriger_dt_calcule(double &) const override
Corrige le pas de temps dt_min <= dt <= dt_max.
void set_param(Param &titi) const override
virtual int premier_dt(Convection_Diffusion_Phase_field &eq_c)
Effectue le premier demi-pas de temps1 sur l'equation de type Convection_Diffusion_Phase_field.
virtual int deuxieme_dt(Convection_Diffusion_Phase_field &eq_c)
Effectue le deuxieme demi-pas de temps sur l'equation de type Convection_Diffusion_Phase_field.
void associer_pb(const Probleme_base &) override
void imprimer(Sortie &) const override
Appel a l'objet sous-jacent Imprime le schema en temp sur un flot de sortie (si il y a lieu).
void initialize() override
double temps_defaut() const override
Renvoie le le temps le temps que doivent rendre les champs a l'appel de valeurs().
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture du nombre d'iterations pour l'etape de relaxation du Schema_Phase_field.
double temps_futur(int i) const override
Renvoie le le temps a la i-eme valeur future.
int nb_valeurs_futures() const override
Renvoie le nombre de valeurs temporelles futures.
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.
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:
int & set_niter_max_diffusion_implicite()
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.
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.
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 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.
class Source_Con_Phase_field_base
virtual void premier_demi_dt()=0
class Sources Sources represents a list of Source objects.