16#include <Source_Generique_Face_PolyMAC_CDO.h>
17#include <Domaine_PolyMAC_MPFA.h>
18#include <Champ_Face_PolyMAC_CDO.h>
19#include <Domaine_Cl_PolyMAC_family.h>
21#include <Equation_base.h>
22#include <Milieu_base.h>
37inline double valeur(
const DoubleTab& valeurs_champ,
int elem1,
int elem2,
const int compo)
40 return valeurs_champ(0, compo);
45 if (valeurs_champ.
nb_dim() == 1)
46 return 0.5 * (valeurs_champ(elem1) + valeurs_champ(elem2));
48 return 0.5 * (valeurs_champ(elem1, compo) + valeurs_champ(elem2, compo));
66 const Champ_base& la_source = ch_source_->get_champ(espace_stockage);
70 const IntTab& f_e = domaine.face_voisins();
71 const DoubleTab& xv = domaine.xv(), &xp = domaine.xp();
73 for (
int n_bord = 0; n_bord < domaine.nb_front_Cl(); n_bord++)
81 int e = domaine.face_voisins(f, 0);
82 double fac = pf(f) * fs(f);
84 resu(f) += fac * la_source.
valeurs()(f) * (xv(f, r) - xp(e, r));
88 for (
int f = domaine.premiere_face_int(); f < domaine.nb_faces(); f++)
90 double fac = pf(f) * fs(f);
91 for (
int i = 0; i < 2; i++)
92 for (
int r = 0, e = f_e(f, i); r <
dimension; r++)
93 resu(f) += fac * la_source.
valeurs()(f) * (xv(f, r) - xp(e, r)) * (i ? -1 : 1);
101 const Champ_base& la_source = ch_source_->get_champ(espace_stockage);
105 for (
int f = 0, calc_cl = !sub_type(
Domaine_PolyMAC_MPFA, domaine); f < domaine.nb_faces(); f++)
106 if (calc_cl || fcl(f, 0) < 2)
107 resu(f) += pf(f) * vf(f) * la_source.
valeurs()(f);
virtual DoubleTab & valeurs()=0
class Champ_base This class is the base of the fields hierarchy.
class Cond_lim Generic class used to represent any class
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class defining operators and methods for all reading operation in an input flow (file,...
virtual const Milieu_base & milieu() const =0
int num_premiere_face() const
DoubleVect & porosite_face()
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
Classe Neumann_homogene This class is the base class of the hierarchy of homogeneous Neumann-type bou...
Classe Neumann This class is the base class of the hierarchy of Neumann-type boundary conditions.
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.
Base class for output streams.
DoubleTab & ajouter(DoubleTab &) const override
Nom localisation_source() override
void associer_domaines(const Domaine_dis_base &, const Domaine_Cl_dis_base &) override
DoubleTab & ajouter(DoubleTab &) const override
Source_Generique_base This class is the base of the source term hierarchy carrying.
OWN_PTR(Champ_Generique_base) ch_source_
_SIZE_ dimension(int d) const