16#include <EcritureLectureSpecial.h>
17#include <Momentum_Euler.h>
18#include <Density_Euler.h>
19#include <Discret_Thyd.h>
20#include <Domaine_VF.h>
37 terme_convectif.set_description(
"Mass flow rate=Integral(-rho*u*ndS) [kg/s] if SI units used");
50 Cerr <<
"Density_Euler discretization" << finl;
59 l_inco_ch_->fixer_nature_du_champ(N == 1 ? scalaire : multi_scalaire);
61 for (
int i = 0; i < N; i++)
62 l_inco_ch_->fixer_nom_compo(i,
Nom(
"alpha_rho_") + pb.
nom_phase(i));
67 densite_->fixer_nature_du_champ(N == 1 ? scalaire : multi_scalaire);
69 for (
int i = 0; i < N; i++)
70 densite_->fixer_nom_compo(i,
Nom(
"densite_") + pb.
nom_phase(i));
75 Cerr <<
"Density_Euler discretization ==> ok" << finl;
81 Cerr <<
"Reading of initial conditions\n";
88 Cerr <<
"We expected a { while reading " <<
que_suis_je() << finl;
89 Cerr <<
"and not : " << nom << finl;
101 const int nb_comp = ch_init->nb_comp();
109 Cerr <<
"We expected a } while reading " <<
que_suis_je() << finl;
110 Cerr <<
"and not : " << nom << finl;
118 const DoubleTab& alpha = ref_cast(
Pb_Euler,
probleme()).equation_fraction().inconnue().valeurs();
122 tab_multiply_any_shape(alpha_rho, alpha);
128 const DoubleTab& alpha = ref_cast(
Pb_Euler,
probleme()).equation_fraction().inconnue().valeurs();
132 tab_divide_any_shape(rho, alpha);
139 Cerr <<
que_suis_je() <<
" : wrong operator number " << i << finl;
149 Cerr <<
que_suis_je() <<
" : wrong operator number " << i << finl;
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Returns the array of field values at the current time.
Champ_base & affecter(const Champ_base &)
Assign a field to another.
const Champ_Inc_base & inconnue() const override
Operateur_Conv terme_convectif
const Operateur & operateur(int) const override
const Champ_Inc_base & densite() const
void discretiser() override
Discretizes the equation.
OWN_PTR(Champ_Inc_base) densite_
void mettre_a_jour_champs_conserves(double temps, int reset) override
Entree & lire_cond_init(Entree &is) override
Reading of initial conditions in an input stream.
void set_param(Param ¶m) const override
class Discret_Thyd This class is the base class representing a discretization
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 void set_param(Param &titi) const override
const Nom & le_nom() const override
Returns the name of the equation.
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
virtual void mettre_a_jour_champs_conserves(double temps, int reset=0)
Probleme_base & probleme()
Returns the problem associated with the equation.
virtual void verifie_ch_init_nb_comp(const Champ_Inc_base &ch_ref, const int nb_comp) const
Verification of the number of components read for the specification of a field.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual void discretiser()
Discretizes the equation.
Champs_compris champs_compris_
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
const Nom & le_nom() const override
Returns the name of the field.
A character string (Nom) in uppercase.
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.
class Operateur Generic class of the operator hierarchy.
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.
const Nom & nom_phase(int i) const
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
double temps_courant() const
Returns the current time.
virtual int nb_valeurs_temporelles() const =0
Base class for output streams.