TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Iterateur_VDF_Face.h
1/****************************************************************************
2* Copyright (c) 2024, 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 Iterateur_VDF_Face_included
17#define Iterateur_VDF_Face_included
18
19#include <CL_Types_Aretes_enum.h>
20#include <Schema_Temps_base.h>
21#include <Op_Conv_VDF_base.h>
22#include <EcrFicPartage.h>
23
24template <class _TYPE_>
26{
27 inline unsigned taille_memoire() const override { throw; }
28 inline int duplique() const override
29 {
30 Iterateur_VDF_Face* xxx = new Iterateur_VDF_Face(*this);
31 if(!xxx) Process::exit("Not enough memory !");
32 return xxx->numero();
33 }
34
35public:
38
39 inline Evaluateur_VDF& evaluateur() override { return static_cast<Evaluateur_VDF&> (flux_evaluateur); }
40 inline const Evaluateur_VDF& evaluateur() const override { return static_cast<const Evaluateur_VDF&> (flux_evaluateur); }
41
42 int impr(Sortie& os) const override;
43 void completer_() override;
44
45 // INTERFACE BLOCS
46 void ajouter_blocs(matrices_t mats, DoubleTab& secmem, const tabs_t& semi_impl) const override;
47
48protected:
55
56private:
57 void multiply_by_rho_if_hydraulique(DoubleTab&) const;
58 template<typename Type_Double> void fill_resu_tab(const int, const int, const int, const Type_Double&, DoubleTab&) const;
59 template<typename Type_Double> void fill_coeff_matrice_morse(const int, const int, const int, const int, const Type_Double&, Matrice_Morse&) const;
60 template<typename Type_Double> void fill_coeff_matrice_morse(const int, const int, const int, const int, const Type_Double&, const Type_Double&, Matrice_Morse&) const;
61
62 /* ************************************** *
63 * ********* INTERFACE BLOCS ********** *
64 * ********* SFINAE TEMPLATES ********** *
65 * ************************************** */
66
67 /* ====== BORDS ===== */
68 template<typename Type_Double>
69 void ajouter_blocs_aretes_bords(const int, const matrices_t&, DoubleTab&, const tabs_t&) const;
70
71 template <bool should_calc_flux, Type_Flux_Arete Arete_Type, typename Type_Double>
72 std::enable_if_t< Arete_Type == Type_Flux_Arete::PAROI || Arete_Type == Type_Flux_Arete::NAVIER || Arete_Type == Type_Flux_Arete::NAVIER_PAROI, void>
73 ajouter_blocs_aretes_bords_(const int , const int , const matrices_t& , DoubleTab& , const tabs_t& ) const;
74
75 template <bool should_calc_flux, Type_Flux_Arete Arete_Type, typename Type_Double>
76 std::enable_if_t< Arete_Type == Type_Flux_Arete::FLUIDE || Arete_Type == Type_Flux_Arete::PAROI_FLUIDE || Arete_Type == Type_Flux_Arete::NAVIER_FLUIDE, void>
77 ajouter_blocs_aretes_bords_(const int , const int , const matrices_t& , DoubleTab& , const tabs_t& ) const;
78
79 template <bool should_calc_flux, Type_Flux_Arete Arete_Type, typename Type_Double>
80 std::enable_if_t< Arete_Type == Type_Flux_Arete::PERIODICITE, void>
81 ajouter_blocs_aretes_bords_(const int , const int , const matrices_t& , DoubleTab& , const tabs_t& ) const;
82
83 /* ====== COINS ===== */
84 template<typename Type_Double>
85 void ajouter_blocs_aretes_coins(const int, matrices_t, DoubleTab&, const tabs_t&) const;
86
87 template <bool should_calc_flux, Type_Flux_Arete Arete_Type, TypeAreteCoinVDF::type_arete Arete_Type_Coin, typename Type_Double>
88 std::enable_if_t< Arete_Type == Type_Flux_Arete::PAROI, void>
89 ajouter_blocs_aretes_coins_(const int , const int , matrices_t , DoubleTab& , const tabs_t& ) const;
90
91 template <bool should_calc_flux, Type_Flux_Arete Arete_Type, typename Type_Double>
92 std::enable_if_t<Arete_Type == Type_Flux_Arete::COIN_FLUIDE, void>
93 ajouter_blocs_aretes_coins_(const int , const int , matrices_t , DoubleTab& , const tabs_t& ) const;
94
95 template <bool should_calc_flux, Type_Flux_Arete Arete_Type, typename Type_Double>
96 std::enable_if_t<Arete_Type == Type_Flux_Arete::PERIODICITE, void>
97 ajouter_blocs_aretes_coins_(const int , const int , matrices_t , DoubleTab& , const tabs_t& ) const;
98
99 /* ====== INTERNES & MIXTES ===== */
100 template<typename Type_Double>
101 void ajouter_blocs_aretes_internes(const int, matrices_t, DoubleTab&, const tabs_t&) const;
102
103 template<typename Type_Double>
104 void ajouter_blocs_aretes_mixtes(const int, matrices_t, DoubleTab&, const tabs_t&) const;
105
106 template <bool should_calc_flux, Type_Flux_Arete Arete_Type, typename Type_Double>
107 std::enable_if_t< Arete_Type == Type_Flux_Arete::INTERNE || Arete_Type == Type_Flux_Arete::MIXTE, void>
108 ajouter_blocs_aretes_generique_(const int , const int , const int , matrices_t , DoubleTab& , const tabs_t& ) const;
109
110 /* ====== FA7 SORTIE LIBRE ===== */
111 template<typename Type_Double>
112 void ajouter_blocs_fa7_sortie_libre(const int, matrices_t, DoubleTab&, const tabs_t& ) const;
113
114 template <bool should_calc_flux, Type_Flux_Fa7 Fa7_Type, typename Type_Double>
115 void ajouter_blocs_fa7_sortie_libre_(const int , const int , matrices_t , DoubleTab& , const tabs_t& ) const;
116
117 /* ====== FA7 ELEM ===== */
118 template<typename Type_Double>
119 void ajouter_blocs_fa7_elem(const int, matrices_t, DoubleTab&, const tabs_t& ) const;
120
121 void corriger_fa7_elem_periodicite__(const int, int&, int&, int&, int&) const;
122 template<typename Type_Double> void corriger_fa7_elem_periodicite(const int, matrices_t, DoubleTab&, const tabs_t& ) const;
123
124 /* ====== Compressible ===== */
125 template<typename Type_Double>
126 void ajouter_pour_compressible(const int, matrices_t, DoubleTab&, const tabs_t&) const;
127};
128
129#include <Iterateur_VDF_Face.tpp> // templates specializations ici ;)
130
131#endif /* Iterateur_VDF_Face_included */
class Evaluateur_VDF Classe de base des evaluateurs VDF.
void ajouter_blocs(matrices_t mats, DoubleTab &secmem, const tabs_t &semi_impl) const override
int impr(Sortie &os) const override
Evaluateur_VDF & evaluateur() override
const Evaluateur_VDF & evaluateur() const override
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
virtual int duplique() const =0
virtual unsigned taille_memoire() const =0
int numero() const
Renvoie l'indice de l'objet dans Memoire::data.
Definition Objet_U.cpp:268
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27
Classe de base des flux de sortie.
Definition Sortie.h:52