16#include <Op_Diff_P1NC_barprim.h>
17#include <Schema_Temps_base.h>
19#include <Champ_Uniforme.h>
21#include <Champ_P1NC.h>
22#include <Periodique.h>
23#include <TRUSTLists.h>
66 const Domaine_VEF& domaine_VEF = le_dom_vef.valeur();
67 double alpha = 1.e-38;
77 const Domaine_VEF& domaine_VEF = le_dom_vef.valeur();
78 const Domaine& domaine = domaine_VEF.
domaine();
80 const IntTab& elem_faces = domaine_VEF.
elem_faces();
82 int nfe = domaine.nb_faces_elem();
83 int nb_elem_tot = domaine.nb_elem_tot();
84 int elem, indice, face, comp, comp2;
87 for (elem = 0; elem < nb_elem_tot; elem++)
89 for (indice = 0; indice < nfe; indice++)
91 face = elem_faces(elem, indice);
93 if (elem != face_voisins(face, 0))
95 for (comp2 = 0; comp2 <
dimension; comp2++)
97 normale = signe * face_normales(face, comp2);
99 resu(face, comp) -= nu(elem) * grad(elem, comp, comp2) * normale;
104 int nb_bords = le_dom_vef->nb_front_Cl();
105 for (
int n_bord = 0; n_bord < nb_bords; n_bord++)
107 const Cond_lim& la_cl = la_zcl_vef->les_conditions_limites(n_bord);
111 int num2 = num1 + le_bord.
nb_faces();
112 if ((la_cl->que_suis_je() ==
"Paroi_fixe"))
115 for (face = num1; face < num2; face++)
117 for (comp2 = 0; comp2 <
dimension; comp2++)
119 normale = face_normales(face, comp2);
121 resu(face, comp) = 0.;
125 else if (sub_type(
Periodique, la_cl.valeur()))
129 for (face = num1; face < num2; face++)
131 if (!fait[face - num1])
133 int face_associee = num1 + la_cl_perio.
face_associee(face - num1);
134 fait[face - num1] = (fait[face_associee - num1] = 1);
136 resu(face_associee, comp) = (resu(face, comp) += resu(face_associee, comp));
152void calculer_gradientP1NC(
const DoubleTab& vitesse,
const Domaine_VEF& domaine_VEF,
const Domaine_Cl_VEF& domaine_Cl_VEF, DoubleTab& gradient_elem);
156 int nb_elem = le_dom_vef->domaine().nb_elem_tot();
164 DoubleTab gradient_bar;
167 calculer_gradientP1NC(ubar, le_dom_vef.valeur(), la_zcl_vef.valeur(), gradient_bar);
168 DoubleTab resu_bar(resu);
DoubleTab & valeurs() override
Returns the array of field values at the current time.
void filtrer_L2(DoubleTab &x) const
void filtrer_resu(DoubleTab &x) const
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
double carre_pas_du_maillage() const
virtual double face_normales(int face, int comp) const
int elem_faces(int i, int j) const
Returns the index of the i-th face of element num_elem; the face numbering convention is.
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,...
int num_premiere_face() const
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.
double calculer_dt_stab() const override
Computes dt_stab.
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
void associer_diffusivite(const Champ_base &) override
const Champ_base & diffusivite() const override
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
void completer() override
Associates the operator with the domaine_dis, the domaine_Cl_dis, and the unknown of its equation.
OBS_PTR(Domaine_VEF) le_dom_vef
void calculer_divergence(const DoubleTab &, const DoubleVect &, DoubleTab &) const
void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &, const Champ_Inc_base &) override
void modifier_flux(const Operateur_base &) const
Operateur_Diff_base This class is the base of the hierarchy of operators representing.
virtual const Champ_base & diffusivite_pour_pas_de_temps() const
Returns the field corresponding to the true diffusivity of the medium used for the time step computat...
virtual void completer()
Associates the operator with the domaine_dis, the domaine_Cl_dis, and the unknown of its equation.
class Periodique This class represents a periodic boundary condition.
int face_associee(int i) const
Base class for output streams.
void resize(_SIZE_, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")