TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Diff_VEF_Face_Q1.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
17#ifndef Op_Diff_VEF_Face_Q1_included
18#define Op_Diff_VEF_Face_Q1_included
19
20#include <Op_Diff_VEF_Face.h>
21
22/*! @brief class Op_Diff_VEF_Face_Q1_Q1 Cette classe represente l'operateur de diffusion
23 *
24 * La discretisation est VEF
25 * Le champ diffuse est scalaire
26 *
27 */
29{
30 Declare_instanciable(Op_Diff_VEF_Face_Q1);
31
32public:
33
34 void associer_diffusivite(const Champ_base& ) override;
35 void completer() override;
36 const Champ_base& diffusivite() const override;
37
38 DoubleTab& ajouter(const DoubleTab& , DoubleTab& ) const override;
39 DoubleTab& calculer(const DoubleTab& , DoubleTab& ) const override;
40
41 // Methodes pour l implicite.
42
43 inline void dimensionner(Matrice_Morse& ) const override;
44 inline void modifier_pour_Cl(Matrice_Morse&, DoubleTab&) const override;
45 inline void contribuer_a_avec(const DoubleTab&, Matrice_Morse&) const override;
46 inline void contribuer_au_second_membre(DoubleTab& ) const override;
47 void contribue_au_second_membre(DoubleTab& ) const;
48 void ajouter_contribution(const DoubleTab&, Matrice_Morse& ) const;
49
50 double calculer_dt_stab() const override;
51
52
53protected :
54
55 OBS_PTR(Champ_base) diffusivite_;
56};
57
58/*! @brief on dimensionne notre matrice.
59 *
60 */
61
63{
64 Op_VEF_Face::dimensionner(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice);
65}
66
67inline void Op_Diff_VEF_Face_Q1::modifier_pour_Cl(Matrice_Morse& matrice, DoubleTab& secmem) const
68{
69 Op_VEF_Face::modifier_pour_Cl(le_dom_vef.valeur(),la_zcl_vef.valeur(), matrice, secmem);
70}
71
72
73/*! @brief on assemble la matrice.
74 *
75 */
76
77inline void Op_Diff_VEF_Face_Q1::contribuer_a_avec(const DoubleTab& inco,
78 Matrice_Morse& matrice) const
79{
80 ajouter_contribution(inco, matrice);
81}
82
83/*! @brief on ajoute la contribution du second membre.
84 *
85 */
86
87inline void Op_Diff_VEF_Face_Q1::contribuer_au_second_membre(DoubleTab& resu) const
88{
90}
91
92#endif
93
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
class Op_Diff_VEF_Face_Q1_Q1 Cette classe represente l'operateur de diffusion
const Champ_base & diffusivite() const override
void associer_diffusivite(const Champ_base &) override
associe le champ de diffusivite
double calculer_dt_stab() const override
Calcul dt_stab.
void contribuer_au_second_membre(DoubleTab &) const override
on ajoute la contribution du second membre.
void dimensionner(Matrice_Morse &) const override
on dimensionne notre matrice.
OBS_PTR(Champ_base) diffusivite_
void contribue_au_second_membre(DoubleTab &) const
void modifier_pour_Cl(Matrice_Morse &, DoubleTab &) const override
DOES NOTHING - to override in derived classes.
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
void ajouter_contribution(const DoubleTab &, Matrice_Morse &) const
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const override
on assemble la matrice.
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
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.