TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Solv_Gmres.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 Solv_Gmres_included
17#define Solv_Gmres_included
18
19#include <TRUSTTabs_forward.h>
20#include <solv_iteratif.h>
21#include <TRUSTVects.h>
22#include <TRUSTTab.h>
24class Matrice_Morse;
25class Param;
26
28{
29 Declare_instanciable_sans_constructeur(Solv_Gmres);
30
31public :
32
33 Solv_Gmres();
34 int resoudre_systeme(const Matrice_Base&, const DoubleVect&, DoubleVect& ) override;
35 inline int resoudre_systeme(const Matrice_Base& M, const DoubleVect& A, DoubleVect& B, int niter_max) override
36 {
37 return resoudre_systeme(M, A, B);
38 }
39
40protected :
41 void set_param(Param& param) const override;
42 int lire_motcle_non_standard(const Motcle&, Entree&) override;
43
44 int Gmres(const Matrice_Morse&, const DoubleVect&, DoubleVect& );
45 int gmres_local( const Matrice_Morse& A, const DoubleVect& b, DoubleVect& tab_x1);
46
47 DoubleVects v; //espcace Krilov
48 bool is_local_gmres = false;
49 bool precond_diag_ = false;
51 DoubleVect tab_v0, tab_v1, tab_Diag; // Created once
52 DoubleTab h;
53 DoubleVect r;
54 DoubleVect h_loc, dh_loc;
55};
56
57#endif /* Solv_Gmres_included */
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Classe Matrice_Base Classe de base de la hierarchie des matrices.
Classe Matrice_Morse_Sym Represente une matrice M (creuse) symetrique stockee au format Morse.
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
int resoudre_systeme(const Matrice_Base &, const DoubleVect &, DoubleVect &) override
DoubleVect h_loc
Definition Solv_Gmres.h:54
DoubleVect tab_v1
Definition Solv_Gmres.h:51
DoubleVect tab_v0
Definition Solv_Gmres.h:51
int Gmres(const Matrice_Morse &, const DoubleVect &, DoubleVect &)
int nb_it_max_
Definition Solv_Gmres.h:50
DoubleVect r
Definition Solv_Gmres.h:53
DoubleVect tab_Diag
Definition Solv_Gmres.h:51
int gmres_local(const Matrice_Morse &A, const DoubleVect &b, DoubleVect &tab_x1)
int controle_residu_
Definition Solv_Gmres.h:50
DoubleVect dh_loc
Definition Solv_Gmres.h:54
DoubleVects v
Definition Solv_Gmres.h:47
bool precond_diag_
Definition Solv_Gmres.h:49
int resoudre_systeme(const Matrice_Base &M, const DoubleVect &A, DoubleVect &B, int niter_max) override
Definition Solv_Gmres.h:35
void set_param(Param &param) const override
int dim_espace_Krilov_
Definition Solv_Gmres.h:50
DoubleTab h
Definition Solv_Gmres.h:52
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
bool is_local_gmres
Definition Solv_Gmres.h:48