16#include <Champ_Fonc_P0_base.h>
17#include <Frontiere_dis_base.h>
18#include <Domaine_dis_base.h>
20#include <Domaine_VF.h>
64 const DoubleVect& volumes = zvf.
volumes();
65 const DoubleTab& val =
valeurs();
67 double moy = 0, sum_vol = 0;
69 for (
int e = 0; e < zvf.
nb_elem(); e++)
71 const double coef = porosite_elem(e) * volumes(e);
72 moy += val(e, ncomp) * coef;
84 const DoubleVect& volumes = zvf.
volumes();
85 const DoubleTab& val =
valeurs();
88 DoubleVect moy(nb_compo);
92 for (
int e = 0; e < zvf.
nb_elem(); e++)
94 const double coef = porosite_elem(e) * volumes(e);
95 for (
int k = 0; k < nb_compo; k++)
96 moy[k] += val(e, k) * coef;
118 const DoubleTab& val =
valeurs();
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
double valeur_au_bord(int face) const
Champ_base & affecter_(const Champ_base &) override
Assigns a Champ_base to a Champ_Fonc_base.
DoubleTab & trace(const Frontiere_dis_base &, DoubleTab &, double, int distant) const override
Trace of the P0 field on the boundary.
double moyenne(const DoubleVect &porosite_elem, int) const
void mettre_a_jour(double) override
Time update of the field.
int imprime(Sortie &, int) const override
DOES NOTHING.
int fixer_nb_valeurs_nodales(int n) override
Sets the number of degrees of freedom per component.
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Champ_base & affecter_(const Champ_base &) override
Assigns a Champ_base to a Champ_Fonc_base.
void mettre_a_jour(double temps) override
Time update of the field.
virtual void creer_tableau_distribue(const MD_Vector &, RESIZE_OPTIONS=RESIZE_OPTIONS::COPY_INIT)
Champ_base()
Default constructor of a Champ_base.
int imprime_P0(Sortie &, int) const
int affecter_(const Champ_base &)
DoubleTab & trace(const Frontiere_dis_base &fr, const DoubleTab &y, DoubleTab &x, int distant) const
virtual const MD_Vector & md_vector_elements() const
Returns the parallel descriptor of element arrays of the domain.
double volumes(int i) const
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
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,...
const Nom & le_nom() const override
Returns the name of the field.
virtual int nb_comp() const
class Frontiere_dis_base Class representing a discretized boundary.
: This class is an OWN_PTR but the pointed object is shared among multiple
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.
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
Base class for output streams.