16#include <Dirichlet_paroi_defilante.h>
17#include <Echange_externe_impose.h>
18#include <Scalaire_impose_paroi.h>
19#include <Dirichlet_paroi_fixe.h>
20#include <Modele_turbulence_hyd_base.h>
21#include <Schema_Temps_base.h>
22#include <Neumann_homogene.h>
23#include <Operateur_base.h>
24#include <Champ_Uniforme.h>
25#include <Neumann_paroi.h>
26#include <distances_VEF.h>
27#include <Probleme_base.h>
28#include <Fluide_base.h>
29#include <Periodique.h>
30#include <Champ_P1NC.h>
37#include <TRUSTArray_kokkos.tpp>
68 for (
int ncomp = 0; ncomp <
nb_comp(); ncomp++)
70 return (vit_norm > 0);
83 CDoubleTabView3 gradient_elem = tab_gradient_elem.
view_ro<3>();
88 DoubleArrView vorticite =
static_cast<DoubleVect&
>(tab_vorticite).view_wo();
89 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), nb_elem, KOKKOS_LAMBDA(
const int num_elem)
91 vorticite(num_elem) = gradient_elem(num_elem, 1, 0) - gradient_elem(num_elem, 0, 1);
97 DoubleTabView vorticite = tab_vorticite.
view_wo();
98 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), nb_elem, KOKKOS_LAMBDA(
const int num_elem)
100 vorticite(num_elem, 0) = gradient_elem(num_elem, 2, 1) - gradient_elem(num_elem, 1, 2);
101 vorticite(num_elem, 1) = gradient_elem(num_elem, 0, 2) - gradient_elem(num_elem, 2, 0);
102 vorticite(num_elem, 2) = gradient_elem(num_elem, 1, 0) - gradient_elem(num_elem, 0, 1);
106 end_gpu_timer(__KERNEL_NAME__);
111void calculer_gradientP1NC_2D(
const DoubleTab& tab_variable,
const Domaine_VEF& domaine_VEF,
const Domaine_Cl_VEF& domaine_Cl_VEF, DoubleTab& tab_gradient_elem)
113 const DoubleTab& tab_face_normales = domaine_VEF.
face_normales();
114 const IntTab& tab_face_voisins = domaine_VEF.
face_voisins();
116 const ArrOfInt& tab_est_face_bord = domaine_VEF.
est_face_bord();
118 CDoubleTabView face_normales = tab_face_normales.
view_ro();
119 CIntTabView face_voisins = tab_face_voisins.
view_ro();
120 CDoubleArrView inverse_volumes = tab_inverse_volumes.view_ro();
121 CDoubleArrView variable =
static_cast<const ArrOfDouble&
>(tab_variable).view_ro();
122 CIntArrView est_face_bord = tab_est_face_bord.view_ro();
123 DoubleTabView gradient_elem = tab_gradient_elem.
view_rw();
129 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),
131 KOKKOS_LAMBDA (
int fac)
133 int type_face = est_face_bord(fac);
138 int elem1 = face_voisins(fac, 0);
139 int elem2 = face_voisins(fac, 1);
141 for (
int i = 0; i < dimension; i++)
143 double grad = 0.5 * face_normales(fac,i) * variable(fac);
144 Kokkos::atomic_add(&gradient_elem(elem1, i), +grad);
145 Kokkos::atomic_add(&gradient_elem(elem2, i), -grad);
149 else if (type_face == 1)
151 int elem1 = face_voisins(fac,0);
153 for (
int i = 0; i < dimension; i++)
155 double grad = face_normales(fac,i) * variable(fac);
156 Kokkos::atomic_add(&gradient_elem(elem1, i), grad);
160 else if (type_face == 0)
162 int elem1 = face_voisins(fac, 0);
163 int elem2 = face_voisins(fac, 1);
165 for (
int i = 0; i < dimension; i++)
167 double grad = face_normales(fac,i) * variable(fac);
168 if (elem1 >= 0) Kokkos::atomic_add(&gradient_elem(elem1, i), +grad);
169 if (elem2 >= 0) Kokkos::atomic_add(&gradient_elem(elem2, i), -grad);
173 end_gpu_timer(__KERNEL_NAME__);
176 auto vol_div = KOKKOS_LAMBDA (
int elem,
int i)
178 gradient_elem(elem, i) *= inverse_volumes(elem);
180 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), range_2D({0,0}, {nb_elem,dimension}), vol_div);
181 end_gpu_timer(__KERNEL_NAME__);
185template<
int nbcomp_compile_time,
int dims,
int nbface>
186void calculer_gradientP1NC_3D_template(
const DoubleTab& tab_variable,
189 DoubleTab& tab_gradient_elem)
191 const DoubleTab& tab_face_normales = domaine_VEF.
face_normales();
192 const IntTab& tab_face_voisins = domaine_VEF.
face_voisins();
194 const IntTab& tab_elem_faces = domaine_VEF.
elem_faces();
198 CDoubleTabView face_normales = tab_face_normales.
view_ro();
199 CIntTabView face_voisins = tab_face_voisins.
view_ro();
200 CDoubleArrView inverse_volumes = tab_inverse_volumes.view_ro();
201 CDoubleTabView variable = tab_variable.
view_ro();
202 CIntTabView elem_faces = tab_elem_faces.
view_ro();
203 DoubleTabView3 gradient_elem = tab_gradient_elem.
view_rw<3>();
206 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), nb_elem_tot, KOKKOS_LAMBDA (
int elem)
209 double contrib_grad_loc[nbcomp_compile_time*dims]= {};
211 for (
int iface = 0; iface < nbface; iface++)
213 int fac = elem_faces(elem, iface);
215 double coef = (elem == face_voisins(fac, 0) ? 1 : -1);
217 double face_normales_loc[dims];
218 double variable_loc[nbcomp_compile_time];
220 for (
int i = 0; i < dims; i++)
222 face_normales_loc[i] = face_normales(fac, i);
225 for (
int icomp = 0; icomp < nbcomp_compile_time; icomp++)
227 variable_loc[icomp] = variable(fac, icomp);
230 for (
int icomp = 0; icomp < nbcomp_compile_time; icomp++)
231 for (
int i = 0; i < dims; i++)
233 double grad = coef * face_normales_loc[i] * variable_loc[icomp];
234 contrib_grad_loc[dims*icomp + i] += grad;
238 double inverse = inverse_volumes(elem);
240 for (
int icomp = 0; icomp < nbcomp_compile_time; icomp++)
241 for (
int i = 0; i < dims; i++)
243 gradient_elem(elem, icomp, i) = contrib_grad_loc[dims*icomp + i]*inverse;
248 end_gpu_timer(__KERNEL_NAME__);
255template<
int dims,
int nbface>
259 Cerr <<
"Error in calculer_gradientP1NC_3D: unsupported nb_comp, add more in 'dispatch_nbcomp'" << finl;
264template<
int dims,
int nbface,
int nbcomp_compile_time,
int ...Rest>
266 const DoubleTab& tab_variable,
269 DoubleTab& tab_gradient_elem)
271 if (nbcomp_compile_time == nb_comp_runtime)
273 calculer_gradientP1NC_3D_template<nbcomp_compile_time, dims, nbface>(tab_variable, domaine_VEF,
274 domaine_Cl_VEF, tab_gradient_elem);
279 tab_variable, domaine_VEF, domaine_Cl_VEF, tab_gradient_elem);
284template<
int dims,
int nbface>
285void dispatch_nbcomp(
int nb_comp_runtime,
const DoubleTab& tab_variable,
288 DoubleTab& tab_gradient_elem)
291 dispatch_nbcomp_impl<dims, nbface>(nb_comp_runtime,
TemplateIntList<1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20>(),
292 tab_variable, domaine_VEF, domaine_Cl_VEF, tab_gradient_elem);
295void calculer_gradientP1NC_3D(
const DoubleTab& tab_variable,
298 DoubleTab& tab_gradient_elem)
300 const int nb_comp = tab_variable.
line_size();
302 int nb_faces_elem = domaine_VEF.
elem_faces().dimension(1);
311 switch (nb_faces_elem)
317 dispatch_nbcomp<2,3>(nb_comp, tab_variable,
318 domaine_VEF, domaine_Cl_VEF,
323 dispatch_nbcomp<3,3>(nb_comp, tab_variable,
324 domaine_VEF, domaine_Cl_VEF,
329 Cerr <<
"Error in calculer_gradientP1NC_3D: dimensions must be 2 or 3, got "
330 << dimensions << finl;
339 dispatch_nbcomp<2,4>(nb_comp, tab_variable,
340 domaine_VEF, domaine_Cl_VEF,
345 dispatch_nbcomp<3,4>(nb_comp, tab_variable,
346 domaine_VEF, domaine_Cl_VEF,
351 Cerr <<
"Error in calculer_gradientP1NC_3D: dimensions must be 2 or 3, got "
352 << dimensions << finl;
361 dispatch_nbcomp<2,6>(nb_comp, tab_variable,
362 domaine_VEF, domaine_Cl_VEF,
367 dispatch_nbcomp<3,6>(nb_comp, tab_variable,
368 domaine_VEF, domaine_Cl_VEF,
373 Cerr <<
"Error in calculer_gradientP1NC_3D: dimensions must be 2 or 3, got "
374 << dimensions << finl;
380 Cerr <<
"Error in calculer_gradientP1NC_3D: nb_faces_elem must be 3, 4, or 6 got "
381 << nb_faces_elem << finl;
386void calculer_gradientP1NC(
const DoubleTab& tab_variable,
const Domaine_VEF& domaine_VEF,
const Domaine_Cl_VEF& domaine_Cl_VEF, DoubleTab& tab_gradient_elem)
388 const int nb_comp = tab_variable.
line_size();
389 tab_gradient_elem = 0.;
392 if (nb_comp != 1 || tab_gradient_elem.
nb_dim() == 3)
393 calculer_gradientP1NC_3D(tab_variable, domaine_VEF, domaine_Cl_VEF, tab_gradient_elem);
396 calculer_gradientP1NC_2D(tab_variable, domaine_VEF, domaine_Cl_VEF, tab_gradient_elem);
419 const Domaine_VEF& domaine_VEF = le_dom_VEF.valeur();
420 const int nb_faces = domaine_VEF.
nb_faces();
421 const IntTab& face_sommets = domaine_VEF.
face_sommets();
424 Cerr <<
"Affecter Clement : ... " << finl;
433 for(
int face=0; face<nb_faces; face++)
440 somme+=vals(face_sommets(face,isom));
442 somme+=vals(face_sommets(face,isom), comp);
446 tab(face)=1./6.*somme+2./3.*valf(face);
448 tab(face)=17./60.*somme+3./20.*valf(face);
451 tab(face,comp)=1./6.*somme+2./3.*valf(face,comp);
453 tab(face,comp)=17./60.*somme+3./20.*valf(face,comp);
470 int ndeb, nfin, num_face;
472 for (
int i = 0; i < nb_cl; i++)
484 for (num_face = ndeb; num_face < nfin; num_face++)
487 for (
int comp = 0; comp < nb_compo; comp++)
489 if (ch_tab(num_face, comp) != ch_tab(voisine, comp))
491 moy = 0.5 * (ch_tab(num_face, comp) + ch_tab(voisine, comp));
492 ch_tab(num_face, comp) = moy;
493 ch_tab(voisine, comp) = moy;
508 DoubleTrav tab_gradient_elem(nb_elem_tot, dim, dim);
509 const DoubleTab& vitesse =
valeurs();
512 CDoubleTabView3 gradient_elem = tab_gradient_elem.
view_ro<3>();
513 DoubleArrView Critere_Q = tab_Critere_Q.view_rw();
514 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),
515 range_1D(0, nb_elem), KOKKOS_LAMBDA(
519 for (
int i = 0; i < dim; i++)
520 for (
int j = 0; j < dim; j++)
522 double deriv1 = gradient_elem(num_elem, i, j);
523 double deriv2 = gradient_elem(num_elem, j, i);
524 crit += -0.25 * deriv1 * deriv2;
526 Critere_Q[num_elem] = crit;
528 end_gpu_timer(__KERNEL_NAME__);
538 int ndeb, nfin, l_unif;
545 const DoubleTab& tab_visco = ch_visco_cin.
valeurs();
549 if (tab_visco(0, 0) > DMINFLOAT)
550 visco0 = tab_visco(0, 0);
561 Cerr <<
"In Champ_P1NC::calcul_y_plus : visco = " << tab_visco.
local_min_vect() <<
" <= 0 ? " << finl;
566 DoubleTab yplus_faces(1, 1);
567 int yplus_already_computed = 0;
569 const RefObjU& modele_turbulence = eqn_hydr.
get_modele(TURBULENCE);
579 yplus_already_computed = 1;
594 DoubleTrav counter(y_plus.
size());
601 CDoubleArrView visco =
static_cast<const DoubleVect&
>(tab_visco).view_ro();
602 CDoubleArrView yp_faces =
static_cast<const DoubleVect&
>(yplus_faces).view_ro();
603 DoubleArrView y_plus_view = y_plus.view_rw();
604 DoubleArrView counter_view =
static_cast<DoubleVect&
>(counter).view_wo();
605 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), Kokkos::RangePolicy<>(ndeb, nfin), KOKKOS_LAMBDA (
const int num_face)
607 int elem = face_voisins(num_face, 0);
608 y_plus_view(elem) = 0;
610 end_gpu_timer(__KERNEL_NAME__);
611 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), Kokkos::RangePolicy<>(ndeb, nfin), KOKKOS_LAMBDA (
const int num_face)
613 int elem = face_voisins(num_face, 0);
614 if (yplus_already_computed)
617 Kokkos::atomic_add(&y_plus_view(elem), yp_faces(num_face));
623 for (
int i = 0; i < dim; i++)
625 num[i] = elem_faces(elem, i);
626 if (num[i] == num_face && !ok)
628 num[i] = elem_faces(elem, dim);
633 double dist = distance(dim, num_face, elem, xp, xv, face_normale);
634 dist *= (dim + 1.) / dim;
636 double norm_v = norm_vit1_lp(dim, vit, num_face, nfac, num, face_normale, val);
637 double d_visco = l_unif ? visco0:visco[elem];
640 double norm_tau = d_visco * norm_v / dist;
641 double u_etoile = sqrt(norm_tau);
642 Kokkos::atomic_add(&y_plus_view(elem), dist * u_etoile / d_visco);
644 Kokkos::atomic_add(&counter_view(elem), +1);
646 end_gpu_timer(__KERNEL_NAME__);
647 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), Kokkos::RangePolicy<>(0, y_plus.
size()), KOKKOS_LAMBDA (
const int elem)
649 if (counter_view(elem)>0) y_plus_view(elem)/=counter_view(elem);
651 end_gpu_timer(__KERNEL_NAME__);
660 const DoubleTab& u =
valeurs();
664 calculer_gradientP1NC(u,
domaine_vef(), domaine_Cl_VEF, tab_gradient_elem);
666 CDoubleTabView3 gradient_elem = tab_gradient_elem.
view_ro<3>();
667 DoubleTabView grad_u = tab_grad_u.
view_wo();
668 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), Kokkos::RangePolicy<>(0, nb_elem), KOKKOS_LAMBDA(
const int elem)
671 for (
int i = 0; i < dim; i++)
673 for (
int j = 0; j < dim; j++)
675 grad_u(elem, comp) = gradient_elem(elem, i, j);
680 end_gpu_timer(__KERNEL_NAME__);
685 const DoubleTab& temp =
valeurs();
686 calculer_gradientP1NC(temp,
domaine_vef(), domaine_Cl_VEF, grad_T);
732 const DoubleTab& temp =
valeurs();
743 double T_ref = double(temp_ref);
751 int nfin = ndeb + le_bord.
nb_faces();
760 for (
int num_face = ndeb; num_face < nfin; num_face++)
762 int elem = face_voisins(num_face, 0);
766 h_moy += h_conv(elem);
771 for (
int num_face = ndeb; num_face < nfin; num_face++)
773 int elem = face_voisins(num_face, 0);
775 double norme_flux = 0.;
778 for (
int k = 0; k < Flux.
dimension(1); k++)
779 norme_flux += Flux(num_face, k) * Flux(num_face, k);
782 surf += face_normale(num_face, k) * face_normale(num_face, k);
784 double DT = temp(num_face) - T_ref;
792 h_conv(elem) = sqrt(norme_flux / surf) / DT;
794 h_moy += h_conv(elem);
798 double nb_faces_d =
static_cast<double>(le_bord.
nb_faces());
800 int nb_faces =
static_cast<int>(nb_faces_d);
805 fich_hconv =
"Heat_transfert_Coeff_";
806 fich_hconv += la_fr.
le_nom();
807 fich_hconv +=
".dat";
810 fic.
setf(ios::scientific);
813 fic << le_temps <<
" " << h_moy << finl;
818static double norme_L2(
const DoubleTab& u,
const Domaine_VEF& domaine_VEF)
820 const int nb_faces = domaine_VEF.
nb_faces();
825 CDoubleTabView uview = u.
view_ro();
827 Kokkos::parallel_reduce(start_gpu_timer(__KERNEL_NAME__), nb_faces,
828 KOKKOS_LAMBDA (
const int i,
double& s)
830 for (
int j = 0; j < nb_compo_; j++)
831 s += uview(i, j) * uview(i, j);
834 end_gpu_timer(__KERNEL_NAME__);
840 Cerr <<
"Champ_P1NC::norme_L2" << finl;
846 const DoubleTab& u =
valeurs();
857 const int nb_elem = mon_dom.
nb_elem();
871 Kokkos::parallel_reduce(start_gpu_timer(__KERNEL_NAME__),
nb_comp(),
872 KOKKOS_LAMBDA (
const int composante,
double& norme_H1_comp)
874 for (
int K = 0; K < nb_elem; K++)
876 double norme_grad_elem = 0.;
877 for (
int i = 0; i < dim; i++)
879 double int_grad_elem = 0.;
880 for (
int face = 0; face < nb_faces_elem; face++)
882 int face_globale = elem_faces(K, face);
884 int_grad_elem += tab(face_globale, composante) * face_normales(face_globale, i) * oriente_normale(face_globale, K, face_voisins);
887 norme_grad_elem += int_grad_elem * int_grad_elem;
890 norme_H1_comp += norme_grad_elem / volumes(K);
894 end_gpu_timer(__KERNEL_NAME__);
896 return sqrt(dnorme_H1);
915 calculer_gradientP1NC(champ, domaine_VEF, domaine_Cl_VEF, gij);
963 int nb_cl = les_cl.size();
969 for (
int num_cl = 0; num_cl < nb_cl; num_cl++)
972 const Cond_lim& la_cl = les_cl[num_cl];
977 int nfin = ndeb + la_front_dis.
nb_faces();
980 CDoubleTabView face_normale = domaine_VEF.
face_normales().view_ro();
981 CIntTabView face_voisins = domaine_VEF.
face_voisins().view_ro();
983 CDoubleTabView tau_tan = tab_tau_tan.
view_ro();
984 CDoubleArrView nu =
static_cast<const ArrOfDouble&
>(tab_nu).view_ro();
985 CDoubleArrView nu_turb =
static_cast<const ArrOfDouble&
>(tab_nu_turb).view_ro();
986 DoubleTabView3 gij = tab_gij.
view_rw<3>();
987 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), Kokkos::RangePolicy<>(ndeb, nfin), KOKKOS_LAMBDA (
const int fac)
990 int num1 = face_voisins(fac, 0);
995 for (
int i = 0; i < dim; i++)
996 sum += tau_tan(fac, i) * tau_tan(fac, i);
997 double norme_tau_tan = sqrt(sum);
998 for (
int i = 0; i < dim; i++)
999 P[i][0] = tau_tan(fac, i) / (norme_tau_tan + DMINFLOAT);
1003 for (
int i = 0; i < dim; i++)
1004 sum += face_normale(fac, i) * face_normale(fac, i);
1005 double norme = sqrt(sum);
1007 int signe = -oriente_normale(fac, num1, face_voisins);
1008 for (
int i = 0; i < dim; i++)
1009 P[i][1] = signe * face_normale(fac, i) / norme;
1014 P[0][2] = P[1][0] * P[2][1] - P[2][0] * P[1][1];
1015 P[1][2] = P[2][0] * P[0][1] - P[0][0] * P[2][1];
1016 P[2][2] = P[0][0] * P[1][1] - P[1][0] * P[0][1];
1022 double dutdn_old = 0.;
1023 for (
int i = 0; i < dim; i++)
1024 for (
int j = 0; j < dim; j++)
1026 double gij_value = Kokkos::atomic_fetch_add(&gij(num1, i, j), 0.0);
1027 dutdn_old += gij_value * P[j][1] * P[i][0];
1031 double C = -dutdn_old + norme_tau_tan / (nu[num1] + nu_turb[num1]) * porosite_face(fac);
1035 for (
int i = 0; i < dim; i++)
1036 for (
int j = 0; j < dim; j++)
1037 Kokkos::atomic_add(&gij(num1, i, j), C * P[j][1] * P[i][0]);
1039 end_gpu_timer(__KERNEL_NAME__);
1052 const int nb_elem = domaine_VEF.
nb_elem();
1053 const int nb_elem_tot = domaine_VEF.
nb_elem_tot();
1060 CDoubleTabView3 duidxj_v = duidxj.
view_ro<3>();
1061 DoubleArrView SMA_barre_v = SMA_barre.view_wo();
1062 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), nb_elem, KOKKOS_LAMBDA(
1066 for (
int i = 0; i < dim; i++)
1067 for (
int j = 0; j < dim; j++)
1069 double Sij = 0.5 * (duidxj_v(elem, i, j) + duidxj_v(elem, j, i));
1072 SMA_barre_v(elem) = 2. * temp;
1074 end_gpu_timer(__KERNEL_NAME__);
1081 if (ok != FAUX_EN_PERIO)
1084 Cerr <<
"Champ_P1NC::calculer_integrale_volumique not yet correctly implemented in periodic case!" << finl;
1089 const DoubleVect& volume =
domaine.volumes_entrelaces();
1090 const double resu = mp_prodscal(v, volume);
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
const Domaine & domaine() const
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.
const Domaine_Cl_dis_base & domaine_Cl_dis() const
void mettre_a_jour(double temps) override
Performs a time update of the unknown field.
DoubleTab & valeurs() override
Returns the array of field values at the current time.
Champ_base & affecter_(const Champ_base &) override
Assignment of a generic OWN_PTR(Champ_base) (Champ_base) to an unknown field.
int fixer_nb_valeurs_nodales(int)
int imprime_P1NC(Sortie &, int) const
DoubleTab & trace(const Frontiere_dis_base &fr, const DoubleTab &y, DoubleTab &x, int distant) const
int filtrer_L2_deja_appele_
void calcul_h_conv(const Domaine_Cl_VEF &, DoubleTab &, int temp_ref) const
void abortTimeStep() override
void cal_rot_ordre1(DoubleTab &) const
virtual double norme_H1(const Domaine &) const
void mettre_a_jour(double temps) override
Performs a time update of the unknown field.
virtual double norme_L2_H1(const Domaine &dom) const
void calcul_grad_T(const Domaine_Cl_VEF &, DoubleTab &) const
static DoubleVect & calcul_S_barre(const DoubleTab &, DoubleVect &, const Domaine_Cl_VEF &)
void calcul_y_plus(const Domaine_Cl_VEF &, DoubleVect &) const
DoubleTab & remplir_coord_noeuds(DoubleTab &positions) const override
void verifie_valeurs_cl() override
void gradient(DoubleTab &) const
int compo_normale_sortante(int) const
static DoubleTab & calcul_gradient(const DoubleTab &, DoubleTab &, const Domaine_Cl_VEF &)
void calcul_critere_Q(DoubleVect &) const
void filtrer_L2(DoubleTab &x) const
Champ_base & affecter_(const Champ_base &) override
Assignment of a generic OWN_PTR(Champ_base) (Champ_base) to an unknown field.
void calcul_grad_U(const Domaine_Cl_VEF &, DoubleTab &) const
DoubleTab & trace(const Frontiere_dis_base &, DoubleTab &, double, int distant) const override
See Champ_base. Special case (unfortunately) of Champ_P0_VDF:
static DoubleTab & calcul_duidxj_paroi(DoubleTab &, const DoubleTab &, const DoubleTab &, const DoubleTab &, const Domaine_Cl_VEF &)
int fixer_nb_valeurs_nodales(int nb_noeuds) override
int imprime(Sortie &, int) const override
const Domaine_VEF & domaine_vef() const override
virtual double norme_L2(const Domaine &) const
static double calculer_integrale_volumique(const Domaine_VEF &, const DoubleVect &, Ok_Perio ok)
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.
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
class Cond_lim Generic class used to represent any class
class Conds_lim This class represents a vector of boundary conditions.
Dirichlet_paroi_defilante Imposes the wall velocity in an equation of type Navier_Stokes.
Dirichlet_paroi_fixe Represents a fixed wall in a Navier-Stokes type equation.
int nb_faces_elem(int=0) const
Returns the number of faces of type i of the geometric elements that make up the domain.
const DoubleTab_t & coord_sommets() const
Domaine_VEF & domaine_vef()
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
int nb_cond_lim() const
Returns the number of 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.
const MD_Vector & md_vector_faces() const
DoubleVect & volumes_entrelaces()
int nb_faces_tot() const
Returns the total number of faces.
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 elem_faces(int i, int j) const
Returns the index of the i-th face of element num_elem; the face numbering convention is.
double xp(int num_elem, int k) const
ArrOfInt & est_face_bord()
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
double inverse_volumes(int i) const
const Domaine & domaine() const
Classe Echange_externe_impose: This class represents the special case of the class.
Class defining operators and methods for all reading operation in an input flow (file,...
class Equation_base The role of an equation is the calculation of one or more fields....
virtual const Milieu_base & milieu() const =0
virtual const RefObjU & get_modele(Type_modele type) const
virtual const Champ_Inc_base & inconnue() const =0
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual const Operateur & operateur(int) const =0
const Nom & le_nom() const override
Returns the name of the field.
virtual int nb_comp() const
Base class for an incompressible fluid and its properties:
const Champ_Don_base & viscosite_cinematique() const
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.
: This class is an OWN_PTR but the pointed object is shared among multiple
virtual const Champ_Don_base & capacite_calorifique() const
Returns the heat capacity of the medium (const version).
virtual const Champ_base & masse_volumique() const
Returns the mass density of the medium (const version).
DoubleVect & porosite_face()
Base class for the turbulence model hierarchy for Navier-Stokes equations.
const Turbulence_paroi_base & loi_paroi() const
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
Classe Neumann_homogene This class is the base class of the hierarchy of homogeneous Neumann-type bou...
Classe Neumann_paroi This boundary condition corresponds to an imposed flux for the.
class Nom: a character string for naming TRUST objects.
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.
virtual Operateur_base & l_op_base()=0
class Periodique This class represents a periodic boundary condition.
int face_associee(int i) const
static void mp_sum_for_each(T &arg1, T &arg2)
C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: ...
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Scalaire_impose_paroi Imposes a scalar at the wall in a Convection-Diffusion equation for a scalar.
double temps_courant() const
Returns the current time.
double pas_de_temps() const
Returns the current time step (delta_t).
void setf(IOS_FORMAT code) override
Base class for output streams.
virtual void ref(const TRUSTTab &)
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, View< _TYPE_, _SHAPE_ > > view_wo()
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension_tot(int) const override
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, ConstView< _TYPE_, _SHAPE_ > > view_ro() const
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, View< _TYPE_, _SHAPE_ > > view_rw()
_SIZE_ dimension(int d) const
_TYPE_ local_min_vect(Mp_vect_options opt=VECT_REAL_ITEMS) const
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
const Objet_U & valeur() const
Base class for the hierarchy of wall-law models computing turbulent quantities near walls....
const DoubleVect & tab_d_plus() const
virtual bool use_shear() const