TrioCFD 1.9.9_beta
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 Symmetric block matrix class. Derives from both Matrice_Bloc and 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/* class Matrice_Bloc_Sym: storage of blocks of a block matrix A(N,M) */
40/* */
41/* storage is done row by row */
42/* in a vector of type VECT(Matrice). */
43/* Uses: */
44/* blocs_ = vector of matrices Aij */
45/* N_ = 1st dim of blocs_ */
46/* M_ = 2nd dim of blocs_ */
47/* nb_blocs_ = total number of blocks (= N_ * M_) */
48/* */
49/* Matrix form: */
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 // Printing
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 // Sizing
83 void dimensionner(int N, int M) override; // sizing of blocs_
84
85 // Block access: returns the block Aij with 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)
Matrice_Morse_Sym class - Represents a sparse symmetric matrix M stored in Morse format.
Matrice class - Generic class in the matrix hierarchy.
Definition Matrice.h:34
friend class Sortie
Definition Objet_U.h:70