TrioCFD 1.9.9_beta
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 */
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Class Champ_Inc_base.
class Champ_P0_VDF Class representing a P0 discrete field per element associated with a discretized d...
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Domaine_Cl_VDF
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_VDF
Definition Domaine_VDF.h:61
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
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
Associates the operator with the domaine_dis, the domaine_Cl_dis, and the unknown of its 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)