16#include <Champ_P1_isoP1Bulle.h>
17#include <TRUSTTab_parts.h>
45 const DoubleVect& volumes = zvef.
volumes();
49 double norme = 0, s = 0;
54 for (i = prs; i < sz; i++)
57 for (i = 0; i < prs; i++)
58 q(i) += alpha * somme;
59 for (i = prs; i < sz; i++)
61 for (i = 0; i < prs; i++)
65 m += q(prs + som_elem(i, k));
71 Cerr <<
"norme L1 : " << s << finl;
74 for (i = 0; i < prs; i++)
77 for (i = 0; i < prs; i++)
81 m += q(prs + som_elem(i, k));
85 norme += volumes(i) * m;
93 v += q(prs + som_elem(i, l));
98 norme += volumes(i) * v;
110 DoubleTab_parts parties_P(
valeurs());
115 DoubleTab& Pk = parties_P[0];
116 DoubleTab& Ps = parties_P[1];
119 const Domaine& le_dom = zvef.
domaine();
120 const Domaine& dom = le_dom;
122 const DoubleTab& xg = zvef.
xp();
136 DoubleVect& Pk = parties_P[0];
137 DoubleVect& Ps = parties_P[1];
164 for (i = 0; i < prs; i++)
168 m += Ps(som_elem(i, k));
175 double moyenne_K = mp_moyenne_vect(Pk);
214 if (!est_egal(
temps_, tps))
216 Cerr <<
"The method Champ_P1_isoP1Bulle::trace performs an interpolation of the field values" << finl;
217 Cerr <<
"for which the trace on the boundary is requested" << finl;
218 Cerr <<
"This interpolation uses by default the values at the current time " <<
temps_ << finl;
219 Cerr <<
"of this field which does not match the time passed as parameter " << tps << finl;
227 const DoubleTab& val =
valeurs();
229 const IntTab& face_voisins = domaine_VEF.
face_voisins();
233 int elem = face_voisins(face, 0);
234 if (face_voisins(face, 1) != -1)
236 Cerr <<
"Error in Champ_P1_isoP1Bulle::valeur_au_bord." << finl;
237 Cerr <<
"The face is not a boundary face." << finl;
242 double la_val_bord = 0;
243 for (
int i = 0; i < (
dimension + 1); i++)
246 la_val_bord += val[nps + som_elem(elem, i)];
virtual void creer_tableau_distribue(const MD_Vector &, RESIZE_OPTIONS=RESIZE_OPTIONS::COPY_INIT)
int lire_donnees(Entree &)
Reads the field values from an input stream.
DoubleTab & valeurs() override
Returns the array of field values at the current time.
void completer(const Domaine_Cl_dis_base &zcl) override
const Domaine_VEF & domaine_vef() const override
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &val, int le_poly) const override
Causes an error! Must be overridden by derived classes.
int fixer_nb_valeurs_nodales(int) override
double valeur_a_elem_compo(const DoubleVect &position, int le_poly, int ncomp) const override
Causes an error! Must be overridden by derived classes.
Champ_base & affecter_(const Champ_base &) override
Assignment of a generic OWN_PTR(Champ_base) (Champ_base) to an unknown field.
DoubleTab & trace(const Frontiere_dis_base &, DoubleTab &, double, int distant) const override
See Champ_base. Special case (unfortunately) of Champ_P0_VDF:
double norme_L2(const Domaine &dom) const
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const override
Causes an error! Must be overridden by derived classes.
double valeur_au_bord(int face) const
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const override
Causes an error! Must be overridden by derived classes.
DoubleTab & remplir_coord_noeuds(DoubleTab &) const override
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const override
DoubleTab & remplir_coord_noeuds(DoubleTab &positions) const override
double valeur_a_elem_compo(const DoubleVect &position, int le_poly, int ncomp) const override
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &val, int le_poly) const override
DoubleTab & trace(const Frontiere_dis_base &fr, const DoubleTab &y, DoubleTab &x, int distant) const
void completer(const Domaine_Cl_dis_base &zcl)
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const override
virtual DoubleTab & valeurs()=0
Champ_base()
Default constructor of a Champ_base.
virtual DoubleTab & valeur_aux(const DoubleTab &positions, DoubleTab &valeurs) const
Causes an error! Must be overridden by derived classes.
static void verifier(const char *const msg, double)
const DoubleTab_t & coord_sommets() const
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
int numero_premier_sommet() const
virtual const MD_Vector & md_vector_p1b() const
double volumes(int i) const
const IntTab & get_num_fac_loc() const
double xp(int num_elem, int k) const
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
const Domaine & domaine() const
Class defining operators and methods for all reading operation in an input flow (file,...
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 void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")