TrioCFD 1.9.9_beta
TrioCFD documentation
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 Matrice_Sym class - Base class for the representation of symmetric matrices.
26 *
27 * This class is in fact an "interface" class that provides access to
28 * methods for solving linear systems with a symmetric matrix:
29 * conjugate gradient (preconditioned), SSOR solver, polynomial preconditioner.
30 * This class contains no data members (other than those inherited from Process)
31 * because it is used via multiple inheritance.
32 * It "accesses" the matrix through the matrix-vector multiplication method
33 * DoubleVect& multvect(const DoubleVect&, DoubleVect& resu) const
34 * which is an abstract method.
35 *
36 * @sa Matrice_Morse_Sym, This class does not inherit from Objet_U because it is used via multiple inheritance with other classes already inheriting from Objet_U., Abstract class
37 */
38
40{
41public :
42 virtual ~Matrice_Sym() {};
43 Matrice_Sym():est_definie_(0) {}
44
45 int get_est_definie() const;
46 void set_est_definie(int);
47 void unsymmetrize_stencil(const int nb_lines, const Stencil& symmetric_stencil, Stencil& stencil) const;
48 void unsymmetrize_stencil_and_coefficients(const int nb_lines, const Stencil& symmetric_stencil, const StencilCoeffs& symmetric_coefficients, Stencil& stencil, StencilCoeffs& coefficients) const;
49
50protected :
51 virtual DoubleTab& ajouter_multTab_(const DoubleTab&, DoubleTab& ) const=0 ;
52 virtual DoubleVect& ajouter_multvect_(const DoubleVect&, DoubleVect& ) const=0 ;
53 virtual DoubleVect& ajouter_multvectT_(const DoubleVect&, DoubleVect& ) const=0 ;
54
55private :
56 int est_definie_;
57};
58
59#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:42