TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Matrice_Grossiere.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_Grossiere_included
17#define Matrice_Grossiere_included
18
19#include <TRUSTTab.h>
20#include <TRUSTLists.h>
21#include <TRUSTLists.h>
22#include <TRUSTTab.h>
23#include <MD_Vector_std.h>
24#include <Matrice_Bloc.h>
25#include <IJK_Field.h>
26
28{
29public:
30
31 template <typename _TYPE_, typename _TYPE_ARRAY_>
33
34 template <typename _TYPE_, typename _TYPE_ARRAY_>
36
37 const int& renum(int i, int j, int k) const
38 {
39 return renum_(k+1, j+1, i+1);
40 }
41
42 const Matrice_Base& matrice() const
43 {
44 return mat_;
45 }
46 const MD_Vector& md_vector() const
47 {
48 return md_;
49 }
50
51protected:
52 void ajoute_coeff(int i, int j, int k,
53 int i_voisin, int j_voisin, int k_voisin,
54 const double coeff, const double shear_perio);
55 void ajoute_coeff(int i, int j, int k,
56 int i_voisin, int j_voisin, int k_voisin,
57 const double coeff);
58
59 void ajoute_coeff2(int i, int j, int k,
60 int i_voisin, int j_voisin, int k_voisin,
61 const double coeff, const double shear_perio);
62 void ajoute_coeff2(int i, int j, int k,
63 int i_voisin, int j_voisin, int k_voisin,
64 const double coeff);
65
66 int& renum(int i, int j, int k)
67 {
68 return renum_(k+1, j+1, i+1);
69 }
70
71
72 void add_virt_bloc(int pe, int& count, int imin, int jmin, int kmin,
73 int imax, int jmax, int kmax,
74 ArrOfInt& virt_blocs);
75
76 void add_dist_bloc(int pe, int imin, int jmin, int kmin,
77 int imax, int jmax, int kmax,
78 ArrOfInt& items_to_send);
79
80
81 void interpolation_for_shear_periodicity(const int i, const int send_i /*offset2*/, const double istmp/*istmp*/,
82 const int real_size_i /*ni*/, const double shear_perio);
83
84
86
88
89 // renum_(k+1,j+1,i+1) = indice de l'inconnue dans le vecteur inconnue de la matrice
93 IntTab renum_;
94 ArrOfInt ii_p_;
95 ArrOfInt ii_m_;
98
99
100 IntLists voisins_;
101 DoubleLists coeffs_;
102 DoubleVect coeff_diag_;
103
105 DoubleLists coeffs_virt_;
106
107 // Pour la matrice complète de pression (trop rigolo)
108 IntLists voisins_2_;
109 DoubleLists coeffs_2_;
110
112 DoubleLists coeffs_virt_2_;
113};
114
115#include <Matrice_Grossiere.tpp>
116#endif
: This class is an IJK_Field_local with parallel informations.
: 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.
const Matrice_Base & matrice() const
ArrOfDouble ponderation_shear_p_
const MD_Vector & md_vector() const
void build_matrix_test(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &coeffs_face)
void build_matrix(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &coeffs_face)
const int & renum(int i, int j, int k) const
void interpolation_for_shear_periodicity(const int i, const int send_i, const double istmp, const int real_size_i, const double shear_perio)
void ajoute_coeff(int i, int j, int k, int i_voisin, int j_voisin, int k_voisin, const double coeff, const double shear_perio)
ajoute deux coefficients diagonal/extra-diagonal a la matrice
int & renum(int i, int j, int k)
ArrOfDouble ponderation_shear_m_
void ajoute_coeff2(int i, int j, int k, int i_voisin, int j_voisin, int k_voisin, const double coeff, const double shear_perio)
ajoute deux coefficients diagonal/extra-diagonal a la matrice
void add_dist_bloc(int pe, int imin, int jmin, int kmin, int imax, int jmax, int kmax, ArrOfInt &items_to_send)
void add_virt_bloc(int pe, int &count, int imin, int jmin, int kmin, int imax, int jmax, int kmax, ArrOfInt &virt_blocs)