16#include <Schema_Cahn_Hilliard.h>
17#include <Probleme_base.h>
57 int compteur = 0, ok = 1;
85 Cout<<
"==========================================================================================" << finl;
86 Cout<<
"Schema_Cahn_Hilliard: Implicit solver on the "<<eq_ch.
que_suis_je() <<
" equation of the problem "<< eq_ch.
probleme().
le_nom()<<
" :" <<finl;
87 Cout<<
"==========================================================================================" << finl;
92 le_solveur->iterer_eqn(eq_ch, passe, present,
theta_*
dt_, compteur, ok);
98 Cerr <<
"[faire_un_pas_de_temps_eqn_base] Total fail: returns 0." << finl;
103 for (
int elem = 0; elem < eq_ch.
domaine_dis().nb_elem_tot(); elem++)
104 for (
int p = 0; p < eq_ch.
fermeture().nb_parametres_d_ordre(); p++)
107 present(elem,p) = present(elem,p) - (1 -
theta_) * passe(elem,p);
108 present(elem,p) /=
theta_;
127 Cout<<
"==================================================================================" << finl;
128 Cout<<
"Schema_Cahn_Hilliard: Explicit case on the "<<eq_ch.
que_suis_je() <<
" equation of the problem "<< eq_ch.
probleme().
le_nom()<<
" :" <<finl;
129 Cout<<
"==================================================================================" << finl;
131 DoubleTrav dudt(futur);
void calculer_contribution_CL_concentration(const DoubleTab &)
Renvoie la contribution des conditions limites sur la concentration sous forme d'un vecteur (multi-co...
bool matrices_initialisees()
const Fermeture_Thermo_base & fermeture() const
void compute_mutilde()
Calcul de mutilde = beta*dW/dc - ∇. kappa ∇c.
void initialiser_matrices()
void calculer_contribution_CL_mutilde(const DoubleTab &)
Renvoie la contribution des conditions limites sur le potentiel chimique sous forme d'un vecteur (mul...
const Champ_Inc_base & mutilde() const
DoubleTab & derivee_en_temps_inco(DoubleTab &) override
Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources...
Domaine_Cl_dis_base & domaine_Cl_dis_mutilde()
void update_terme_mobilite(const DoubleTab &)
const Champ_Inc_base & inconnue() const override
Renvoie la concentration (champ inconnue de l'equation) (version const).
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 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.
Domaine_dis_base & domaine_dis()
Returns the discretized domain 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.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
class Probleme_base It is a Probleme_U that is not a coupling.
virtual const Equation_base & equation(int) const =0
class Schema_Cahn_Hilliard. Il herite de schema Euler semi implicite et ne s'applique qu'à Cahn-Hilli...
bool iterateTimeStep(bool &converged) override
Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time sche...
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.
class Schema_Euler_Semi_Implicite Il herite de schema Euler implicite et porte un solveur,...
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.
Probleme_base & pb_base()
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.