TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Eval_Div_VDF_Elem.h
1/****************************************************************************
2* Copyright (c) 2025, 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_Div_VDF_Elem_included
17#define Eval_Div_VDF_Elem_included
18
19#include <CL_Types_include.h>
20#include <Eval_VDF_Elem.h>
21#include <Eval_Div_VDF.h>
22
23/*! @brief class Eval_Div_VDF_Elem Evaluateur VDF pour la divergence
24 *
25 */
27{
28public:
29 // Overload Eval_VDF_Elem
30 static constexpr bool CALC_FLUX_FACES_PAR = false, CALC_FLUX_FACES_PAR_FIXE = false, CALC_FLUX_FACES_SORTIE_LIB = true;
31
32 /* ************************************** *
33 * ********* POUR L'EXPLICITE ********** *
34 * ************************************** */
35
36 template <typename BC, typename Type_Double> // Generic return
37 inline void flux_face(const DoubleTab& inco, const DoubleTab&, const int face, const BC&, const int , Type_Double& flux) const
38 { for (int k=0; k<flux.size_array(); k++) flux[k] = inco(face,k)*surface(face)*porosite(face); }
39
40 template <typename Type_Double> inline void flux_face(const DoubleTab&, const DoubleTab&, const int , const Symetrie&, const int, Type_Double& ) const { /* Do nothing */ }
41 template <typename Type_Double> inline void flux_face(const DoubleTab&, const DoubleTab&, const int , const Dirichlet_paroi_fixe&, const int, Type_Double& ) const { /* Do nothing */ }
42 template <typename Type_Double> inline void flux_face(const DoubleTab&, const DoubleTab&, const int , const Dirichlet_paroi_defilante&, const int, Type_Double& ) const { /* Do nothing */ }
43
44 template <typename Type_Double>
45 inline void flux_face(const DoubleTab& inco, const int boundary_index, const int face, const int local_face, const Echange_externe_impose&, const int, Type_Double& flux) const
46 { for (int k=0; k<flux.size_array(); k++) flux[k] = inco(face,k)*surface(face)*porosite(face); }
47
48 template <typename Type_Double>
49 inline void flux_faces_interne(const DoubleTab& inco, const int face, Type_Double& flux) const
50 { for (int k=0; k<flux.size_array(); k++) flux[k] = inco(face,k)*surface(face)*porosite(face); }
51
52 /* ************************************** *
53 * ********* POUR L'IMPLICITE ********** *
54 * ************************************** */
55
56 template <typename BC, typename Type_Double>
57 inline void coeffs_face(const int, const int, const BC&, Type_Double& , Type_Double& ) const { /* Do nothing */ }
58
59 template <typename Type_Double> inline void coeffs_face(const DoubleTab&, const int, const int, const int, const int, const Echange_externe_impose&, Type_Double& , Type_Double& ) const { /* Do nothing */ }
60 template <typename Type_Double> inline void coeffs_faces_interne(const int, Type_Double& , Type_Double& ) const { /* Do nothing */ }
61
62 // A virer un jour .. voir avec le baltik Rayonnement
63 template <typename BC, typename Type_Double> inline void secmem_face(const int, const BC&, const int, Type_Double& ) const { throw; }
64 template <typename Type_Double> inline void secmem_face(const int, const int, const int, const Echange_externe_impose&, const int, Type_Double& ) const { throw; }
65 template <typename Type_Double> inline void secmem_faces_interne(const int, Type_Double& ) const { throw; }
66};
67
68#endif /* Eval_Div_VDF_Elem_included */
classe Dirichlet_paroi_defilante Impose la vitesse de paroi dnas une equation de type Navier_Stokes.
classe Dirichlet_paroi_fixe Represente une paroi immobile dans une equation de type Navier_Stokes.
Classe Echange_externe_impose: Cette classe represente le cas particulier de la classe.
class Eval_Div_VDF_Elem Evaluateur VDF pour la divergence
void coeffs_face(const DoubleTab &, const int, const int, const int, const int, const Echange_externe_impose &, Type_Double &, Type_Double &) const
static constexpr bool CALC_FLUX_FACES_PAR
void coeffs_faces_interne(const int, Type_Double &, Type_Double &) const
void flux_face(const DoubleTab &, const DoubleTab &, const int, const Symetrie &, const int, Type_Double &) const
void secmem_face(const int, const BC &, const int, Type_Double &) const
void flux_face(const DoubleTab &, const DoubleTab &, const int, const Dirichlet_paroi_defilante &, const int, Type_Double &) const
static constexpr bool CALC_FLUX_FACES_SORTIE_LIB
void flux_face(const DoubleTab &inco, const DoubleTab &, const int face, const BC &, const int, Type_Double &flux) const
static constexpr bool CALC_FLUX_FACES_PAR_FIXE
void flux_face(const DoubleTab &, const DoubleTab &, const int, const Dirichlet_paroi_fixe &, const int, Type_Double &) const
void flux_faces_interne(const DoubleTab &inco, const int face, Type_Double &flux) const
void secmem_face(const int, const int, const int, const Echange_externe_impose &, const int, Type_Double &) const
void flux_face(const DoubleTab &inco, const int boundary_index, const int face, const int local_face, const Echange_externe_impose &, const int, Type_Double &flux) const
void secmem_faces_interne(const int, Type_Double &) const
void coeffs_face(const int, const int, const BC &, Type_Double &, Type_Double &) const
class Eval_VDF_Elem Cette classe represente le prototype fonctionnel
DoubleVect porosite
DoubleVect surface
classe Symetrie Sur les faces de symetrie on a les proprietes suivantes:
Definition Symetrie.h:37