TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Multigrille_Adrien.tpp
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 Multigrille_Adrien_TPP_H
17#define Multigrille_Adrien_TPP_H
18
19#include <Multigrille_Adrien.h>
20#include <SSE_kernels.h>
21#include <Perf_counters.h>
22using namespace SSE_Kernels;
23
24static long long flop_count = 0;
25
26// Substract the average of the x field to get a zero average field.
27template <typename _TYPE_, typename _TYPE_ARRAY_>
28void Multigrille_Adrien::prepare_secmem_(IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& x) const
29{
30 double moyenne = somme_ijk(x);
31 double nb_elem_tot = (double) x.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_I)
32 * (double) x.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_J)
33 * (double) x.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_K);
34 double val = moyenne / nb_elem_tot;
35 const int m = x.data().size_array();
36 for (int i = 0; i < m; i++)
37 x.data()[i] -= (_TYPE_)val;
38}
39
40template <typename _TYPE_, typename _TYPE_ARRAY_>
41void Multigrille_Adrien::dump_lata_(const Nom& field, const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& data, int tstep) const
42{
44}
45
46template <typename _TYPE_, typename _TYPE_ARRAY_>
59
60template <typename _TYPE_, typename _TYPE_ARRAY_>
73
74
75template <typename _TYPE_, typename _TYPE_ARRAY_>
88
89template <typename _TYPE_, typename _TYPE_ARRAY_>
102
103template <typename _TYPE_FUNC_, typename _TYPE_, typename _TYPE_ARRAY_>
104void Multigrille_Adrien::set_rho_template(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& rho, bool set_coarse_matrix_flag, bool use_coeffs_from_double)
105{
106 constexpr bool IS_DOUBLE = std::is_same<_TYPE_FUNC_, double>::value;
107
108 // size might be 1 for mixed precision solver if updating the double precision part:
109 const int nlevels = get_grid_data_size<_TYPE_FUNC_>();
110 const int ghost = get_grid_data<_TYPE_FUNC_>(0).get_rho().ghost();
111
112 for (int l = 0; l < nlevels; l++)
113 {
114 // Fill the "rho" field
115 if (l == 0)
116 {
117 IJK_Field_template<_TYPE_FUNC_,TRUSTArray<_TYPE_FUNC_>>& r = set_grid_data<_TYPE_FUNC_>(l).get_update_rho();
118 int ni = r.ni();
119 int nj = r.nj();
120 int nk = r.nk();
121 for (int k = 0; k < nk; k++)
122 for (int j = 0; j < nj; j++)
123 for (int i = 0; i < ni; i++)
124 r(i,j,k) = (_TYPE_FUNC_)rho(i,j,k);
125
126 // echange espace virtuel sur rho sans passer par IJK_Field --> mauvais remplissage des coeffs de la matrice pour le shear periodique
127 // modif pour shear-periodicite, que lechange_espace_virtuel soit bien fait pour rho ou inv_rho dans le solveur de Pousson
129 {
130 set_grid_data<_TYPE_FUNC_>(l).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmin_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmin_());
131 set_grid_data<_TYPE_FUNC_>(l).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmax_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmax_());
132 }
133 }
134 else
135 coarsen_operators_[l-1]->coarsen(set_grid_data<_TYPE_FUNC_>(l-1).get_rho(),
136 set_grid_data<_TYPE_FUNC_>(l).get_update_rho(),
137 1 /* compute average, not sum */);
138
139 set_grid_data<_TYPE_FUNC_>(l).get_update_rho().echange_espace_virtuel(ghost);
140
141 // Compute matrix coefficients at faces
142 if(IS_DOUBLE)
143 grids_data_double_[l].compute_faces_coefficients_from_rho();
144 else
145 {
146 if (use_coeffs_from_double && l < grids_data_double_.size())
147 grids_data_float_[l].compute_faces_coefficients_from_double_coeffs(grids_data_double_[l]);
148 else
149 grids_data_float_[l].compute_faces_coefficients_from_rho();
150 }
151 }
152
153 // Update coarse problem matrix:
154 if (set_coarse_matrix_flag)
155 {
156 const int coarse_level = nlevels - 1;
157 set_coarse_matrix().build_matrix(set_grid_data<_TYPE_FUNC_>(coarse_level).get_faces_coefficients());
158 }
159}
160
161template <typename _TYPE_FUNC_, typename _TYPE_, typename _TYPE_ARRAY_>
162void Multigrille_Adrien::set_rho_template_NoSym(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& rho, bool set_coarse_matrix_flag, bool use_coeffs_from_double)
163{
164 constexpr bool IS_DOUBLE = std::is_same<_TYPE_FUNC_, double>::value;
165
166 // size might be 1 for mixed precision solver if updating the double precision part:
167 const int nlevels = get_grid_data_size<_TYPE_FUNC_>();
168 const int ghost = get_grid_data<_TYPE_FUNC_>(0).get_rho().ghost();
169
170 int monophasique = 1;
171 const double test_mono = (_TYPE_FUNC_)rho(0,0,0);
172
173 for (int l = 0; l < nlevels; l++)
174 {
175 // Fill the "rho" field
176 if (l == 0)
177 {
178 IJK_Field_template<_TYPE_FUNC_,TRUSTArray<_TYPE_FUNC_>>& r = set_grid_data<_TYPE_FUNC_>(l).get_update_rho();
179 int ni = r.ni();
180 int nj = r.nj();
181 int nk = r.nk();
182 for (int k = 0; k < nk; k++)
183 {
184 for (int j = 0; j < nj; j++)
185 {
186 for (int i = 0; i < ni; i++)
187 {
188 r(i,j,k) = (_TYPE_FUNC_)rho(i,j,k);
189 if (r(i,j,k) != test_mono)
190 monophasique = 0;
191 }
192 }
193 }
194
195 // echange espace virtuel sur rho sans passer par IJK_Field --> mauvais remplissage des coeffs de la matrice pour le shear periodique
196 // modif pour shear-periodicite, que lechange_espace_virtuel soit bien fait pour rho ou inv_rho dans le solveur de Pousson
197 if (IJK_Shear_Periodic_helpler::defilement_==1 && (!monophasique))
198 {
199 set_grid_data<_TYPE_FUNC_>(l).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmin_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmin_());
200 set_grid_data<_TYPE_FUNC_>(l).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmax_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmax_());
201 }
202 }
203 else
204 coarsen_operators_[l-1].valeur().coarsen(set_grid_data<_TYPE_FUNC_>(l-1).get_rho(),
205 set_grid_data<_TYPE_FUNC_>(l).get_update_rho(),
206 1 /* compute average, not sum */);
207
208 set_grid_data<_TYPE_FUNC_>(l).get_update_rho().echange_espace_virtuel(ghost);
209
210 // Compute matrix coefficients at faces
211 if(IS_DOUBLE)
212 grids_data_double_[l].compute_faces_coefficients_from_rho();
213 else
214 {
215 if (use_coeffs_from_double && l < grids_data_double_.size())
216 grids_data_float_[l].compute_faces_coefficients_from_double_coeffs(grids_data_double_[l]);
217 else
218 grids_data_float_[l].compute_faces_coefficients_from_rho();
219 }
220 }
221
222 // Update coarse problem matrix:
223 if (set_coarse_matrix_flag)
224 {
225 const int coarse_level = nlevels - 1;
226 set_coarse_matrix().build_matrix_test(set_grid_data<_TYPE_FUNC_>(coarse_level).get_faces_coefficients());
227 }
228}
229
230template <typename _TYPE_FUNC_, typename _TYPE_, typename _TYPE_ARRAY_>
231void Multigrille_Adrien::set_inv_rho_template(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& rho, bool set_coarse_matrix_flag, bool use_coeffs_from_double)
232{
233 constexpr bool IS_DOUBLE = std::is_same<_TYPE_FUNC_, double>::value;
234
235 // size might be 1 for mixed precision solver if updating the double precision part:
236 const int nlevels = get_grid_data_size<_TYPE_FUNC_>();
237
238
239 const int ghost = get_grid_data<_TYPE_FUNC_>(0).get_rho().ghost();
240
241 for (int i = 0; i < nlevels; i++)
242 {
243 // Fill the "rho" field
244 if (i == 0)
245 {
246 IJK_Field_template<_TYPE_FUNC_,TRUSTArray<_TYPE_FUNC_>>& r = set_grid_data<_TYPE_FUNC_>(i).get_update_rho();
247 int ni = r.ni();
248 int nj = r.nj();
249 int nk = r.nk();
250 for (int k = 0; k < nk; k++)
251 for (int j = 0; j < nj; j++)
252 for (int i2 = 0; i2 < ni; i2++)
253 r(i2,j,k) = (_TYPE_FUNC_)rho(i2,j,k);
254 // modif pour shear-periodicite, que lechange_espace_virtuel soit bien fait pour rho ou inv_rho dans le solveur de Poisson
255 // on ajoute ca pour le shear perio, uniquement sur le premier niveau de multigrille pour l'instant
257 {
258 set_grid_data<_TYPE_FUNC_>(i).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmin_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmin_());
259 set_grid_data<_TYPE_FUNC_>(i).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmax_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmax_());
260 }
261 }
262 else
263 {
264 coarsen_operators_[i-1]->coarsen(set_grid_data<_TYPE_FUNC_>(i-1).get_rho(),
265 set_grid_data<_TYPE_FUNC_>(i).get_update_rho(),
266 1 /* compute average, not sum */);
267 }
268
269 set_grid_data<_TYPE_FUNC_>(i).get_update_rho().echange_espace_virtuel(ghost);
270
271 if(IS_DOUBLE)
272 {
273 grids_data_double_[i].compute_faces_coefficients_from_inv_rho();
274 }
275 else
276 {
277 // Compute matrix coefficients at faces
278 if (use_coeffs_from_double && i < grids_data_double_.size())
279 grids_data_float_[i].compute_faces_coefficients_from_double_coeffs(grids_data_double_[i]);
280 else
281 grids_data_float_[i].compute_faces_coefficients_from_inv_rho();
282 }
283 }
284
285 // Update coarse problem matrix:
286 if (set_coarse_matrix_flag)
287 {
288 const int coarse_level = nlevels - 1;
289 set_coarse_matrix().build_matrix(set_grid_data<_TYPE_FUNC_>(coarse_level).get_faces_coefficients());
290 }
291}
292
293template <typename _TYPE_FUNC_, typename _TYPE_, typename _TYPE_ARRAY_>
294void Multigrille_Adrien::set_inv_rho_NoSym_template(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& rho, bool set_coarse_matrix_flag, bool use_coeffs_from_double)
295{
296 constexpr bool IS_DOUBLE = std::is_same<_TYPE_FUNC_, double>::value;
297
298 // size might be 1 for mixed precision solver if updating the double precision part:
299 const int nlevels = get_grid_data_size<_TYPE_FUNC_>();
300
301 const int ghost = get_grid_data<_TYPE_FUNC_>(0).get_rho().ghost();
302
303 for (int i = 0; i < nlevels; i++)
304 {
305 // Fill the "rho" field
306 if (i == 0)
307 {
308 IJK_Field_template<_TYPE_FUNC_,TRUSTArray<_TYPE_FUNC_>>& r = set_grid_data<_TYPE_FUNC_>(i).get_update_rho();
309 int ni = r.ni();
310 int nj = r.nj();
311 int nk = r.nk();
312 for (int k = 0; k < nk; k++)
313 for (int j = 0; j < nj; j++)
314 for (int i2 = 0; i2 < ni; i2++)
315 r(i2,j,k) = (_TYPE_FUNC_)rho(i2,j,k);
316 // modif pour shear-periodicite, que lechange_espace_virtuel soit bien fait pour rho ou inv_rho dans le solveur de Poisson
317 // on ajoute ca pour le shear perio, uniquement sur le premier niveau de multigrille pour l'instant
319 {
320 set_grid_data<_TYPE_FUNC_>(i).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmin_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmin_());
321 set_grid_data<_TYPE_FUNC_>(i).get_update_rho().get_shear_BC_helpler().set_indicatrice_ghost_zmax_(rho.get_shear_BC_helpler().get_indicatrice_ghost_zmax_());
322 }
323 }
324 else
325 {
326 coarsen_operators_[i-1].valeur().coarsen(set_grid_data<_TYPE_FUNC_>(i-1).get_rho(),
327 set_grid_data<_TYPE_FUNC_>(i).get_update_rho(),
328 1 /* compute average, not sum */);
329 }
330
331 set_grid_data<_TYPE_FUNC_>(i).get_update_rho().echange_espace_virtuel(ghost);
332
333 if(IS_DOUBLE)
334 {
335 grids_data_double_[i].compute_faces_coefficients_from_inv_rho();
336 }
337 else
338 {
339 // Compute matrix coefficients at faces
340 if (use_coeffs_from_double && i < grids_data_double_.size())
341 grids_data_float_[i].compute_faces_coefficients_from_double_coeffs(grids_data_double_[i]);
342 else
343 grids_data_float_[i].compute_faces_coefficients_from_inv_rho();
344 }
345 }
346
347 // Update coarse problem matrix:
348 if (set_coarse_matrix_flag)
349 {
350 const int coarse_level = nlevels - 1;
351 set_coarse_matrix().build_matrix_test(set_grid_data<_TYPE_FUNC_>(coarse_level).get_faces_coefficients());
352 }
353}
354
355
356
357// Apply n_jacobi iterations of jacobi to x vector,
358// and, if the residu pointer is not zero, computes the residue.
359// Precondition: ghost cells for secmem must be up to date.
360// The number of required ghost layers is n_jacobi + (1 if residu is required)
361// Postcondition: ghost cells are not updated
362template <typename _TYPE_, typename _TYPE_ARRAY_>
363void Multigrille_Adrien::jacobi_residu_(IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& x,
365 const int grid_level,
366 const int n_jacobi_tot,
368{
369 statistics().create_custom_counter("multigrid: jacobi residual",2,"IJK");
370 statistics().begin_count("multigrid: jacobi residual",statistics().get_last_opened_counter_level()+1);
371
372 const IJK_Field_local_template<_TYPE_,_TYPE_ARRAY_>& coeffs_face = get_grid_data<_TYPE_>(grid_level).get_faces_coefficients();
373
374 //IJ_layout layout(x);
375 const _TYPE_ relax = (_TYPE_)relax_jacobi(grid_level);
376 // We can do at most this number of passes per sweep:
377 const int nb_passes_max_per_sweep = x.ghost();
378 // We have to do this number of passes in total:
379 const int nb_passes_to_do_total = n_jacobi_tot + (residu ? 1 : 0);
380 int nb_passes_done = 0;
381
382 // Repeat as many sweeps as necessary:
383 while (nb_passes_done < nb_passes_to_do_total)
384 {
385
386 int nb_passes_to_do = nb_passes_to_do_total - nb_passes_done;
387 if (nb_passes_to_do > nb_passes_max_per_sweep)
388 nb_passes_to_do = nb_passes_max_per_sweep;
389
390 x.echange_espace_virtuel(nb_passes_to_do);
391
392 if (grid_level == 0)
393 {
394 // Place counter here to avoid counting communication time:
395 //statistics().begin_count(counter);
396 flop_count = 0;
397 }
398
399 const bool last_pass_is_residue = (nb_passes_done + nb_passes_to_do == n_jacobi_tot + 1);
400 Multipass_Jacobi_template<_TYPE_, _TYPE_ARRAY_, SSE_Kernels::GENERIC_STRIDE, SSE_Kernels::GENERIC_STRIDE>(x, *residu, coeffs_face, *secmem, nb_passes_to_do, last_pass_is_residue, relax);
401
402 nb_passes_done += nb_passes_to_do;
403
404 if (grid_level == 0)
405 {
406 //statistics().end_count(counter, flop_count);
407 flop_count = 0;
408 }
409 }
410 statistics().end_count("multigrid: jacobi residual",1, (int)flop_count);
411}
412
413template <typename _TYPE_, typename _TYPE_ARRAY_>
414void Multigrille_Adrien::coarsen_(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& fine, IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& coarse, int fine_level) const
415{
416 coarsen_operators_[fine_level]->coarsen(fine, coarse);
417}
418
419// calcul de "fine -= interpolated(coarse)"
420template <typename _TYPE_, typename _TYPE_ARRAY_>
421void Multigrille_Adrien::interpolate_sub_shiftk_(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& coarse, IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& fine, int fine_level) const
422{
423 // Shift by maximum value:
424 const int shift = needed_kshift_for_jacobi(fine_level) - fine.k_shift();
425 coarsen_operators_[fine_level]->interpolate_sub_shiftk(coarse, fine, shift);
426}
427
428
429template <typename _TYPE_, typename _TYPE_ARRAY_>
431{
432 Cerr << "Multigrille_Adrien::completer_template" << finl;
433
434 const int nb_operators = coarsen_operators_.size();
435 const int nb_grids = nb_operators + 1;
436 constexpr bool IS_DOUBLE = std::is_same<_TYPE_, double>::value;
437 if(IS_DOUBLE)
438 grids_data_double_.dimensionner(nb_grids);
439 else
440 grids_data_float_.dimensionner(nb_grids);
441
442 set_grid_data<_TYPE_>(0).initialize(split, ghost_size_, nsweeps_jacobi_residu(0));
443
444 for (int i = 0; i < nb_operators; i++)
445 {
446 coarsen_operators_[i]->initialize_grid_data(set_grid_data<_TYPE_>(i), set_grid_data<_TYPE_>(i+1),
448 }
449 for (int i = 0; i < nb_grids; i++)
450 {
451 const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& g = get_grid_data<_TYPE_>(i).get_rho();
452 Journal() << "Grid level " << i << " local size: " << g.ni() << "x" << g.nj() << "x" << g.nk() << finl;
453 }
454}
455
456
457
458// Allocate an array for the grid data
459template <typename _TYPE_, typename _TYPE_ARRAY_>
460void Multigrille_Adrien::alloc_field_( IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& field, int level, bool with_additional_layers) const
461{
462 if (level < 0 || level > get_grid_data_size<_TYPE_>())
463 {
464 Cerr << "Fatal: wrong level in alloc_field" << finl;
466 }
467 const int n = with_additional_layers ? ghost_size_ : 0;
468
469 field.allocate(get_grid_data<_TYPE_>(level).get_domaine(), Domaine_IJK::ELEM, ghost_size_, n);
470}
471
472
473
474
475template <typename _TYPE_>
476IJK_Field_template<_TYPE_,TRUSTArray<_TYPE_>>& Multigrille_Adrien::get_storage_template_(StorageId id, int level)
477{
478 switch (id)
479 {
480 case STORAGE_RHS:
481 return set_grid_data<_TYPE_>(level).get_update_rhs();
482 case STORAGE_X:
483 return set_grid_data<_TYPE_>(level).get_update_x();
484 case STORAGE_RESIDUE:
485 return set_grid_data<_TYPE_>(level).get_update_residue();
486 default:
487 Cerr << "Error in Multigrille_Adrien::get_storage_float" << finl;
489 }
490 return set_grid_data<_TYPE_>(level).get_update_rhs(); // never arrive here...
491}
492
493
494
495
496
497
498#endif
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
int get_nb_items_global(Localisation loc, int direction) const
Returns the number of local items (on this processor) for the given localisation in the requested dir...
: This class describes a scalar field in an ijk box without any parallel information.
: This class is an IJK_Field_local with parallel informations.
void allocate(const Domaine_IJK &d, Domaine_IJK::Localisation l, int ghost_size, int additional_k_layers=0, int nb_compo=1, const Nom &name=Nom(), bool external_storage=false, int monofluide=0, double rov=0., double rol=0., int use_inv_rho_in_pressure_solver=0)
void echange_espace_virtuel(int ghost)
Exchange data over "ghost" number of cells.
IJK_Shear_Periodic_helpler & get_shear_BC_helpler()
const Domaine_IJK & get_domaine() const
const IJK_Field_local_template< double, ArrOfDouble > & get_indicatrice_ghost_zmax_() const
const IJK_Field_local_template< double, ArrOfDouble > & get_indicatrice_ghost_zmin_() 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)
void set_inv_rho(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &inv_rho)
void set_rho(const DoubleVect &rho)
void set_rho_template(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &rho, bool set_coarse_matrix, bool use_coeffs_from_double)
void set_rho_NoSym(const DoubleVect &rho)
void set_inv_rho_template(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &rho, bool set_coarse_matrix_flag, bool use_coeffs_from_double)
int needed_kshift_for_jacobi(int level) const override
void set_inv_rho_NoSym_template(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &rho, bool set_coarse_matrix_flag, bool use_coeffs_from_double)
void set_rho_template_NoSym(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &rho, bool set_coarse_matrix, bool use_coeffs_from_double)
void completer_template(const Domaine_IJK &)
void set_inv_rho_NoSym(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &inv_rho)
double relax_jacobi(int level) const
const int precision_double_
Matrice_Grossiere & set_coarse_matrix()
int nsweeps_jacobi_residu(int level) const
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
void end_count(const std::string &custom_count_name, int count_increment=1, long int quantity_increment=0)
End the count of a counter and update the counter values.
static Sortie & Journal(int message_level=0)
Renvoie un objet statique de type Sortie qui sert de journal d'evenements.
Definition Process.cpp:588
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455