TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Eval_Conv_VDF_Elem_leaves.h
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Eval_Conv_VDF_Elem_leaves_included
17#define Eval_Conv_VDF_Elem_leaves_included
18
19#include <Eval_Conv_VDF_Elem.h>
20#include <Eval_Conv_VDF.h>
21
22/// \cond DO_NOT_DOCUMENT
23class Eval_Conv_VDF_Elem_leaves: public Eval_Conv_VDF_Elem<Eval_Conv_VDF_Elem_leaves>,
24 public Eval_Conv_VDF {};
25/// \endcond
26
27/*
28 * NOTA BENE : (pour tous les evals)
29 * Les evaluateurs de flux convectifs calculent en fait le terme convectif qui figure au second
30 * membre de l'equation d'evolution c.a.d l'oppose du flux convectif pour l'EXPLICITE.
31 *
32 * Dans le cas de la methode IMPLICITE les evaluateurs calculent la quantite qui figure dans le
33 * premier membre de l'equation, nous ne prenons pas par consequent l'oppose en ce qui concerne
34 * les termes pour la matrice, par contre pour le second membre nous procedons comme en explicite
35 * mais en ne fesant intervenir que les valeurs fournies par les conditions limites.
36 */
37
38/*! @brief class Eval_Amont_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P0_VDF)
39 *
40 * Schema de convection Amont
41 *
42 */
43class Eval_Amont_VDF_Elem : public Eval_Conv_VDF_Elem<Eval_Amont_VDF_Elem>, public Eval_Conv_VDF
44{
45public:
46 static constexpr bool IS_AMONT = true;
47};
48
49/*! @brief class Eval_Centre_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P0_VDF)
50 *
51 * Schema de convection Centre ordre 2
52 *
53 */
54class Eval_Centre_VDF_Elem : public Eval_Conv_VDF_Elem<Eval_Centre_VDF_Elem>, public Eval_Conv_VDF
55{
56public:
57 static constexpr bool IS_CENTRE = true;
58 inline int amont_amont(int face, int i) const override { return le_dom->amont_amont(face, i); }
59 inline double dim_elem(int n1, int k) const override { return le_dom->dim_elem(n1,k); }
60 inline double dist_elem(int n1, int n2, int k) const override { return le_dom->dist_elem(n1,n2,k); }
61 inline double dist_face_elem1(int num_face,int n1) const { return le_dom->dist_face_elem1(num_face, n1); }
62
63 template <typename Type_Double>
64 inline void qcentre(const double psc, const int num0, const int num1, const int num0_0, const int num1_1,const int face,const DoubleTab& transporte, Type_Double& flux) const
65 { qcentre2_impl<Type_Double>(psc,num0,num1,num0_0,num1_1,face,transporte,flux); }
66};
67
68/*! @brief class Eval_Centre4_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P0_VDF)
69 *
70 * Schema de convection Centre ordre 4
71 *
72 */
73class Eval_Centre4_VDF_Elem : public Eval_Conv_VDF_Elem<Eval_Centre4_VDF_Elem>, public Eval_Conv_VDF
74{
75
76public:
77 static constexpr bool IS_CENTRE4 = true;
78 inline int amont_amont(int face, int i) const override { return le_dom->amont_amont(face, i); }
79 inline double dist_elem(int n1, int n2, int k) const override { return le_dom->dist_elem_period(n1,n2,k); }
80 template <typename Type_Double> inline void qcentre(const double ,const int ,const int ,const int ,const int ,const int , const DoubleTab& ,Type_Double& ) const;
81};
82
83template <typename Type_Double>
84inline void Eval_Centre4_VDF_Elem::qcentre(const double psc, const int num0, const int num1, const int num0_0, const int num1_1, const int face, const DoubleTab& transporte, Type_Double& flux) const
85{
86 const int ori = orientation(face);
87 const double dx = dist_elem(num0, num1, ori), dxam = dist_elem(num0_0, num0, ori), dxav = dist_elem(num1, num1_1, ori);
88 qcentre4_impl<Type_Double>(ori,dx,dxam,dxav,psc,num0,num1,num0_0,num1_1,face,transporte,flux);
89}
90
91/*! @brief class Eval_Quick_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P0_VDF)
92 *
93 * Schema de convection Quick
94 *
95 */
96class Eval_Quick_VDF_Elem : public Eval_Conv_VDF_Elem<Eval_Quick_VDF_Elem>, public Eval_Conv_VDF
97{
98public:
99 static constexpr bool IS_QUICK = true;
100 inline int amont_amont(int face, int i) const override { return le_dom->amont_amont(face, i); }
101 inline double dim_elem(int n1, int k) const override { return le_dom->dim_elem(n1,k); }
102 inline double dist_elem(int n1, int n2, int k) const override { return le_dom->dist_elem_period(n1,n2,k); }
103 template <typename Type_Double> inline void quick_fram(const Type_Double&, const int, const int,const int, const int ,const int ,const DoubleTab&, Type_Double& ) const;
104};
105
106template <typename Type_Double>
107inline void Eval_Quick_VDF_Elem::quick_fram(const Type_Double& psc, const int num0, const int num1,const int num0_0, const int num1_1, const int face,const DoubleTab& transporte, Type_Double& flux) const
108{
109 const int ori = orientation(face);
110 const double dx = dist_elem(num0, num1, ori),
111 dm0 = dim_elem(num0, ori), dxam0 = (num0_0!=-1?dist_elem(num0_0, num0, ori):0),
112 dm1 = dim_elem(num1, ori), dxam1 = (num1_1!=-1?dist_elem(num1, num1_1, ori):0);
113 quick_fram_impl<Type_Double>(ori,dx,dm0,dxam0,dm1,dxam1,psc,num0,num1,num0_0,num1_1,face,transporte,flux);
114}
115
116#endif /* Eval_Conv_VDF_Elem_leaves_included */
class Eval_Amont_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P0_...
static constexpr bool IS_AMONT
class Eval_Centre4_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P...
int amont_amont(int face, int i) const override
double dist_elem(int n1, int n2, int k) const override
static constexpr bool IS_CENTRE4
void qcentre(const double, const int, const int, const int, const int, const int, const DoubleTab &, Type_Double &) const
class Eval_Centre_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P0...
double dist_face_elem1(int num_face, int n1) const
void qcentre(const double psc, const int num0, const int num1, const int num0_0, const int num1_1, const int face, const DoubleTab &transporte, Type_Double &flux) const
double dim_elem(int n1, int k) const override
static constexpr bool IS_CENTRE
double dist_elem(int n1, int n2, int k) const override
int amont_amont(int face, int i) const override
void quick_fram_impl(const int, const double, const double, const double, const double, const double, const Type_Double &, const int, const int, const int, const int, const int, const DoubleTab &, Type_Double &) const
void qcentre2_impl(const double, const int, const int, const int, const int, const int, const DoubleTab &, Type_Double &) const
void qcentre4_impl(const int, const double, const double, const double, const double, const int, const int, const int, const int, const int, const DoubleTab &, Type_Double &) const
class Eval_Conv_VDF classe de base des evaluateurs de convection VDF
class Eval_Quick_VDF_Elem Evaluateur VDF pour la convection Le champ convecte est scalaire (Champ_P0_...
void quick_fram(const Type_Double &, const int, const int, const int, const int, const int, const DoubleTab &, Type_Double &) const
double dim_elem(int n1, int k) const override
int amont_amont(int face, int i) const override
double dist_elem(int n1, int n2, int k) const override
static constexpr bool IS_QUICK