17#include <Domaine_Cl_EF.h>
18#include <Probleme_base.h>
20#include <Schema_Temps_base.h>
21#include <Check_espace_virtuel.h>
22#include <EcrFicPartage.h>
63 const DoubleTab& Bij_thilde=domaine_ef.
Bij_thilde();
69 for (
int elem=0; elem<nb_elem; elem++)
71 for (
int s=0; s<nb_som_elem; s++)
73 int som=elems(elem,s);
74 const double w =
bidim_axi ? (xs(som, 0) / domaine_ef.
xp(elem, 0)) : 1.0;
76 div(elem) += w * Bij_thilde(elem, s, i) * vit(som, i);
81 declare_espace_virtuel_invalide(div);
92 for (
int face=0; face<premiere_face_int; face++)
94 for (
int s=0; s<nb_som_face; s++)
96 int som=face_sommets(face,s);
97 const double r_f = domaine_ef.
xv(face, 0);
98 const double corr = (
bidim_axi && r_f > 1e-12) ? (xs(som, 0) / r_f) : 1.0;
100 tab_flux_bords(face, 0) += corr * porosite_sommet(som) * vit(som, dir) * face_normales(face, dir) / nb_som_face;
118 const int impr_bord=(le_dom_EF->domaine().bords_a_imprimer().est_vide() ? 0:1);
128 DoubleVect flux_bord(nb_compo);
129 DoubleVect bilan(nb_compo);
131 for (
int num_cl=0; num_cl<le_dom_EF->nb_front_Cl(); num_cl++)
134 const Cond_lim& la_cl = la_zcl_EF->les_conditions_limites(num_cl);
137 int nfin = ndeb + frontiere_dis.
nb_faces();
138 for (
int face=ndeb; face<nfin; face++)
139 for(
int k=0; k<nb_compo; k++)
141 for(
int k=0; k<nb_compo; k++)
146 for(
int k=0; k<nb_compo; k++)
150 bilan(k)+=flux_bord(k);
157 for(
int k=0; k<nb_compo; k++)
164 for (
int num_cl=0; num_cl<le_dom_EF->nb_front_Cl(); num_cl++)
166 const Frontiere_dis_base& la_fr = la_zcl_EF->les_conditions_limites(num_cl)->frontiere_dis();
167 const Cond_lim& la_cl = la_zcl_EF->les_conditions_limites(num_cl);
170 int nfin = ndeb + frontiere_dis.
nb_faces();
171 if (le_dom_EF->domaine().bords_a_imprimer().contient(la_fr.
le_nom()))
173 Flux_face <<
"# Flux par face sur " << la_fr.
le_nom() <<
" au temps " << temps <<
" : " << finl;
174 for (
int face=ndeb; face<nfin; face++)
177 Flux_face <<
"# Face a x= " << le_dom_EF->xv(face,0) <<
" y= " << le_dom_EF->xv(face,1) <<
" flux=" ;
179 Flux_face <<
"# Face a x= " << le_dom_EF->xv(face,0) <<
" y= " << le_dom_EF->xv(face,1) <<
" z= " << le_dom_EF->xv(face,2) <<
" flux=" ;
180 for(
int k=0; k<nb_compo; k++)
194 const Domaine_EF& domaine_EF = le_dom_EF.valeur();
195 const DoubleVect& vol = domaine_EF.
volumes();
199 for(num_elem=0; num_elem<nb_elem; num_elem++)
200 div(num_elem)/=vol(num_elem);
class Cond_lim Generic class used to represent any class
int nb_som_elem() const
Returns the number of vertices of the geometric elements that make up the domain.
int_t nb_elem_tot() const
DoubleTab_t & les_sommets()
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
const DoubleVect & porosite_sommet() const
const DoubleTab & Bij_thilde() const
virtual double face_normales(int face, int comp) const
double xv(int num_face, int k) const
double volumes(int i) const
int face_sommets(int i, int j) const
Returns the index of the i-th vertex of face num_face.
int nb_som_face() const
Returns the number of vertices per face.
double xp(int num_elem, int k) const
int premiere_face_int() const
A face is internal if and only if it separates two elements.
int nb_faces_bord() const
Returns the number of faces on which boundary conditions are applied:
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
const Domaine & domaine() const
Sortie & syncfile() override
Triggers writing to disk of the data accumulated on the different processors since the last call to s...
Class defining operators and methods for all reading operation in an input flow (file,...
Probleme_base & probleme()
Returns the problem associated with the equation.
int num_premiere_face() const
class Frontiere_dis_base Class representing a discretized boundary.
const Nom & le_nom() const override
Returns the name of the geometric boundary.
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
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.
void volumique(DoubleTab &) const override
int impr(Sortie &os) const override
DOES NOTHING - to override in derived classes.
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &, const Champ_Inc_base &) override
Classe Operateur_Div_base This class is the base of the hierarchy of operators representing.
void ouvrir_fichier_partage(EcrFicPartage &, const Nom &, const int flag=1) const
Opening/creation of a shared file for printing an operator. To override in derived classes.
void ouvrir_fichier(SFichier &os, const Nom &, const int flag=1) const
Opening/creation of a file for printing an operator. To override in derived classes.
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
double temps_courant() const
Returns the current time.
Base class for output streams.
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)