16#include <Source_injection_masse_base.h>
17#include <Pb_Multiphase.h>
18#include <Discret_Thyd.h>
30 Cerr <<
"Lecture du Champ de masse injectee" << finl;
32 OWN_PTR(Champ_Don_base) flux_masse_lu_;
36 flux_masse_lu_.typer(type);
37 Champ_Don_base& ch_flux_masse_lu_ = ref_cast(Champ_Don_base,flux_masse_lu_.valeur());
38 is >> ch_flux_masse_lu_;
39 const int nb_comp = ch_flux_masse_lu_.
nb_comp();
42 flux_masse_lu_->fixer_nb_comp(nb_comp);
43 if (ch_flux_masse_lu_.
le_nom()==
"anonyme")
44 ch_flux_masse_lu_.
nommer(
"Flux_masse_injectee");
46 for (
int n = 0; n < nb_comp; n++)
47 flux_masse_lu_->fixer_nom_compo(n, ch_flux_masse_lu_.
le_nom() + (nb_comp > 1 ? Nom(n) :
""));
48 for (
int n = 0; n < nb_comp; n++)
49 flux_masse_->fixer_nom_compo(n, ch_flux_masse_lu_.
le_nom() + (nb_comp > 1 ? Nom(n) :
""));
53 flux_masse_->valeurs() = 0;
54 flux_masse_->affecter(flux_masse_lu_);
56 const Pb_Multiphase& pb = ref_cast(Pb_Multiphase,
equation().probleme());
58 if (N != flux_masse_->valeurs().line_size())
Process::exit(
que_suis_je() +
" : you must input as many fluxes as there are phases !!");
65 flux_masse_->mettre_a_jour(temps);
73 &tab_inj = flux_masse_->valeurs();
78 for (e = 0; e < domaine.nb_elem(); e++)
79 for (k = 0; k < N; k++)
80 secmem(e, k) += pe[e] * ve[e] * tab_inj(!cI*e, k) * rho(!cR, k);
virtual DoubleTab & passe(int i=1)
void nommer_completer_champ_physique(const Domaine_dis_base &domaine_vdf, const Nom &nom_champ, const Nom &unite, Champ_base &champ, const Probleme_base &pbi) const
void discretiser_champ(const Motcle &directive, const Domaine_dis_base &z, const Nom &nom, const Nom &unite, int nb_comp, int nb_pas_dt, double temps, OWN_PTR(Champ_Inc_base)&champ, const Nom &sous_type=NOM_VIDE) const
Class defining operators and methods for all reading operation in an input flow (file,...
virtual const Milieu_base & milieu() const =0
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
const Nom & le_nom() const override
Returns the name of the field.
void nommer(const Nom &) override
Gives a name to the field.
virtual int nb_comp() const
DoubleVect & porosite_elem()
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_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.
Multiphase thermohydraulics problem of type "3*N equations":
const Champ_base & get_champ(const Motcle &nom) const override
const Discretisation_base & discretisation() const
Returns the discretization associated with the problem.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
OWN_PTR(Champ_Don_base) flux_masse_
void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) const override
void mettre_a_jour(double temps) override
DOES NOTHING - to override in derived classes.
_SIZE_ dimension(int d) const