16#include <Echange_impose_base.h>
17#include <Domaine_Cl_dis_base.h>
18#include <Equation_base.h>
19#include <Probleme_base.h>
20#include <Milieu_base.h>
28 if (
app_domains.size() == 0)
app_domains = { Motcle(
"Thermique"), Motcle(
"Neutronique"), Motcle(
"fraction_massique"), Motcle(
"indetermine"), Motcle(
"concentration") };
29 if (
supp_discs.size() == 0)
supp_discs = { Nom(
"VDF"), Nom(
"VEFPreP1B"), Nom(
"PolyMAC_CDO"), Nom(
"PolyMAC_HFV"), Nom(
"PolyMAC_MPFA") };
32 Motcles les_motcles(2);
34 les_motcles[0] =
"h_imp";
35 les_motcles[1] =
"T_ext";
42 int rang = les_motcles.search(motlu);
58 Cerr <<
"Error while reading BC of type Echange_impose " << finl;
59 Cerr <<
"we expected a keyword among: " << les_motcles <<
" instead of " << motlu << finl;
78 if (
T_ext().valeurs().size() == 1)
84 Cerr <<
"Echange_impose_base::T_ext error" << finl;
115 if (h_imp_->valeurs().size() == 1)
116 return h_imp_->valeurs()(0, 0);
117 else if (h_imp_->valeurs().dimension(1) == 1)
118 return h_imp_->valeurs()(i, 0);
120 Cerr <<
"Echange_impose_base::h_imp error" << finl;
137 if (h_imp_->valeurs().dimension(0) == 1)
138 return h_imp_->valeurs()(0, j);
140 return h_imp_->valeurs()(i, j);
158 Cerr <<
"Echange_impose_base::emissivite error" << finl;
192 h_imp_->mettre_a_jour(temps);
200 h_imp_->initialiser(temps,
domaine_Cl_dis().equation().inconnue()), h_imp_->mettre_a_jour(temps);
210 h_imp_->set_temps_defaut(temps);
218 h_imp_->fixer_nb_valeurs_temporelles(nb_cases);
220 emissivite_->fixer_nb_valeurs_temporelles(nb_cases);
227 h_imp_->changer_temps_futur(temps, i);
235 h_imp_->avancer(temps);
244 h_imp_->reculer(temps);
252 h_imp_->associer_fr_dis_base(fr);
260 if (temps==DMAXFLOAT) temps = le_champ_front->get_temps_defaut();
263 int size = le_champ_front->valeurs().dimension(0) == 1 ? le_bord.
nb_faces_tot() : le_champ_front->valeurs().dimension_tot(0);
266 bool update = le_champ_front->instationnaire();
267 if (text_.dimension(0) != size)
269 text_.resize(size, le_champ_front->valeurs().dimension(1));
275 int nb_comp = text_.dimension(1);
276 for (
int face = 0; face < size; face++)
277 for (
int comp = 0; comp < nb_comp; comp++)
278 text_(face, comp) =
T_ext(face, comp);
286 if (temps==DMAXFLOAT) temps = le_champ_front->get_temps_defaut();
289 int size = le_champ_front->valeurs().dimension(0) == 1 ? le_bord.
nb_faces_tot() : le_champ_front->valeurs().dimension_tot(0);
292 bool update = le_champ_front->instationnaire();
293 if (himp_.dimension(0) != size)
295 himp_.resize(size, le_champ_front->valeurs().dimension(1));
301 int nb_comp = himp_.dimension(1);
302 for (
int face = 0; face < size; face++)
303 for (
int comp = 0; comp < nb_comp; comp++)
304 himp_(face, comp) =
h_imp(face, comp);
312 if (temps==DMAXFLOAT) temps = le_champ_front->get_temps_defaut();
315 int size = le_champ_front->valeurs().dimension(0) == 1 ? le_bord.
nb_faces_tot() : le_champ_front->valeurs().dimension_tot(0);
318 bool update = le_champ_front->instationnaire();
319 if (eps_.dimension(0) != size)
321 eps_.resize(size, le_champ_front->valeurs().dimension(1));
327 int nb_comp = eps_.dimension(1);
328 for (
int face = 0; face < size; face++)
329 for (
int comp = 0; comp < nb_comp; comp++)
virtual DoubleTab & valeurs() override
Returns the array of field values.
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
std::vector< Nom > supp_discs
virtual void changer_temps_futur(double temps, int i)
Changes the i-th future time of the BC.
virtual void mettre_a_jour(double temps)
Performs a time update of the boundary condition.
virtual void fixer_nb_valeurs_temporelles(int nb_cases)
Called by Conds_lim::completer. Calls cha_front_base::fixer_nb_valeurs_temporelles.
virtual void associer_fr_dis_base(const Frontiere_dis_base &)
Associates the boundary with the object.
virtual int avancer(double temps)
Rotates the wheel of the BC.
Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the domain of discretized boundary conditions to which the object belongs.
virtual int reculer(double temps)
Rotates the wheel of the BC.
std::vector< Motcle > app_domains
virtual int initialiser(double temps)
Initialization at the beginning of the calculation.
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
virtual void set_temps_defaut(double temps)
Changes the i-th future time of the BC.
Echange_impose_base: This boundary condition is used only for the energy equation.
int avancer(double temps) override
Rotates the wheel of the BC.
int initialiser(double temps) override
Initialization at the beginning of the calculation.
bool has_emissivite() const
void fixer_nb_valeurs_temporelles(int nb_cases) override
Called by Conds_lim::completer. Calls cha_front_base::fixer_nb_valeurs_temporelles.
void set_temps_defaut(double temps) override
Changes the i-th future time of the BC.
void associer_fr_dis_base(const Frontiere_dis_base &) override
Associates the boundary with the object.
virtual Champ_front_base & h_imp()
virtual Champ_front_base & T_ext()
Returns the T_ext field of temperature imposed at the boundary.
const DoubleTab & tab_h_imp(double temps=DMAXFLOAT) const
int reculer(double temps) override
Rotates the wheel of the BC.
Champ_front_base & emissivite()
const DoubleTab & tab_T_ext(double temps=DMAXFLOAT) const
void mettre_a_jour(double) override
Performs a time update of the boundary conditions.
const DoubleTab & tab_emissivite(double temps=DMAXFLOAT) const
void changer_temps_futur(double temps, int i) override
Changes the i-th future time of the BC.
Class defining operators and methods for all reading operation in an input flow (file,...
class Frontiere_dis_base Class representing a discretized boundary.
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.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.