TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Matrice_Sym.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 Matrice_Sym_included
17#define Matrice_Sym_included
18
19#define _DEGRE_POLY_ 5
20#define _SEUIL_GCP_ 1e-12
21
22#include <TRUSTTabs_forward.h>
23#include <Matrice_Base.h>
24
25/*! @brief Classe Matrice_Sym Cette classe est la classe de base pour la representantion des
26 *
27 * matrices symetriques. Cette classe est en fait une classe "interface"
28 * qui donne acces a des methodes de resolutions de systemes lineaires
29 * dont la matrice est symetrique: Gradient conjugue (preconditionne),
30 * solveur SSOR, precondtionneur polynomial.
31 * Cette classe ne contient pas de membre de donnee (hors mis ceux herites de
32 * Process) car elle sera utilisee par heritage multiple.
33 * Elle "accede" a la matrice via la methode de multiplication matrice-vecteur
34 * DoubleVect& multvect(const DoubleVect&, DoubleVect& resu) const
35 * qui est une methode abstraite.
36 *
37 * @sa Matrice_Morse_Sym, Cette classe n'herite pas d'objet U car elle est utilisee par, heritage multiple avec d'autre classe heritant deja d'objet U., Classe abstraite
38 */
39
41{
42public :
43 virtual ~Matrice_Sym() {};
44 Matrice_Sym():est_definie_(0) {}
45
46 int get_est_definie() const;
47 void set_est_definie(int);
48 void unsymmetrize_stencil(const int nb_lines, const Stencil& symmetric_stencil, Stencil& stencil) const;
49 void unsymmetrize_stencil_and_coefficients(const int nb_lines, const Stencil& symmetric_stencil, const StencilCoeffs& symmetric_coefficients, Stencil& stencil, StencilCoeffs& coefficients) const;
50
51protected :
52 virtual DoubleTab& ajouter_multTab_(const DoubleTab&, DoubleTab& ) const=0 ;
53 virtual DoubleVect& ajouter_multvect_(const DoubleVect&, DoubleVect& ) const=0 ;
54 virtual DoubleVect& ajouter_multvectT_(const DoubleVect&, DoubleVect& ) const=0 ;
55
56private :
57 int est_definie_;
58};
59
60#endif
virtual DoubleVect & ajouter_multvectT_(const DoubleVect &, DoubleVect &) const =0
virtual DoubleTab & ajouter_multTab_(const DoubleTab &, DoubleTab &) const =0
virtual DoubleVect & ajouter_multvect_(const DoubleVect &, DoubleVect &) const =0
void set_est_definie(int)
int get_est_definie() const
void unsymmetrize_stencil_and_coefficients(const int nb_lines, const Stencil &symmetric_stencil, const StencilCoeffs &symmetric_coefficients, Stencil &stencil, StencilCoeffs &coefficients) const
void unsymmetrize_stencil(const int nb_lines, const Stencil &symmetric_stencil, Stencil &stencil) const
virtual ~Matrice_Sym()
Definition Matrice_Sym.h:43