16#include <Source_Reaction_Particules_VEF.h>
18#include <Transport_Marqueur_FT.h>
20#include <Domaine_VF.h>
21#include <Champ_implementation_P1.h>
23#include <Dirichlet_homogene.h>
24#include <Milieu_base.h>
26#include <Echange_EV_Options.h>
27#include <MD_Vector_tools.h>
28#include <Probleme_base.h>
50 const DoubleTab& source_action = eq_marqueur_->source_stockage();
54 const Domaine& domaine_geom = zdis.
domaine();
56 const IntTab& sommet_poly = domaine_geom.
les_elems();
59 const DoubleTab& positions = maillage.
sommets();
66 int nb_som_face = domaine_geom.type_elem()->nb_som_face();
73 const int nb_elem_reels = domaine_geom.
nb_elem();
77 DoubleTab source_som(0, dim);
86 const DoubleTab& rho_faces = champ_rho.
valeurs();
91 for (
int pos=0; pos<nb_pos; pos++)
93 x_pos = positions(pos,0);
94 y_pos = positions(pos,1);
96 z_pos = positions(pos,2);
101 if (elem < nb_elem_reels)
103 for (
int som=0; som<nb_som_elem; som++)
105 som_glob = sommet_poly(elem,som);
107 coord_b = coord_barycentrique_P1_triangle(sommet_poly,coord,x_pos,y_pos,elem,som) ;
109 coord_b = coord_barycentrique_P1_tetraedre(sommet_poly,coord,x_pos,y_pos,z_pos,elem,som) ;
111 for (
int k=0; k<dim; k++)
112 source_som(som_glob,k) -= source_action(pos,k)*coord_b;
125 for (num_cl=0 ; num_cl<zdis.
nb_front_Cl() ; num_cl++)
130 int nfin = ndeb + le_bord.
nb_faces();
134 for (
int face=ndeb ; face<nfin ; face++)
138 rho = (is_FT==1?rho_faces(face):rho_faces(0,0));
139 for (
int nbsf=0; nbsf<nb_som_face; nbsf++)
141 som_glob = face_som(face,nbsf);
142 for (
int k=0; k<dim; k++)
143 resu(face,k) += (1./nb_som_face)*source_som(som_glob,k)/rho;
149 for (
int face=premiere_face_interne; face<nb_faces; face++)
153 rho = (is_FT==1?rho_faces(face):rho_faces(0,0));
155 for (
int nbsf=0; nbsf<nb_som_face; nbsf++)
157 som_glob = face_som(face,nbsf);
158 for (
int k=0; k<dim; k++)
159 resu(face,k) += (1./nb_som_face)*source_som(som_glob,k)/rho;
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
Classe Dirichlet_homogene This class is the base class of the hierarchy of homogeneous Dirichlet-type...
Dirichlet This class is the base class of the hierarchy of Dirichlet-type boundary conditions.
int nb_som_elem() const
Returns the number of vertices of the geometric elements that make up the domain.
const DoubleTab_t & coord_sommets() const
virtual void creer_tableau_sommets(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Creates an array with one "row" per mesh vertex.
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.
int nb_faces() const
Returns the total number of faces.
int face_sommets(int i, int j) const
Returns the index of the i-th vertex of face num_face.
int premiere_face_int() const
A face is internal if and only if it separates two elements.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
const Domaine & domaine() const
Class defining operators and methods for all reading operation in an input flow (file,...
virtual const Milieu_base & milieu() const =0
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
int num_premiere_face() const
: class Maillage_FT_Disc Cette classe decrit un maillage:
const DoubleTab & sommets() const
renvoie le tableau des sommets (reels et virtuels) dimension(0) = nombre de sommets,
const ArrOfInt & sommet_elem() const
pour postraitement, renvoie sommet_elem_
virtual const Champ_base & masse_volumique() const
Returns the mass density of the medium (const version).
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
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.
bool is_dilatable() const
Base class for output streams.
Classe Source_Reaction_Particules_VEF.
DoubleTab & ajouter(DoubleTab &) const override
Classe Source_Reaction_Particules Calcul du terme source a ajouter dans Navier_Stokes pour prendre en...
_SIZE_ dimension(int d) const