TrioCFD 1.9.9_beta
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 * This class represents the convection operator associated with a scalar transport equation.
26 * The discretization is VEF.
27 * The convected field is a scalar or vector of type Champ_P1NC.
28 * The convection scheme is of upwind or centered type.
29 *
30 *
31 * @sa Operateur_Conv_base
32 */
34{
35
36 Declare_instanciable_sans_constructeur(Op_Conv_VEF_Face);
37
38public:
40 void completer() override;
41 DoubleTab& ajouter(const DoubleTab& , DoubleTab& ) const override;
42 void remplir_fluent() const override;
43 // Methods for implicit scheme.
44 inline void dimensionner(Matrice_Morse& ) const override;
45 inline void modifier_pour_Cl(Matrice_Morse&, DoubleTab&) const override;
46 inline void contribuer_a_avec(const DoubleTab&, Matrice_Morse&) const override;
47 inline void contribuer_au_second_membre(DoubleTab& ) const override;
48 void contribue_au_second_membre(DoubleTab& ) const;
49 virtual void ajouter_contribution(const DoubleTab&, Matrice_Morse& ) const;
50
51 void get_ordre(int& ) const;
52 void get_type_lim(Motcle& ) const;
53 void get_alpha(double& ) const;
54 void get_type_op(int& )const;
55
56protected:
57 DoubleTab& ajouter_gen(const DoubleTab& transporte, const Champ_Inc_base& la_vitesse, DoubleTab& resu) const;
58 void ajouter_contribution_gen(const DoubleTab& transporte, const Champ_Inc_base& la_vitesse, Matrice_Morse& matrice ) const;
59
63 int ordre_ = 1;
64 double alpha_=1.;
67
68 double (*LIMITEUR)(double, double) = nullptr;
69 mutable ArrOfInt traitement_pres_bord_;
71 mutable ArrOfInt type_elem_Cl_;
72 mutable DoubleTab gradient_face_;
73 mutable DoubleTab gradient_elem_;
74};
75
76
77/*! @brief Size the matrix using the dimensionner method of class Op_VEF_Face.
78 *
79 */
81{
82 Op_VEF_Face::dimensionner(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice);
83}
84
85/*! @brief Modify the right-hand side and the matrix for Dirichlet conditions.
86 *
87 */
88inline void Op_Conv_VEF_Face::modifier_pour_Cl(Matrice_Morse& matrice, DoubleTab& secmem) const
89{
90 Op_VEF_Face::modifier_pour_Cl(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice, secmem);
91}
92
93/*! @brief Assemble the implicit unknown matrix.
94 *
95 */
96inline void Op_Conv_VEF_Face::contribuer_a_avec(const DoubleTab& inco, Matrice_Morse& matrice) const
97{
98 ajouter_contribution(inco, matrice);
99}
100
101/*! @brief Add the contribution to the right-hand side.
102 *
103 */
104inline void Op_Conv_VEF_Face::contribuer_au_second_membre(DoubleTab& resu) const
105{
107}
108
109#endif
Class Champ_Inc_base.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
A character string (Nom) in uppercase.
Definition Motcle.h:26
void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const override
Assemble the implicit unknown matrix.
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
Add the contribution to the right-hand side.
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
Size the matrix using the dimensionner method of class 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
Modify the right-hand side and the matrix for Dirichlet conditions.
void completer() override
Associates the operator with the domaine_dis, the domaine_Cl_dis, and the unknown of its equation.
class Op_Conv_VEF_base
void dimensionner(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &) const
Dimensioning of the matrix that will receive the coefficients from convection and diffusion for the f...
void modifier_pour_Cl(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &, DoubleTab &) const
Modify the matrix coefficients and the right-hand side for Dirichlet boundary conditions.