TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Op_Diff_PolyMAC_HFV_base.h
1/****************************************************************************
2* Copyright (c) 2025, 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_HFV_base_included
17#define Op_Diff_PolyMAC_HFV_base_included
18
19#include <Op_Diff_PolyMAC_CDO_Gen_base.h>
20
21/*! @brief class Op_Diff_PolyMAC_HFV_base
22 *
23 * Classe de base des operateurs de diffusion PolyMAC_HFV
24 *
25 *
26 */
28{
29 Declare_base(Op_Diff_PolyMAC_HFV_base);
30public:
31 void completer() override;
32
33 void mettre_a_jour(double t) override;
34
35 /* versions etendues de dimensionner/ajouter_blocs permettant de traiter les seules variables auxiliaires */
36 virtual void dimensionner_blocs_ext(int aux_only, matrices_t matrices, const tabs_t& semi_impl = { }) const = 0;
37 virtual void ajouter_blocs_ext(int aux_only, matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = { }) const = 0;
38
39 /* implementations de dimensionner/ajouter_blocs a partir de ces methodes */
40 int has_interface_blocs() const override { return 1; }
41
42 void dimensionner_blocs(matrices_t matrices, const tabs_t& semi_impl = { }) const override
43 {
44 dimensionner_blocs_ext(0, matrices, semi_impl);
45 }
46
47 void ajouter_blocs(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = { }) const override
48 {
49 ajouter_blocs_ext(0, matrices, secmem, semi_impl);
50 }
51
52 void update_nu() const override; //mise a jour
53
54protected:
55 double t_last_nu_ = -1e10; //pour detecter quand on doit recalculer nu, les variables auxiliaires
56
57 /* gestion des variables auxiliaires en semi-implicite */
58 void update_aux(double t) const;
59 mutable double t_last_aux_ = -1e10; /* dernier temps auquel on les a calcule */
60 mutable int use_aux_ = 0; /* les variables auxiliaires sont-elles stockees dans var_aux ? */
61 mutable Matrice_Bloc mat_aux; /* systeme a resoudre : mat.var_aux = secmem */
62 mutable DoubleTab var_aux;
63 mutable SolveurSys solv_aux; //solveur
64};
65
66#endif /* Op_Diff_PolyMAC_HFV_base_included */
class Op_Diff_PolyMAC_CDO_Gen_base
class Op_Diff_PolyMAC_HFV_base
virtual void ajouter_blocs_ext(int aux_only, matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={ }) const =0
int has_interface_blocs() const override
void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={ }) const override
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={ }) const override
void mettre_a_jour(double t) override
DOES NOTHING - to override in derived classes.
virtual void dimensionner_blocs_ext(int aux_only, matrices_t matrices, const tabs_t &semi_impl={ }) const =0
class SolveurSys Un SolveurSys represente n'importe qu'elle classe
Definition SolveurSys.h:32