TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Conv_VEF_Face.h
1/****************************************************************************
2* Copyright (c) 2026, 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
17#ifndef Op_Conv_VEF_Face_included
18#define Op_Conv_VEF_Face_included
19
20#include <TRUSTTabs_forward.h>
21#include <Op_Conv_VEF_base.h>
22#include <Motcle.h>
23/*! @brief class Op_Conv_VEF_Face
24 *
25 * Cette classe represente l'operateur de convection associe a une equation de
26 * transport d'un scalaire.
27 * La discretisation est VEF
28 * Le champ convecte est scalaire ou vecteur de type Champ_P1NC
29 * Le schema de convection est du type Decentre ou Centre
30 *
31 *
32 * @sa Operateur_Conv_base
33 */
35{
36
37 Declare_instanciable_sans_constructeur(Op_Conv_VEF_Face);
38
39public:
41 void completer() override;
42 DoubleTab& ajouter(const DoubleTab& , DoubleTab& ) const override;
43 void remplir_fluent() const override;
44 // Methodes pour l implicite.
45 inline void dimensionner(Matrice_Morse& ) const override;
46 inline void modifier_pour_Cl(Matrice_Morse&, DoubleTab&) const override;
47 inline void contribuer_a_avec(const DoubleTab&, Matrice_Morse&) const override;
48 inline void contribuer_au_second_membre(DoubleTab& ) const override;
49 void contribue_au_second_membre(DoubleTab& ) const;
50 virtual void ajouter_contribution(const DoubleTab&, Matrice_Morse& ) const;
51
52 void get_ordre(int& ) const;
53 void get_type_lim(Motcle& ) const;
54 void get_alpha(double& ) const;
55 void get_type_op(int& )const;
56
57protected:
58 DoubleTab& ajouter_gen(const DoubleTab& transporte, const Champ_Inc_base& la_vitesse, DoubleTab& resu) const;
59 void ajouter_contribution_gen(const DoubleTab& transporte, const Champ_Inc_base& la_vitesse, Matrice_Morse& matrice ) const;
60
64 int ordre_ = 1;
65 double alpha_=1.;
68
69 double (*LIMITEUR)(double, double) = nullptr;
70 mutable ArrOfInt traitement_pres_bord_;
72 mutable ArrOfInt type_elem_Cl_;
73 mutable DoubleTab gradient_face_;
74 mutable DoubleTab gradient_elem_;
75};
76
77
78/*! @brief on dimensionne notre matrice au moyen de la methode dimensionner de la classe Op_VEF_Face.
79 *
80 */
82{
83 Op_VEF_Face::dimensionner(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice);
84}
85
86/*! @brief On modifie le second membre et la matrice dans le cas des conditions de dirichlet.
87 *
88 */
89inline void Op_Conv_VEF_Face::modifier_pour_Cl(Matrice_Morse& matrice, DoubleTab& secmem) const
90{
91 Op_VEF_Face::modifier_pour_Cl(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice, secmem);
92}
93
94/*! @brief on assemble la matrice des inconnues implicite.
95 *
96 */
97inline void Op_Conv_VEF_Face::contribuer_a_avec(const DoubleTab& inco, Matrice_Morse& matrice) const
98{
99 ajouter_contribution(inco, matrice);
100}
101
102/*! @brief on ajoute la contribution du second membre.
103 *
104 */
105inline void Op_Conv_VEF_Face::contribuer_au_second_membre(DoubleTab& resu) const
106{
108}
109
110#endif
Classe Champ_Inc_base.
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const override
on assemble la matrice des inconnues implicite.
void ajouter_contribution_gen(const DoubleTab &transporte, const Champ_Inc_base &la_vitesse, Matrice_Morse &matrice) const
ArrOfInt est_une_face_de_dirichlet_
void contribue_au_second_membre(DoubleTab &) const
void contribuer_au_second_membre(DoubleTab &) const override
on ajoute la contribution du second membre.
ArrOfInt traitement_pres_bord_
void get_type_op(int &) const
void get_type_lim(Motcle &) const
void remplir_fluent() const override
DoubleTab & ajouter_gen(const DoubleTab &transporte, const Champ_Inc_base &la_vitesse, DoubleTab &resu) const
type_lim_type type_lim_int
double(* LIMITEUR)(double, double)
type_operateur type_op
void get_ordre(int &) const
void dimensionner(Matrice_Morse &) const override
on dimensionne notre matrice au moyen de la methode dimensionner de la classe Op_VEF_Face.
void get_alpha(double &) const
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
virtual void ajouter_contribution(const DoubleTab &, Matrice_Morse &) const
void modifier_pour_Cl(Matrice_Morse &, DoubleTab &) const override
On modifie le second membre et la matrice dans le cas des conditions de dirichlet.
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
class Op_Conv_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.