TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
SSOR.h
1/****************************************************************************
2* Copyright (c) 2022, 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 SSOR_included
17#define SSOR_included
18
19#include <Precond_base.h>
20#include <TRUSTTab.h>
21
24
25class SSOR : public Precond_base
26{
27 Declare_instanciable_sans_constructeur(SSOR);
28public:
29 SSOR();
30
31 double get_omega() { return omega_; }
32 void set_omega(double x)
33 {
34 omega_ = x;
36 }
37
38 // SSOR does not use the virtual space of the input vector:
39 int get_flag_updated_input() const override { return 0; }
40
41protected:
42 int preconditionner_(const Matrice_Base&, const DoubleVect& secmem, DoubleVect& solution) override;
43 void prepare_(const Matrice_Base&, const DoubleVect& secmem) override;
44
45 void ssor(const Matrice_Morse_Sym&, DoubleVect&);
46 void ssor(const Matrice_Bloc_Sym&, DoubleVect&);
47
48 double omega_;
50 // Membres initialises par la methode prepare()
51 // Drapeaux des items a traiter (meme structure que le second membre) (traitement des items communs si algo_items_communs_)
53 // pour chaque partie du vecteur, y a-t-il des items communs ?
55 // Le descripteur du second membre (utiliser pour verifier qu'on a initialise l'algo)
58 // Precalcul de omega divise par le coefficient diagonal de la matrice
59 ArrOfDouble omega_diag_;
60};
61
62#endif /* SSOR_included */
: Cette classe est un OWN_PTR mais l'objet pointe est partage entre plusieurs
Definition MD_Vector.h:48
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.
void reinit(Init_Status x=REINIT_ALL)
this method must be called before preconditionner() whenever the matrix changes (coefficients only or...
SSOR()
Definition SSOR.cpp:28
void prepare_(const Matrice_Base &, const DoubleVect &secmem) override
this method must be overloaded if some preparation is necessary.
Definition SSOR.cpp:50
ArrOfDouble omega_diag_
Definition SSOR.h:59
double get_omega()
Definition SSOR.h:31
int algo_items_communs_
Definition SSOR.h:54
void set_omega(double x)
Definition SSOR.h:32
int line_size_
Definition SSOR.h:57
void ssor(const Matrice_Morse_Sym &, DoubleVect &)
Definition SSOR.cpp:687
int algo_fortran_
Definition SSOR.h:49
int avec_assert_
Definition SSOR.h:49
MD_Vector md_secmem_
Definition SSOR.h:56
double omega_
Definition SSOR.h:48
IntTab items_a_traiter_
Definition SSOR.h:52
int get_flag_updated_input() const override
Definition SSOR.h:39
int preconditionner_(const Matrice_Base &, const DoubleVect &secmem, DoubleVect &solution) override
Calcule la solution du systeme lineaire: A * solution = b avec la methode de relaxation SSOR.
Definition SSOR.cpp:92