TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Diff_PolyMAC_CDO_Elem.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#ifndef Op_Diff_PolyMAC_CDO_Elem_included
17#define Op_Diff_PolyMAC_CDO_Elem_included
18
19#include <Op_Diff_PolyMAC_CDO_base.h>
20class Matrice_Morse;
21
23{
24 Declare_instanciable_sans_constructeur( Op_Diff_PolyMAC_CDO_Elem ) ;
25public :
27 DoubleTab& ajouter(const DoubleTab& , DoubleTab& ) const override;
28 virtual void calculer_flux_bord(const DoubleTab& inco) const = delete;
29 void contribuer_a_avec(const DoubleTab&, Matrice_Morse&) const override;
30 void modifier_pour_Cl(Matrice_Morse& la_matrice, DoubleTab& secmem) const override { }
31 void completer() override;
32 void mettre_a_jour(double t) override
33 {
35 delta_int_a_jour_ = delta_a_jour_ = (stab_ ? 0 : 1);
36 }
37
38 void dimensionner(Matrice_Morse& mat) const override;
39 void dimensionner_bloc(Matrice_Morse& mat, const int p) const;
40 void contribuer_bloc(const DoubleTab& inco, Matrice_Morse& matrice, const int i) const;
41
42 void dimensionner_termes_croises(Matrice_Morse&, const Probleme_base& autre_pb, int nl, int nc) const override;
43 void ajouter_termes_croises(const DoubleTab& inco, const Probleme_base& autre_pb, const DoubleTab& autre_inco, DoubleTab& resu) const override;
44 void contribuer_termes_croises(const DoubleTab& inco, const Probleme_base& autre_pb, const DoubleTab& autre_inco, Matrice_Morse& matrice) const override;
45 void update_auxiliary_variables(DoubleTab& inco);
47
48 /* correction non lineaire de Le Potier / Mahamane : facteurs delta_e aux elements, delta_f aux faces */
49 int stab_ = 0; //1 si elle est activee
50 void update_delta_int() const; //met a jour le tableau intermediaire delta_f_int et remplit delta_e
51 mutable DoubleTab delta_f_int; //tableaux intermediaires : delta_x_int(i, n, 0/1) : numerateur / denominateur de l'expression de delta_e/f (sans contrib externe)
52 void update_delta() const; //met a jour le tableau final delta_f
53 mutable DoubleTab delta_e, delta_f; //facteurs finaux (apres prise en compte des CL Echange_contact)
54
55private:
56 mutable int delta_int_a_jour_ = 0, delta_a_jour_ = 0; //si on doit calculer update_delta_{int,}_
57};
58
59/* comme des synonymes, mais avec l'info de ce qu'on est dans que_suis_je() */
64
66{
67 Declare_instanciable( Op_Dift_PolyMAC_CDO_Elem );
68};
69
74
75#endif /* Op_Diff_PolyMAC_CDO_Elem_included */
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
void dimensionner_bloc(Matrice_Morse &mat, const int p) const
virtual void calculer_flux_bord(const DoubleTab &inco) const =delete
void contribuer_bloc(const DoubleTab &inco, Matrice_Morse &matrice, const int i) const
void mettre_a_jour(double t) override
DOES NOTHING - to override in derived classes.
DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const override
void contribuer_termes_croises(const DoubleTab &inco, const Probleme_base &autre_pb, const DoubleTab &autre_inco, Matrice_Morse &matrice) const override
void dimensionner(Matrice_Morse &mat) const override
DOES NOTHING - to override in derived classes.
void ajouter_termes_croises(const DoubleTab &inco, const Probleme_base &autre_pb, const DoubleTab &autre_inco, DoubleTab &resu) const override
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
DOES NOTHING - to override in derived classes.
void dimensionner_termes_croises(Matrice_Morse &, const Probleme_base &autre_pb, int nl, int nc) const override
void modifier_pour_Cl(Matrice_Morse &la_matrice, DoubleTab &secmem) const override
DOES NOTHING - to override in derived classes.
void mettre_a_jour(double t) override
DOES NOTHING - to override in derived classes.
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.