16#include <Frontiere_ouverte_rho_u_impose.h>
17#include <Fluide_Dilatable_base.h>
18#include <Frontiere_dis_base.h>
19#include <Equation_base.h>
38 Cerr <<
"The boundary condition Frontiere_ouverte_rho_u_impose is only applicable for dialtable fluids and not a fluid of type " << mon_dom_cl_dis->equation().milieu().que_suis_je() << finl;
47 Cerr <<
"Access to a boundary condition in rho.u without specifying the component" << finl;
55 int ndeb = le_champ_front->frontiere_dis().frontiere().num_premiere_face();
56 const DoubleTab& tab_rho_u = le_champ_front->valeurs_au_temps(temps);
57 assert(tab_rho_u.
nb_dim() == 2);
60 rho_u = tab_rho_u(0, j);
62 rho_u = tab_rho_u(i, j);
64 double rho = le_fluide->rho_face_np1()(i + ndeb);
70 if (temps==DMAXFLOAT) temps = le_champ_front->get_temps_defaut();
73 int size = le_champ_front->valeurs().dimension(0) == 1 ? le_bord.
nb_faces_tot() : le_champ_front->valeurs().dimension_tot(0);
76 bool update = le_champ_front->instationnaire();
77 if (
tab_.dimension(0) != size)
79 tab_.resize(size, le_champ_front->valeurs().dimension(1));
85 int ndeb = le_champ_front->frontiere_dis().frontiere().num_premiere_face();
86 int nb_comp =
tab_.dimension(1);
87 CDoubleTabView rho_u = le_champ_front->valeurs_au_temps(temps).view_ro();
88 CDoubleArrView rho_face_np1 =
static_cast<const ArrOfDouble&
>(le_fluide->rho_face_np1()).view_ro();
89 DoubleTabView tab =
tab_.view_wo();
90 bool uniform = (int)rho_u.extent(0) == 1;
91 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), size, KOKKOS_LAMBDA (
const int face)
93 for (
int comp = 0; comp < nb_comp; comp++)
94 tab(face, comp) = rho_u(uniform ? 0 : face, comp) / rho_face_np1(face + ndeb);
96 end_gpu_timer(__KERNEL_NAME__);
virtual int compatible_avec_eqn(const Equation_base &) const
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
Entree_fluide_vitesse_imposee_libre Special case of the class Entree_fluide_vitesse_imposee for impos...
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
Base class for a dilatable fluid, inheriting from Fluide_base.
Open boundary on which the mass flux rho.U is imposed instead of the velocity U.
void completer() override
DOES NOTHING must be overridden in derived classes.
const DoubleTab & tab_val_imp(double temps=DMAXFLOAT) const override
double val_imp_au_temps(double temps, int i) const override
Returns the imposed value on the i-th component of the field at the boundary at the specified time.
int compatible_avec_eqn(const Equation_base &) const override
virtual const Equation_base & equation(const std::string &nom_inc) const
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.
_SIZE_ dimension(int d) const