TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Iterateur_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 Iterateur_VDF_Elem_included
17#define Iterateur_VDF_Elem_included
18
19#include <Schema_Temps_base.h>
20#include <Op_Conv_VDF_base.h>
21#include <EcrFicPartage.h>
22
23template <class _TYPE_>
25{
26 inline unsigned taille_memoire() const override { throw; }
27 inline int duplique() const override
28 {
29 Iterateur_VDF_Elem* xxx = new Iterateur_VDF_Elem(*this);
30 if(!xxx) Process::exit("Not enough memory !");
31 return xxx->numero();
32 }
33
34public:
37
38 inline Evaluateur_VDF& evaluateur() override { return static_cast<Evaluateur_VDF&> (flux_evaluateur); }
39 inline const Evaluateur_VDF& evaluateur() const override { return static_cast<const Evaluateur_VDF&> (flux_evaluateur); }
40
41 int impr(Sortie& os) const override;
42 void completer_() override { elem.ref(le_dom->face_voisins()); }
43 void ajouter_contribution_autre_pb(const DoubleTab& inco, Matrice_Morse& matrice, const Cond_lim& la_cl, std::map<int, std::pair<int, int>>&) const override;
44 void contribuer_au_second_membre(DoubleTab& ) const override;
45
46 // INTERFACE BLOCS
47 void ajouter_blocs(matrices_t mats, DoubleTab& secmem, const tabs_t& semi_impl) const override;
48 void associer_correlation_flux_parietal(const Correlation_base& corr) override { corr_flux_parietal_ = corr ; }
49 void creer_champ_T_paroi_pour_flux_parietal() override { /* TODO FIXME */ }
50
51protected:
53 IntTab elem;
55 inline const Milieu_base& milieu() const { return (la_zcl->equation()).milieu(); }
56 OBS_PTR(Correlation_base) corr_flux_parietal_;
57
58private:
59 template <typename Type_Double>
60 void ajouter_blocs_bords(const int , matrices_t mats, DoubleTab& secmem, const tabs_t& semi_impl) const;
61
62 template <typename Type_Double>
63 void ajouter_blocs_interne(const int , matrices_t mats, DoubleTab& secmem, const tabs_t& semi_impl) const;
64
65 template <bool should_calc_flux, typename Type_Double, typename BC>
66 void ajouter_blocs_bords_(const BC& , const int , const int , const int , matrices_t mats, DoubleTab& resu, const tabs_t& semi_impl) const;
67
68 template <typename Type_Double>
69 void ajouter_blocs_bords_(const Periodique& , const int , const int , const int , const Front_VF& , matrices_t mats, DoubleTab& resu, const tabs_t& semi_impl) const;
70
71 template <typename Type_Double>
72 void ajouter_blocs_bords_(const Echange_externe_impose& , const int , const int , const int , const int , const Front_VF& , matrices_t mats, DoubleTab& resu, const tabs_t& semi_impl) const;
73
74 using VectorDeriv = std::vector<std::tuple<const DoubleTab *, Matrice_Morse *, int>>;
75 template<typename Type_Double, typename BC>
76 void ajouter_blocs_bords_flux_parietal_(const BC& , const int , const int , const int , const DoubleTab& , DoubleTab& , Matrice_Morse *, VectorDeriv& , const tabs_t& ) const;
77
78 void modifier_flux() const;
79 template <typename Type_Double> inline void fill_flux_tables_(const int, const int , const double , const Type_Double& , DoubleTab& ) const;
80
81 void fill_derivee_cc(matrices_t mats, const tabs_t& semi_impl, VectorDeriv& d_cc) const;
82
83 template<typename Type_Double>
84 void fill_coeffs_matrices(const int, Type_Double&, Type_Double&, Matrice_Morse*, VectorDeriv&) const;
85
86 template<typename Type_Double>
87 void fill_coeffs_matrices(const int, const double, Type_Double&, Type_Double&, Matrice_Morse*, VectorDeriv&) const;
88
89 // method implementee dans FT (trio) pour TCL model. Dans TRUST, la methode return false ...
90 template <typename Type_Double>
91 bool ajouter_blocs_bords_echange_ext_FT_TCL(const Echange_externe_impose& , const int , const int , const int , const int , const Front_VF& , matrices_t mats, DoubleTab& resu, const tabs_t& semi_impl) const;
92
93 // A virer un jour .. voir avec le baltik Rayonnement
94 template <typename Type_Double>
95 void contribuer_au_second_membre_bords(const int , DoubleTab& ) const;
96
97 template <typename Type_Double>
98 void contribuer_au_second_membre_interne(const int , DoubleTab& ) const;
99
100 template <bool should_calc_flux, typename Type_Double, typename BC>
101 void contribuer_au_second_membre_bords_(const BC& , const int , const int , const int , DoubleTab& ) const;
102
103 template <typename Type_Double>
104 void contribuer_au_second_membre_bords_(const Echange_externe_impose& , const int , const int , const int, const int , const Front_VF& , DoubleTab& ) const;
105};
106
107#include <Iterateur_VDF_Elem.tpp> // templates specializations ici ;)
108
109#endif /* Iterateur_VDF_Elem_included */
classe Cond_lim Classe generique servant a representer n'importe quelle classe
Definition Cond_lim.h:31
Classe Echange_externe_impose: Cette classe represente le cas particulier de la classe.
class Evaluateur_VDF Classe de base des evaluateurs VDF.
class Front_VF
Definition Front_VF.h:36
OBS_PTR(Correlation_base) corr_flux_parietal_
void ajouter_contribution_autre_pb(const DoubleTab &inco, Matrice_Morse &matrice, const Cond_lim &la_cl, std::map< int, std::pair< int, int > > &) const override
int impr(Sortie &os) const override
void associer_correlation_flux_parietal(const Correlation_base &corr) override
void creer_champ_T_paroi_pour_flux_parietal() override
void completer_() override
Iterateur_VDF_Elem(const Iterateur_VDF_Elem< _TYPE_ > &iter)
const Milieu_base & milieu() const
void contribuer_au_second_membre(DoubleTab &) const override
Evaluateur_VDF & evaluateur() override
const Evaluateur_VDF & evaluateur() const override
void ajouter_blocs(matrices_t mats, DoubleTab &secmem, const tabs_t &semi_impl) const override
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
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
classe Periodique Cette classe represente une condition aux limites periodique.
Definition Periodique.h:31
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