16#include <Champ_front_debit_QC.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 usage : dim { val1 .. valdim } [ moyen ] nom_pb"<<finl;
73 if (motlu != les_mots[0])
75 Cerr <<
"Error reading a Champ_front_debit_QC" << finl;
76 Cerr <<
"Expected { instead of " << motlu << finl;
81 for(
int i=0; i<dim; i++)
84 if (motlu != les_mots[1])
86 Cerr <<
"Error reading a Champ_front_debit_QC" << finl;
87 Cerr <<
"Expected } instead of " << finl;
100 const Probleme_base& pb=ref_cast(Probleme_base,ob1);
101 fluide=ref_cast(Fluide_Quasi_Compressible,pb.
equation(0).
milieu());
124 const Frontiere& front=la_frontiere_dis->frontiere();
132 int nfin = ndeb + nb_faces;
133 const DoubleTab& tab_rhonp1P0 =fluide->loi_etat()->rho_np1();
136 for (
int num_face=ndeb; num_face<nfin; num_face++)
138 int n0 = face_voisins(num_face, 0);
141 n0 = face_voisins(num_face, 1);
142 for (
int ori=0; ori<dim; ori++)
143 tab(num_face-ndeb,ori)=
Debit(ori)/tab_rhonp1P0(n0);
148 double rho_moy=0,S=0,s;
150 for ( num_face=ndeb; num_face<nfin; num_face++)
152 int n0 = face_voisins(num_face, 0);
155 n0 = face_voisins(num_face, 1);
158 rho_moy+=s*tab_rhonp1P0(n0);
163 for ( num_face=ndeb; num_face<nfin; num_face++)
164 for (
int ori=0; ori<dim; ori++)
165 tab(num_face-ndeb,ori)=
Debit(ori)/rho_moy;
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
void mettre_a_jour(double temps) override
Updates the time and re-draws random noise values.
Champ_front_base & affecter_(const Champ_front_base &ch) override
Not implemented!!
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.
virtual const Equation_base & equation(int) const =0
static void mp_sum_for_each(T &arg1, T &arg2)
C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: ...
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.