TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Op_Diff_VEF_Anisotrope_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 Op_Diff_VEF_Anisotrope_Face_included
17#define Op_Diff_VEF_Anisotrope_Face_included
18
19#include <Op_Diff_VEF_base.h>
20#include <Champ_base.h>
21#include <TRUST_Ref.h>
22
23
24class Matrice_Morse;
25
27{
28 Declare_instanciable( Op_Diff_VEF_Anisotrope_Face ) ;
29public:
30 void associer_diffusivite(const Champ_base& ) override;
31 void completer() override;
32 const Champ_base& diffusivite() const override;
33
34 DoubleTab& ajouter(const DoubleTab& , DoubleTab& ) const override;
35 DoubleTab& calculer(const DoubleTab& , DoubleTab& ) const override;
36 void verifier() const;
37
38 // Methodes pour l implicite.
39 inline void dimensionner(Matrice_Morse& ) const override;
40 inline void modifier_pour_Cl(Matrice_Morse&, DoubleTab&) const override;
41 inline void contribuer_a_avec(const DoubleTab&, Matrice_Morse&) const override;
42 inline void contribuer_au_second_membre(DoubleTab& ) const override;
43 void contribue_au_second_membre(DoubleTab& ) const;
44
45 void ajouter_contribution(const DoubleTab&, Matrice_Morse& ) const;
46 void ajouter_contribution_multi_scalaire(const DoubleTab&, Matrice_Morse& ) const;
47
48 void ajouter_cas_scalaire(const DoubleTab& inconnue,
49 DoubleTab& resu, DoubleTab& flux_bords,
50 DoubleTab& nu,
51 const Domaine_Cl_VEF& domaine_Cl_VEF,
52 const Domaine_VEF& domaine_VEF ) const;
53 void ajouter_cas_vectoriel(const DoubleTab& inconnue,
54 DoubleTab& resu, DoubleTab& flux_bords,
55 DoubleTab& nu,
56 const Domaine_Cl_VEF& domaine_Cl_VEF,
57 const Domaine_VEF& domaine_VEF,
58 int nb_comp) const;
59 void ajouter_cas_multi_scalaire(const DoubleTab& inconnue,
60 DoubleTab& resu, DoubleTab& flux_bords,
61 DoubleTab& nu,
62 const Domaine_Cl_VEF& domaine_Cl_VEF,
63 const Domaine_VEF& domaine_VEF,
64 int nb_comp) const;
65
66
67protected :
68
69
70 OBS_PTR(Champ_base) diffusivite_;
71
72 //DoubleVect porosite_face;
73};
74
75/*! @brief on dimensionne notre matrice.
76 *
77 */
78
80{
81 Op_VEF_Face::dimensionner(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice);
82}
83
84inline void Op_Diff_VEF_Anisotrope_Face::modifier_pour_Cl(Matrice_Morse& matrice, DoubleTab& secmem) const
85{
86 Op_VEF_Face::modifier_pour_Cl(le_dom_vef.valeur(),la_zcl_vef.valeur(), matrice, secmem);
87}
88
89
90/*! @brief on assemble la matrice.
91 *
92 */
93
94inline void Op_Diff_VEF_Anisotrope_Face::contribuer_a_avec(const DoubleTab& inco,
95 Matrice_Morse& matrice) const
96{
97 const Champ_base& inconnue = equation().inconnue();
98 const Nature_du_champ nature_champ = inconnue.nature_du_champ();
99 if (nature_champ!=multi_scalaire)
100 ajouter_contribution(inco, matrice);
101 else
103}
104
105/*! @brief on ajoute la contribution du second membre.
106 *
107 */
108
110{
112}
113
114#endif /* Op_Diff_VEF_Anisotrope_Face_included */
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
class Domaine_VEF
Definition Domaine_VEF.h:54
virtual const Champ_Inc_base & inconnue() const =0
virtual Nature_du_champ nature_du_champ() const
Definition Field_base.h:77
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
void ajouter_cas_multi_scalaire(const DoubleTab &inconnue, DoubleTab &resu, DoubleTab &flux_bords, DoubleTab &nu, const Domaine_Cl_VEF &domaine_Cl_VEF, const Domaine_VEF &domaine_VEF, int nb_comp) const
void modifier_pour_Cl(Matrice_Morse &, DoubleTab &) const override
DOES NOTHING - to override in derived classes.
OBS_PTR(Champ_base) diffusivite_
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
void associer_diffusivite(const Champ_base &) override
associe le champ de diffusivite
void ajouter_contribution(const DoubleTab &, Matrice_Morse &) const
void dimensionner(Matrice_Morse &) const override
on dimensionne notre matrice.
void ajouter_cas_scalaire(const DoubleTab &inconnue, DoubleTab &resu, DoubleTab &flux_bords, DoubleTab &nu, const Domaine_Cl_VEF &domaine_Cl_VEF, const Domaine_VEF &domaine_VEF) const
void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const override
on assemble la matrice.
void contribuer_au_second_membre(DoubleTab &) const override
on ajoute la contribution du second membre.
const Champ_base & diffusivite() const override
void ajouter_cas_vectoriel(const DoubleTab &inconnue, DoubleTab &resu, DoubleTab &flux_bords, DoubleTab &nu, const Domaine_Cl_VEF &domaine_Cl_VEF, const Domaine_VEF &domaine_VEF, int nb_comp) const
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
void ajouter_contribution_multi_scalaire(const DoubleTab &, Matrice_Morse &) const
void contribue_au_second_membre(DoubleTab &) const
class Op_Diff_VEF_base
void dimensionner(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &) const
Dimensionnement de la matrice qui devra recevoir les coefficients provenant de la convection,...
void modifier_pour_Cl(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &, DoubleTab &) const
Modification des coef de la matrice et du second membre pour les conditions de Dirichlet.
DoubleTab & flux_bords()