TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Matrice_Bloc_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_Bloc_Sym_included
17#define Matrice_Bloc_Sym_included
18
19
20
21/*! @brief class Matrice_Bloc_Sym Cette classe derive de Matrice_Bloc et Matrice_Sym.
22 *
23 *
24 *
25 * @sa Matrice_Bloc Matrice_Sym
26 */
27
28#include <Matrice_Bloc.h>
29#include <Matrice_Sym.h>
30
31////////////////////////////////////////////////////////////
32//
33// CLASS : Matrice_Bloc_Sym
34//
35////////////////////////////////////////////////////////////
36
37/*----------------------------------------------------------------------------*/
38/* */
39/* classe Matrice_Bloc_Sym : stockage des blocs d`une matrice bloc A(N,M) */
40/* */
41/* le stockage est effectue ligne par ligne */
42/* dans un vecteur de type VECT(Matrice). */
43/* On utilise: */
44/* blocs_ = vecteur de matrices Aij */
45/* N_ = 1ere dim de blocs_ */
46/* M_ = 2eme dim de blocs_ */
47/* nb_blocs_ = nb total de blocs (= N_ * M_) */
48/* */
49/* Forme matricielle: */
50/* */
51/* [A11 A12 ... A1M] */
52/* [... A22 ... A2M] */
53/* A = [... ... ... ...] blocs_=[A11,A12,...,A1M,A21,A22,...,A2M, */
54/* [... ... ... ANM] ,...,AN1,AN2,...,ANM] */
55/* */
56/* */
57/*----------------------------------------------------------------------------*/
58
60
62{
63 Declare_instanciable_sans_constructeur(Matrice_Bloc_Sym);
64
65public:
66
67 // Constructeurs :
68 Matrice_Bloc_Sym(int N=0, int M=0);
69
70 // Impression
71 Sortie& imprimer(Sortie& s) const override;
72 Sortie& imprimer_formatte(Sortie& s) const override;
73
74 //Multiplications
75 DoubleVect& ajouter_multvect_(const DoubleVect& x, DoubleVect& y) const override;
76 DoubleVect& ajouter_multvectT_(const DoubleVect& x, DoubleVect& y) const override;
77 DoubleTab& ajouter_multTab_(const DoubleTab& x, DoubleTab& y) const override;
78
79 //Conversions:
81
82 // Dimensionnement
83 void dimensionner(int N, int M) override; // dimensionnement de blocs_
84
85 // Acces aux blocs: renvoie le bloc Aij avec A(N,M)
86 const Matrice& get_bloc(int i, int j) const override; // (0<=i<N , i<=j<M)
87 Matrice& get_bloc(int i, int j) override;
88
89 void get_stencil(Stencil& stencil) const override;
90
91 void get_symmetric_stencil(Stencil& stencil) const override;
92
93 void get_stencil_and_coefficients(Stencil& stencil, StencilCoeffs& coefficients) const override;
94
95 void get_symmetric_stencil_and_coefficients(Stencil& stencil, StencilCoeffs& coefficients) const override;
96
99};
100
101#endif
const Matrice & get_bloc(int i, int j) const override
void BlocSymToMatMorseSym(Matrice_Morse_Sym &mat) const
void dimensionner(int N, int M) override
void get_stencil(Stencil &stencil) const override
void get_stencil_and_coefficients(Stencil &stencil, StencilCoeffs &coefficients) const override
DoubleVect & ajouter_multvect_(const DoubleVect &x, DoubleVect &y) const override
DoubleTab & ajouter_multTab_(const DoubleTab &x, DoubleTab &y) const override
void get_symmetric_stencil_and_coefficients(Stencil &stencil, StencilCoeffs &coefficients) const override
Sortie & imprimer(Sortie &s) const override
DoubleVect & ajouter_multvectT_(const DoubleVect &x, DoubleVect &y) const override
Sortie & imprimer_formatte(Sortie &s) const override
bool check_symmetric_block_matrix_structure() const
void assert_check_symmetric_block_matrix_structure() const
void get_symmetric_stencil(Stencil &stencil) const override
Matrice_Bloc_Sym(int N=0, int M=0)
Matrice_Bloc(int N=0, int M=0)
Classe Matrice_Morse_Sym Represente une matrice M (creuse) symetrique stockee au format Morse.
Classe Matrice Classe generique de la hierarchie des matrices.
Definition Matrice.h:34
friend class Sortie
Definition Objet_U.h:75