16#ifndef Pb_Cloned_Concentration_Gen_TPP_included
17#define Pb_Cloned_Concentration_Gen_TPP_included
19#include <Operateur_Diff.h>
22template <
typename _DERIVED_TYPE_,
typename _EQUATION_TYPE_,
typename _MEDIUM_TYPE_>
26 this->list_eq_concentration_.add(_EQUATION_TYPE_());
27 _EQUATION_TYPE_& eqn = this->list_eq_concentration_.dernier();
28 Cerr <<
"Adding the first " << eqn.que_suis_je() <<
" to the list ... " << finl;
29 eqn.associer_pb_base(*
this);
30 eqn.associer_sch_tps_base(_DERIVED_TYPE_::schema_temps());
31 eqn.associer_domaine_dis(_DERIVED_TYPE_::domaine_dis());
34 return _DERIVED_TYPE_::readOn(is);
37template <
typename _DERIVED_TYPE_,
typename _EQUATION_TYPE_,
typename _MEDIUM_TYPE_>
46 _DERIVED_TYPE_::discretiser_equations();
50 this->
equation(i).associer_milieu_equation();
53 this->
equation(0).milieu().discretiser((*
this), _DERIVED_TYPE_::discretisation());
55 const Nom nom_const = this->
nb_consts_ > 1 ?
"coefficient_diffusion0" :
"coefficient_diffusion";
56 ref_cast(_MEDIUM_TYPE_, this->list_eq_concentration_.dernier().milieu()).discretiser_multi_concentration(nom_const, (*
this), _DERIVED_TYPE_::discretisation());
59template <
typename _DERIVED_TYPE_,
typename _EQUATION_TYPE_,
typename _MEDIUM_TYPE_>
63 _DERIVED_TYPE_::lire_equations(is, dernier_mot);
68template <
typename _DERIVED_TYPE_,
typename _EQUATION_TYPE_,
typename _MEDIUM_TYPE_>
73 Cerr <<
"Cloning " << this->
nb_consts_ <<
" concentration equations in progress ..." << finl;
76 this->list_eq_concentration_.add(this->list_eq_concentration_.front());
77 _EQUATION_TYPE_& eqn = this->list_eq_concentration_.dernier();
78 Cerr <<
"Adding another "<< eqn.que_suis_je() <<
" to the list ... " << finl;
79 eqn.associer_pb_base(*
this);
80 eqn.associer_sch_tps_base(_DERIVED_TYPE_::schema_temps());
81 eqn.associer_domaine_dis(_DERIVED_TYPE_::domaine_dis());
84 eqn.associer_milieu_equation();
85 const Nom nom_const =
Nom(
"coefficient_diffusion") +
Nom(i);
86 ref_cast(_MEDIUM_TYPE_, eqn.milieu()).discretiser_multi_concentration(nom_const, (*
this), _DERIVED_TYPE_::discretisation());
91 for (
int op = 0; op < eqn.nombre_d_operateurs(); op++)
93 eqn.operateur(op).associer_eqn(eqn);
94 eqn.operateur(op).l_op_base().associer_eqn(eqn);
103 Nom nom_fich =
"Diffusion_";
104 nom_fich += eqn.inconnue().
le_nom();
109 const Champ_base& ch_vitesse_transportante = eqn.vitesse_pour_transport();
110 eqn.associer_vitesse(ch_vitesse_transportante);
114 eqn.solv_masse().associer_eqn(eqn);
119template <
typename _DERIVED_TYPE_,
typename _EQUATION_TYPE_,
typename _MEDIUM_TYPE_>
122 if (sub_type(_MEDIUM_TYPE_, mil))
123 this->list_eq_concentration_.dernier().associer_milieu_base(mil);
125 _DERIVED_TYPE_::associer_milieu_base(mil);
128template <
typename _DERIVED_TYPE_,
typename _EQUATION_TYPE_,
typename _MEDIUM_TYPE_>
131 _DERIVED_TYPE_::verifier();
133 const Domaine_Cl_dis_base& domaine_Cl_co = this->list_eq_concentration_.front().domaine_Cl_dis();
134 return tester_compatibilite_hydr_concentration(domaine_Cl_hydr, domaine_Cl_co);
class Champ_base This class is the base of the fields hierarchy.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
Class defining operators and methods for all reading operation in an input flow (file,...
Milieu_base This class is the base of the (physical) medium hierarchy.
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
const Nom & le_nom() const override
Returns *this.
Operateur_Conv Generic class of the hierarchy of operators representing a convection term.
void associer_vitesse(const Champ_base &)
Associates the velocity (as the transporting velocity) to the convection operator.
Operateur_Diff Generic class of the hierarchy of operators representing a diffusion.
void associer_diffusivite_pour_pas_de_temps(const Champ_base &)
void associer_diffusivite(const Champ_base &)
Associates the diffusivity to the operator.
void set_description(const Nom &nom)
void set_fichier(const Nom &nom)
void associer_milieu_base(const Milieu_base &) override
Entree & readOn(Entree &is) override
void typer_lire_milieu(Entree &) override
Entree & lire_equations(Entree &, Motcle &) override
int nombre_d_equations() const override
std::vector< Constituant > mil_constituants_
Entree & lire_resize_medium(Entree &is)
const Equation_base & equation(int i) const override
void create_constituants_echaines()
void rename_equation_unknown(const int i, Convection_Diffusion_Concentration &eqn)