16#include <Echange_contact_PolyMAC_HFV.h>
17#include <Schema_Euler_Implicite.h>
18#include <Op_Diff_PolyMAC_HFV_Elem.h>
19#include <Op_Diff_PolyMAC_HFV_Elem.h>
20#include <Champ_Elem_PolyMAC_HFV.h>
21#include <Champ_front_calc.h>
22#include <Champ_Uniforme.h>
23#include <Equation_base.h>
24#include <Probleme_base.h>
25#include <Domaine_PolyMAC_HFV.h>
26#include <Milieu_base.h>
32using namespace MEDCoupling;
41 if (
app_domains.size() == 0)
app_domains = { Motcle(
"Thermique"), Motcle(
"Neutronique"), Motcle(
"fraction_massique"), Motcle(
"indetermine") };
47 le_champ_front.typer(
"Ch_front_var_instationnaire_dep");
61 int i_op = -1, o_i_op = -1, i;
65 for (i = 0; i < o_eqn.nombre_d_operateurs(); i++)
77 const DoubleTab& xv = domaine.xv(), &o_xv = o_domaine.xv();
79 int i, f, o_f, nf_tot = fvf->nb_faces_tot(), o_nf_tot =
o_fvf->nb_faces_tot(), d, D =
dimension;
82 DoubleTrav xvf(nf_tot, D), o_xvf(o_nf_tot, D);
83 for (i = 0; i < nf_tot; i++)
84 for (d = 0; d < D; d++) xvf(i, d) = xv( fvf->num_face(i), d);
85 for (i = 0; i < o_nf_tot; i++)
86 for (d = 0; d < D; d++) o_xvf(i, d) = o_xv(
o_fvf->num_face(i), d);
89 MCAuto<DataArrayDouble> fdad(DataArrayDouble::New()), o_fdad(DataArrayDouble::New());
90 fdad->useExternalArrayWithRWAccess(xvf.addr(), nf_tot, D), o_fdad->useExternalArrayWithRWAccess(o_xvf.
addr(), o_nf_tot, D);
92 MCAuto<DataArrayIdType> f_idx(nf_tot && o_nf_tot ? o_fdad->findClosestTupleId(fdad) :
nullptr);
94 for (i = 0; i < nf_tot; i++)
96 f = fvf->num_face(i), o_f = o_nf_tot ?
o_fvf->num_face((
int)(f_idx->getIJ(i, 0))) : -1;
97 double d2 = o_f >= 0 ? domaine.dot(&xv(f, 0), &xv(f, 0), &o_xv(o_f, 0), &o_xv(o_f, 0)) : 1e8;
98 if (d2 < 1e-12)
f_dist(i) = o_f;
100 if (i < fvf->nb_faces() && d2 >= 1e-12)
101 Process::exit(
Nom(
"Echange_contact_PolyMAC_HFV: missing opposite faces detected between ") + fvf->
le_nom() +
" and " +
o_fvf->le_nom()
102 +
" ! Have you used Decouper_multi?");
106 Process::exit(
"Echange_contact_PolyMAC_HFV : MEDCoupling is required!");
class Champ_front_calc Derived class of Champ_front_var representing
const Frontiere_dis_base & front_dis() const
Returns the discretized boundary corresponding to the domain on which the trace is taken.
void creer(const Nom &, const Nom &, const Motcle &)
Create the Champ_front_calc object representing the trace of an unknown field on a boundary from name...
const Equation_base & equation() const
Returns the equation associated with the unknown whose trace is taken.
Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the domain of discretized boundary conditions to which the object belongs.
std::vector< Motcle > app_domains
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
int rang_frontiere(const Nom &)
Classe Echange_externe_impose: This class represents the special case of the class.
virtual Champ_front_base & T_ext()
Returns the T_ext field of temperature imposed at the boundary.
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 int nombre_d_operateurs() const =0
Probleme_base & probleme()
Returns the problem associated with the equation.
virtual const Operateur & operateur(int) const =0
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
virtual void fixer_nb_comp(int i)
Sets the number of components of the field.
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
class Nom: a character string for naming TRUST objects.
const Nom & le_nom() const override
Returns *this.
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 const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
virtual Operateur_base & l_op_base()=0
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.