TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Diff_K_Omega_VDF_base.h
1/****************************************************************************
2* Copyright (c) 2023, 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 Op_Diff_K_Omega_VDF_base_included
17#define Op_Diff_K_Omega_VDF_base_included
18
19#include <Eval_Diff_K_Omega_VDF_leaves.h>
20#include <Op_Dift_VDF_base.h>
21#include <Iterateur_VDF_Elem.h>
22#include <Op_VDF_Elem.h>
23
24
25
26
28{
29 Declare_base(Op_Diff_K_Omega_VDF_base);
30public:
31 Op_Diff_K_Omega_VDF_base(const Iterateur_VDF_base& iter_base) { iter = iter_base; }
32
33 void completer() override;
34 void associer_diffusivite(const Champ_base& ch_diff) override;
36 void modifier_pour_Cl(Matrice_Morse&, DoubleTab&) const override;
38 const Champ_base& diffusivite() const override;
39
40 virtual inline void mettre_a_jour_diffusivite() const { assert(mon_equation); }
41
42 inline DoubleTab& calculer(const DoubleTab& inco, DoubleTab& resu) const override
43 {
45 return iter->calculer(inco, resu);
46 }
47
48 inline OWN_PTR(Iterateur_VDF_base)& get_iter() { return iter; }
49
50 inline int has_interface_blocs() const override { return 1; }
51
52 void dimensionner_blocs(matrices_t matrices, const tabs_t& semi_impl) const override;
53 void ajouter_blocs(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl) const override;
54
55protected:
57};
58
59// one for all !
60template<typename OP_TYPE>
62{
63protected:
64
65 template <typename EVAL_TYPE>
66 inline void associer_impl(const Domaine_dis_base& domaine_dis, const Domaine_Cl_dis_base& domaine_cl_dis, const Champ_Inc_base& ch_diffuse)
67 {
68 const Champ_P0_VDF& inco = ref_cast(Champ_P0_VDF,ch_diffuse);
69 const Domaine_VDF& zvdf = ref_cast(Domaine_VDF,domaine_dis);
70 const Domaine_Cl_VDF& zclvdf = ref_cast(Domaine_Cl_VDF,domaine_cl_dis);
71 iter_()->associer(zvdf, zclvdf,static_cast<OP_TYPE&>(*this));
72 EVAL_TYPE& eval_diff = static_cast<EVAL_TYPE&> (iter_()->evaluateur());
73 eval_diff.associer_domaines(zvdf, zclvdf );
74 eval_diff.associer_inconnue(inco );
75 }
76
77private:
78 inline OWN_PTR(Iterateur_VDF_base)& iter_() { return static_cast<OP_TYPE *>(this)->get_iter(); } // CRTP pour recuperer l'iter
79};
80
81#endif /* Op_Diff_K_Omega_VDF_base_included */
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
Classe Champ_Inc_base.
classe Champ_P0_VDF Classe qui represente un champ discret P0 par element associe a un domaine discre...
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
class Domaine_Cl_VDF
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
class Domaine_VDF
Definition Domaine_VDF.h:64
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
void associer_impl(const Domaine_dis_base &domaine_dis, const Domaine_Cl_dis_base &domaine_cl_dis, const Champ_Inc_base &ch_diffuse)
int has_interface_blocs() const override
Op_Diff_K_Omega_VDF_base(const Iterateur_VDF_base &iter_base)
void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl) const override
void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl) const override
void associer_diffusivite(const Champ_base &ch_diff) override
virtual void mettre_a_jour_diffusivite() const
const Champ_Fonc_base & diffusivite_turbulente() const
const Champ_base & diffusivite() const override
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
void modifier_pour_Cl(Matrice_Morse &, DoubleTab &) const override
DOES NOTHING - to override in derived classes.
OWN_PTR(Iterateur_VDF_base) &get_iter()
DoubleTab & calculer(const DoubleTab &inco, DoubleTab &resu) const override
OWN_PTR(Iterateur_VDF_base) iter
Op_Dift_VDF_base(const Iterateur_VDF_base &iter_base)