16#include <Champ_front_debit_QC_fonc_t.h>
17#include <Probleme_base.h>
18#include <Equation_base.h>
19#include <Fluide_Quasi_Compressible.h>
21#include <Domaine_VDF.h>
22#include <Interprete.h>
46 os << tab.
size() <<
" ";
47 for(
int i=0; i<tab.
size(); i++)
65 Cerr<<
"Champ_front_debit_QC_VDF_fonc_t usage : dim { val1 .. valdim } [ moyen ] nom_pb"<<finl;
73 if (motlu != les_mots[0])
75 Cerr <<
"Error reading a Champ_front_debit_QC_VDF_fonc_t" << finl;
76 Cerr <<
"Expected { instead of " << motlu << finl;
80 f_debit_t.dimensionner(dim);
82 for (
int i = 0; i<dim; i++)
86 Cerr <<
"Reading and interpretation of the function " << tmp << finl;
87 f_debit_t[i].setNbVar(1);
88 f_debit_t[i].setString(tmp);
89 f_debit_t[i].addVar(
"t");
90 f_debit_t[i].parseString();
91 Cerr <<
"Interpretation of function " << tmp <<
" Ok" << finl;
94 if (motlu != les_mots[1])
96 Cerr <<
"Error reading a Champ_front_debit_QC_VDF_fonc_t" << finl;
97 Cerr <<
"Expected } instead of " << finl;
110 const Probleme_base& pb=ref_cast(Probleme_base,ob1);
111 fluide=ref_cast(Fluide_Quasi_Compressible,pb.
equation(0).
milieu());
134 const Frontiere& front=la_frontiere_dis->frontiere();
143 int nfin = ndeb + nb_faces;
144 const DoubleTab& tab_rhonp1P0 =fluide->loi_etat()->rho_np1();
147 for (
int num_face=ndeb; num_face<nfin; num_face++)
149 int n0 = face_voisins(num_face, 0);
152 n0 = face_voisins(num_face, 1);
153 for (
int ori=0; ori<dim; ori++)
155 f_debit_t[ori].setVar(
"t",tps);
156 Debit(num_face-ndeb,ori)=f_debit_t[ori].eval();
157 tab(num_face-ndeb,ori)=Debit(num_face-ndeb,ori)/tab_rhonp1P0(n0);
163 double rho_moy=0,S=0,s;
165 for ( num_face=ndeb; num_face<nfin; num_face++)
167 int n0 = face_voisins(num_face, 0);
170 n0 = face_voisins(num_face, 1);
173 rho_moy+=s*tab_rhonp1P0(n0);
176 rho_moy =
mp_sum(rho_moy);
178 for ( num_face=ndeb; num_face<nfin; num_face++)
179 for (
int ori=0; ori<dim; ori++)
181 f_debit_t[ori].setVar(
"t",tps);
182 Debit(num_face-ndeb,ori)=f_debit_t[ori].eval();
183 tab(num_face-ndeb,ori)=Debit(num_face-ndeb,ori)/rho_moy;
192 f_debit_tk.
setVar(
"t",tps);
193 return f_debit_tk.
eval();
class Ch_front_var_instationnaire_indep This abstract class represents a field on a boundary,
class Champ_front_base Base class for the hierarchy of boundary fields.
virtual const Domaine_dis_base & domaine_dis() const
virtual DoubleTab & valeurs() override
Returns the array of field values.
class Champ_front_debit_QC_fonc_t
virtual double valeur_au_temps(double temps, int som, int comp) const
Champ_front_base & affecter_(const Champ_front_base &ch) override
Not implemented!!
void mettre_a_jour(double temps) override
Updates the time and re-draws random noise values.
DoubleTab & valeurs_au_temps(double temps) override
Returns the values at the desired time.
virtual const DoubleVect & face_surfaces() const
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
Class defining operators and methods for all reading operation in an input flow (file,...
virtual const Milieu_base & milieu() const =0
virtual void fixer_nb_comp(int i)
Sets the number of components of the field.
virtual int nb_comp() const
int num_premiere_face() const
int_t nb_faces() const
Returns the number of faces of the boundary.
static Objet_U & objet(const Nom &)
See Interprete_bloc::objet_global(). BM: the Interprete class is not the best place for this.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
class Parser_U Version of the Parser class, deriving from Objet_U.
void setVar(const char *sv, double val)
virtual const Equation_base & equation(int) const =0
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.