TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Op_Diff_PolyMAC_HFV_Face.cpp
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#include <Op_Diff_PolyMAC_HFV_Face.h>
17#include <Linear_algebra_tools_impl.h>
18#include <Champ_Face_PolyMAC_HFV.h>
19#include <Domaine_PolyMAC_HFV.h>
20#include <Domaine_Cl_PolyMAC_family.h>
21#include <Pb_Multiphase.h>
22#include <Synonyme_info.h>
23#include <Matrix_tools.h>
24#include <Array_tools.h>
25#include <Perf_counters.h>
26
27
28Implemente_instanciable( Op_Diff_PolyMAC_HFV_Face, "Op_Diff_PolyMAC_HFV_Face|Op_Dift_PolyMAC_HFV_Face_PolyMAC_HFV", Op_Diff_PolyMAC_HFV_base );
29Add_synonym(Op_Diff_PolyMAC_HFV_Face, "Op_Diff_PolyMAC_HFV_var_Face");
30Add_synonym(Op_Diff_PolyMAC_HFV_Face, "Op_Dift_PolyMAC_HFV_var_Face_PolyMAC_HFV");
31
33
35
37{
39 const Domaine_PolyMAC_HFV& domaine = ref_cast(Domaine_PolyMAC_HFV, le_dom_poly_.valeur());
40 Equation_base& eq = equation();
41 Champ_Face_PolyMAC_HFV& ch = ref_cast(Champ_Face_PolyMAC_HFV, le_champ_inco ? le_champ_inco.valeur() : eq.inconnue());
42 ch.init_auxiliary_variables(); /* ajout des inconnues auxiliaires (vorticites aux aretes) */
43 flux_bords_.resize(domaine.premiere_face_int(), dimension * ch.valeurs().line_size());
44 if (domaine.domaine().nb_joints() && domaine.domaine().joint(0).epaisseur() < 1)
45 {
46 Cerr << "Op_Diff_PolyMAC_HFV_Face : largeur de joint insuffisante (minimum 1)!" << finl;
48 }
49 porosite_e.ref(equation().milieu().porosite_elem());
50 porosite_f.ref(equation().milieu().porosite_face());
51 op_ext = { this };
52}
53
55{
56 const Domaine_PolyMAC_HFV& domaine = ref_cast(Domaine_PolyMAC_HFV, le_dom_poly_.valeur());
57 const IntTab& e_f = domaine.elem_faces();
58
59 const DoubleTab& nf = domaine.face_normales(),
60 *alp = sub_type(Pb_Multiphase, equation().probleme()) ?
61 &ref_cast(Pb_Multiphase, equation().probleme()).equation_masse().inconnue().passe() : nullptr,
62 *a_r = sub_type(Pb_Multiphase, equation().probleme()) ?
63 &ref_cast(Pb_Multiphase, equation().probleme()).equation_masse().champ_conserve().passe() :
64 (has_champ_masse_volumique() ? &get_champ_masse_volumique().valeurs() : nullptr); /* produit alpha * rho */
65
66 const DoubleVect& pe = equation().milieu().porosite_elem(), &vf = domaine.volumes_entrelaces(), &ve = domaine.volumes();
67 update_nu();
68
69 const int N = equation().inconnue().valeurs().line_size();
70 double dt = 1e10;
71 DoubleTrav flux(N);
72
73 for (int e = 0; e < domaine.nb_elem(); e++)
74 {
75 flux = 0.;
76 const double vol = pe(e) * ve(e);
77
78 for (int i = 0; i < e_f.dimension(1); i++)
79 {
80 const int f = e_f(e, i);
81 if (f < 0) continue;
82
83 for (int n = 0; n < N; n++)
84 flux(n) += domaine.nu_dot(&nu_, e, n, &nf(f, 0), &nf(f, 0)) / vf(f);
85 }
86
87 for (int n = 0; n < N; n++)
88 if ((!alp || (*alp)(e, n) > 0.25) && flux(n)) /* sous 0.5e-6, on suppose que l'evanescence fait le job */
89 dt = std::min(dt, vol * (a_r ? (*a_r)(e, n) : 1) / flux(n));
90 }
91 return Process::mp_min(dt);
92}
93
94void Op_Diff_PolyMAC_HFV_Face::dimensionner_blocs_ext(int aux_only, matrices_t matrices, const tabs_t& semi_impl) const
95{
96 const Champ_Face_PolyMAC_HFV& ch = ref_cast(Champ_Face_PolyMAC_HFV, le_champ_inco ? le_champ_inco.valeur() : equation().inconnue());
97 const std::string& nom_inco = ch.le_nom().getString();
98 if (!matrices.count(nom_inco))
99 return; //pas de bloc diagonal -> rien a faire
100
101 const Domaine_PolyMAC_HFV& domaine = ref_cast(Domaine_PolyMAC_HFV, le_dom_poly_.valeur());
102 const IntTab& e_f = domaine.elem_faces(), &f_s = domaine.face_sommets(), &e_a = domaine.domaine().elem_aretes(), &fcl = ch.fcl();
103
104 Matrice_Morse& mat = *matrices.at(nom_inco), mat2;
105
106 update_nu();
107
108 ConstDoubleTab_parts p_inco(ch.valeurs());
109
110 const int N = ch.valeurs().line_size(), nf_tot = domaine.nb_faces_tot(), D = dimension,
111 N_nu = nu_.line_size(), semi = (int) semi_impl.count(nom_inco);
112
113 Stencil stencil(0, 2);
114
115 Cerr << "Op_Diff_PolyMAC_HFV_Face::dimensionner() : ";
116
117 /* bloc (faces, aretes) : rot [(lambda grad)^u]*/
118 if (!semi && !aux_only)
119 for (int f = 0; f < domaine.nb_faces(); f++)
120 for (int i = 0; i < f_s.dimension(1); i++)
121 {
122 const int s = f_s(f, i);
123 if (s < 0) continue;
124
125 const int a = D < 3 ? s :
126 domaine.som_arete[s].at(f_s(f, i + 1 < f_s.dimension(1) && f_s(f, i + 1) >= 0 ? i + 1 : 0)); //indice d'arete
127
128 for (int n = 0; n < N; n++)
129 stencil.append_line(N * f + n, N * (nf_tot + a) + n);
130 }
131
132 /* blocs (aretes, faces) et (aretes, aretes) : avec M2 et W1 dans chaque element */
133 Matrice33 L(0, 0, 0, 0, 0, 0, 0, 0, D < 3), iL; //tenseur de diffusion dans chaque element, son inverse
134
135 DoubleTrav inu, m2, w1, v_e, v_ea; //au format compris par domaine.nu_dot
136
137 nu_.nb_dim() == 2 ? inu.resize(1, N) :
138 nu_.nb_dim() == 3 ? inu.resize(1, N, D) :
139 inu.resize(1, N, D, D);
140
141 if (!semi)
142 for (int e = 0; e < domaine.nb_elem_tot(); e++)
143 {
144 //tenseur de diffusion diagonal ou anisotrope diagonal : inverse faciles!
145 if (nu_.nb_dim() < 4)
146 {
147 for (int i = 0; i < N_nu; i++)
148 inu.addr()[i] = 1. / nu_.addr()[N_nu * e + i];
149 }
150 else
151 {
152 for (int n = 0; n < N; n++) //sinon : une matrice a inverser par composante
153 {
154 for (int d = 0; d < D; d++)
155 for (int db = 0; db < D; db++)
156 L(d, db) = nu_(e, n, d, db);
157
158 Matrice33::inverse(L, iL);
159
160 for (int d = 0; d < D; d++)
161 for (int db = 0; db < D; db++)
162 inu(0, n, d, db) = iL(d, db);
163 }
164 }
165
166 domaine.M2(&inu, e, m2);
167
168 if (D > 2)
169 domaine.W1(&nu_, e, w1, v_e, v_ea); //uniquement en 3D: en 2D, matrice diagonale
170
171 //bloc (aretes, faces): en parcourant les aretes de chaque face
172 if (!aux_only)
173 for (int i = 0; i < m2.dimension(0); i++)
174 {
175 const int f = e_f(e, i);
176
177 for (int j = 0; j < f_s.dimension(1); j++)
178 {
179 const int s = f_s(f, j);
180 if (s < 0) continue;
181
182 const int a = D < 3 ? s : domaine.som_arete[s].at(f_s(f, j + 1 < f_s.dimension(1) && f_s(f, j + 1) >= 0 ? j + 1 : 0)); //indice d'arete
183
184 if (a < (D < 3 ? domaine.domaine().nb_som() : domaine.domaine().nb_aretes()))
185 for (int k = 0; k < m2.dimension(1); k++)
186 {
187 const int fb = e_f(e, k);
188 for (int n = 0; n < N; n++)
189 if (fcl(f, 0) == 2 || m2(i, k, n)) //si f est Symetrie, alors il y a aussi une partie en ve -> dependance complete
190 stencil.append_line(N * (nf_tot + a) + n, N * fb + n);
191 }
192 }
193 }
194
195 //bloc (aretes, aretes) : avec m1 si D = 3 (sinon, fait ensuite)
196 if (D > 2)
197 for (int i = 0; i < w1.dimension(0); i++)
198 {
199 const int a = e_a(e, i);
200
201 if (a < domaine.domaine().nb_aretes())
202 for (int j = 0; j < w1.dimension(1); j++)
203 {
204 const int ab = e_a(e, j);
205 for (int n = 0; n < N; n++)
206 if (w1(i, j, n))
207 stencil.append_line(N * (!aux_only * nf_tot + a) + n, N * (!aux_only * nf_tot + ab) + n);
208 }
209 }
210 }
211 if (semi || D < 3)
212 for (int s = 0; s < (D < 3 ? domaine.nb_som() : domaine.domaine().nb_aretes()); s++)
213 for (int n = 0; n < N; n++)
214 stencil.append_line(N * (!aux_only * nf_tot + s) + n, N * (!aux_only * nf_tot + s) + n);
215
216 tableau_trier_retirer_doublons(stencil);
217
218 Cerr << "OK" << finl;
219
220 Matrix_tools::allocate_morse_matrix(aux_only ? p_inco[1].size_totale() : ch.valeurs().size_totale(), aux_only ? p_inco[1].size_totale() : ch.valeurs().size_totale(), stencil, mat2);
221
222 if (mat.nb_colonnes())
223 mat += mat2;
224 else
225 mat = mat2;
226}
227
228// ajoute la contribution de la convection au second membre resu
229// renvoie resu
230void Op_Diff_PolyMAC_HFV_Face::ajouter_blocs_ext(int aux_only, matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl) const
231{
232 const Champ_Face_PolyMAC_HFV& ch = ref_cast(Champ_Face_PolyMAC_HFV, le_champ_inco ? le_champ_inco.valeur() : equation().inconnue());
234 const Domaine_PolyMAC_HFV& domaine = ref_cast(Domaine_PolyMAC_HFV, le_dom_poly_.valeur());
235 const IntTab& e_f = domaine.elem_faces(), &f_s = domaine.face_sommets(), &e_a = domaine.domaine().elem_aretes(),
236 &fcl = ch.fcl(), &f_e = domaine.face_voisins();
237
238 const std::string& nom_inco = ch.le_nom().getString();
239 Matrice_Morse *mat = matrices.count(nom_inco) ? matrices.at(nom_inco) : nullptr;
240
241 update_nu();
242
243 const int N = ch.valeurs().line_size(), nf_tot = domaine.nb_faces_tot(), D = dimension,
244 N_nu = nu_.line_size(), semi = (int) semi_impl.count(nom_inco);
245
246 double vecz[3] = { 0, 0, 1 }, v_cl[3];
247 const double t = equation().schema_temps().temps_courant();
248
249 const DoubleTab& xp = domaine.xp(), &xv = domaine.xv(), &xs = domaine.domaine().coord_sommets(),
250 &xa = D < 3 ? xs : domaine.xa(), &ta = domaine.ta(), &nf = domaine.face_normales(),
251 &inco = semi_impl.count(nom_inco) ? semi_impl.at(nom_inco) : ch.valeurs();
252
253 const DoubleVect& la = domaine.longueur_aretes(), &vf = domaine.volumes_entrelaces(), &fs = domaine.face_surfaces(), &ve = domaine.volumes();
254
255 /* que faire avec les variables auxiliaires ? */
256 if (aux_only) /* 1) on est en train d'assembler le systeme de resolution des variables auxiliaires lui-meme */
257 use_aux_ = 0;
258 else if (mat && !semi) /* 2) on est en implicite complet : pas besoin de mat_aux / var_aux */
259 {
260 t_last_aux_ = t;
261 use_aux_ = 0;
262 }
263 else if (t_last_aux_ < t) /* 3) premier pas a ce temps en semi-implicite : on calcule les variables auxiliaires a t et on les stocke dans var_aux */
264 update_aux(t);
265
266 ConstDoubleTab_parts p_inco(inco); /* deux parties de l'inconnue */
267
268 const DoubleTab& omega = use_aux_ ? var_aux : p_inco[1]; /* les variables auxiliaires peuvent etre soit dans inco/semi_impl (cas 1), soit dans var_aux (cas 2) */
269
270 /* bloc (faces, aretes) : rot [(lambda grad)^u]*/
271 if (!aux_only)
272 for (int f = 0; f < domaine.nb_faces(); f++)
273 for (int i = 0; i < f_s.dimension(1); i++)
274 {
275 const int s = f_s(f, i);
276 if (s < 0) continue;
277
278 const int a = D < 3 ? s : domaine.som_arete[s].at(f_s(f, i + 1 < f_s.dimension(1) && f_s(f, i + 1) >= 0 ? i + 1 : 0)); //indice d'arete
279
280 auto vec = domaine.cross(3, D, D < 3 ? vecz : &ta(a, 0), &xv(f, 0), nullptr, &xa(a, 0));
281
282 const int sgn = domaine.dot(&nf(f, 0), &vec[0]) > 0 ? 1 : -1; //orientation arete-face
283
284 for (int n = 0; n < N; n++)
285 secmem(f, n) -= sgn * vf(f) / fs(f) * (D < 3 ? 1 : la(a)) * omega(a, n);
286
287 if (mat && !semi)
288 for (int n = 0; n < N; n++)
289 (*mat)(N * f + n, N * (nf_tot + a) + n) += sgn * vf(f) / fs(f) * (D < 3 ? 1 : la(a));
290 }
291
292 /* blocs (aretes, faces) et (aretes, aretes) : avec M2 et W1 dans chaque element */
293 Matrice33 L(0, 0, 0, 0, 0, 0, 0, 0, D < 3), iL; //tenseur de diffusion dans chaque element, son inverse et le carre de celui-ci
294 DoubleTrav dL(N), inu, m2, w1, v_e, v_ea; //determinant, inverse (au format compris par domaine.nu_dot), matrices M2(iL) / W1(L)
295
296 if (nu_.nb_dim() == 2)
297 inu.resize(1, N);
298 else if (nu_.nb_dim() == 3)
299 inu.resize(1, N, D);
300 else
301 inu.resize(1, N, D, D);
302
303 if (!aux_only && mat && semi)
304 {
305 for (int a = 0; a < xa.dimension(0); a++)
306 for (int n = 0; n < N; n++) /* en semi-implicite : egalites w_a^+ = var_aux */
307 {
308 secmem(nf_tot + a, n) += omega(a, n) - ch.valeurs()(nf_tot + a, n);
309 (*mat)(N * (nf_tot + a) + n, N * (nf_tot + a) + n)++;
310 }
311 }
312 else if (mat && !semi)
313 for (int e = 0; e < domaine.nb_elem_tot(); e++) /* en implicite : vraies equations */
314 {
315 //tenseur de diffusion diagonal ou anisotrope diagonal : inverses faciles!
316 if (nu_.nb_dim() == 2)
317 {
318 for (int n = 0; n < N; n++)
319 {
320 inu(0, n) = 1. / nu_(e, n);
321 dL(n) = std::pow(nu_(e, n), D);
322 }
323 }
324 else if (nu_.nb_dim() == 3)
325 {
326 for (int n = 0; n < N; n++)
327 {
328 dL(n) = 1.;
329 for (int d = 0; d < D; d++)
330 {
331 inu(0, n, d) = 1. / nu_(e, n, d);
332 dL(n) *= nu_(e, n, d);
333 }
334 }
335 }
336
337 if (nu_.nb_dim() < 4)
338 {
339 for (int i = 0; i < N_nu; i++)
340 inu.addr()[i] = 1. / nu_.addr()[N_nu * e + i];
341 }
342 else
343 {
344 for (int n = 0; n < N; n++) //sinon : une matrice a inverser par composante
345 {
346 for (int d = 0; d < D; d++)
347 for (int db = 0; db < D; db++)
348 L(d, db) = nu_(e, n, d, db);
349
350 dL(n) = Matrice33::inverse(L, iL); //renvoie le determinant!
351
352 for (int d = 0; d < D; d++)
353 for (int db = 0; db < D; db++)
354 inu(0, n, d, db) = iL(d, db);
355 }
356 }
357
358 domaine.M2(&inu, e, m2);
359 if (D > 2)
360 domaine.W1(&nu_, e, w1, v_e, v_ea); //uniquement en 3D: en 2D, matrice diagonale
361
362 //bloc (aretes, faces): en parcourant les aretes de chaque face
363 for (int i = 0; i < m2.dimension(0); i++)
364 {
365 const int f = e_f(e, i);
366 for (int j = 0; j < f_s.dimension(1); j++)
367 {
368 const int s = f_s(f, j);
369 if (s < 0) continue;
370
371 const int a = D < 3 ? s : domaine.som_arete[s].at(f_s(f, j + 1 < f_s.dimension(1) && f_s(f, j + 1) >= 0 ? j + 1 : 0)); // indice arrete
372
373 if (a < (D < 3 ? domaine.domaine().nb_som() : domaine.domaine().nb_aretes()))
374 {
375 auto vec = domaine.cross(3, D, D < 3 ? vecz : &ta(a, 0), &xv(f, 0), nullptr, &xa(a, 0));
376
377 const int sgn = (e == f_e(f, 0) ? 1 : -1) * domaine.dot(&nf(f, 0), &vec[0]) > 0 ? 1 : -1; //orientation arete-face (dans le sens sortant de e)
378
379 for (int k = 0; k < m2.dimension(1); k++)
380 {
381 const int fb = e_f(e, k);
382 for (int n = 0; n < N; n++) //partie x_e -> x_f avec m2 + partie x_f -> x_a avec v_e si bord de Neumann / Symetrie
383 {
384 const double coeff = m2(i, k, n) + (fcl(f, 0) == 2 ? domaine.nu_dot(&inu, 0, n, &xa(a, 0), &xv(fb, 0), &xv(f, 0), &xp(e, 0)) / ve(e) : 0);
385
386 if (!coeff)
387 continue;
388
389 secmem(!aux_only * nf_tot + a, n) += sgn * coeff * inco(fb, n) * fs(fb) * (e == f_e(fb, 0) ? 1 : -1);
390
391 if (!aux_only)
392 (*mat)(N * (nf_tot + a) + n, N * fb + n) -= sgn * coeff * fs(fb) * (e == f_e(fb, 0) ? 1 : -1);
393 }
394 }
395
396 if (fcl(f, 0) == 3 && sub_type(Dirichlet, cls[fcl(f, 1)].valeur()))
397 for (int n = 0; n < N; n++) //si bord de Dirichlet : partie x_f -> x_a avec la vitesse donnee par la CL
398 {
399 for (int d = 0; d < D; d++)
400 v_cl[d] = ref_cast(Dirichlet, cls[fcl(f, 1)].valeur()).val_imp(fcl(f, 2), N * d + n); //v impose
401
402 secmem(!aux_only * nf_tot + a, n) += sgn * domaine.nu_dot(&inu, 0, n, &xa(a, 0), v_cl, &xv(f, 0));
403 }
404 }
405 }
406 }
407
408 //bloc (aretes, aretes) : avec m1 si D = 3, diagonale * surface si D = 2
409 if (D == 2)
410 {
411 for (int i = 0; i < e_f.dimension(1); i++)
412 {
413 const int f = e_f(e, i);
414 if (f < 0) continue;
415
416 for (int j = 0; j < 2; j++)
417 {
418 const int s = f_s(f, j);
419 if (s < domaine.nb_som())
420 {
421 auto vec = domaine.cross(D, D, &xv(f, 0), &xs(s, 0), &xp(e, 0), &xp(e, 0));
422
423 const double surf = std::abs(vec[2]) / 2.; //surface du triangle (e, f, s)
424
425 for (int n = 0; n < N; n++)
426 secmem(!aux_only * nf_tot + s, n) -= surf * inco(nf_tot + s, n) / dL(n);
427
428 for (int n = 0; n < N; n++)
429 (*mat)(N * (!aux_only * nf_tot + s) + n, N * (!aux_only * nf_tot + s) + n) += surf / dL(n);
430 }
431 }
432 }
433 }
434 else
435 for (int i = 0; i < w1.dimension(0); i++)
436 {
437 const int a = e_a(e, i);
438
439 if (a < domaine.domaine().nb_aretes())
440 for (int j = 0; j < w1.dimension(1); j++)
441 {
442 const int ab = e_a(e, j);
443 for (int n = 0; n < N; n++)
444 if (w1(i, j, n))
445 {
446 secmem(!aux_only * nf_tot + a, n) -= w1(i, j, n) * la(ab) * inco(nf_tot + ab, n) / dL(n);
447 (*mat)(N * (!aux_only * nf_tot + a) + n, N * (!aux_only * nf_tot + ab) + n) += w1(i, j, n) * la(ab) / dL(n);
448 }
449 }
450 }
451 }
452}
453
: class Champ_Face_PolyMAC_HFV
const IntTab & fcl() const
const Domaine_Cl_dis_base & domaine_Cl_dis() const
DoubleTab & valeurs() override
Renvoie le tableau des valeurs du champ au temps courant.
virtual DoubleTab & valeurs()=0
classe Conds_lim Cette classe represente un vecteur de conditions aux limites.
Definition Conds_lim.h:32
classe Dirichlet Cette classe est la classe de base de la hierarchie des conditions aux limites de ty...
Definition Dirichlet.h:31
const Cond_lim & les_conditions_limites(int) const
Renvoie la i-ieme condition aux limites.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
virtual const Milieu_base & milieu() const =0
virtual const Champ_Inc_base & inconnue() const =0
Schema_Temps_base & schema_temps()
Renvoie le schema en temps associe a l'equation.
const Nom & le_nom() const override
Renvoie le nom du champ.
une matrice 3x3.
Definition Matrice33.h:28
static double inverse(const Matrice33 &m, Matrice33 &resu, int exit_on_error=1)
calcul de l'inverse.
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
int nb_colonnes() const override
Return local number of columns (=size on the current proc).
static void allocate_morse_matrix(const int nb_lines, const int nb_columns, const Stencil &stencil, Matrice_Morse &matrix, const bool &attach_stencil_to_matrix=false)
DoubleVect & porosite_elem()
Definition Milieu_base.h:58
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
const std::string & getString() const
Definition Nom.h:92
static int dimension
Definition Objet_U.h:99
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
void dimensionner_blocs_ext(int aux_only, matrices_t matrices, const tabs_t &semi_impl={ }) const override
double calculer_dt_stab() const override
Calcul dt_stab.
void ajouter_blocs_ext(int aux_only, matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={ }) const override
class Op_Diff_PolyMAC_HFV_base
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
std::vector< const Operateur_Diff_base * > op_ext
DoubleTab flux_bords_
classe Pb_Multiphase Cette classe represente un probleme de thermohydraulique multiphase de type "3*N...
static double mp_min(double)
Definition Process.cpp:386
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
double temps_courant() const
Renvoie le temps courant.
Classe de base des flux de sortie.
Definition Sortie.h:52
virtual const Champ_base & get_champ_masse_volumique() const
Renvoie le champ de masse volumique.
virtual int has_champ_masse_volumique() const
Renvoie 1 si la masse volumique a ete associee, 0 sinon.
_TYPE_ * addr()
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469
void append_line(_TYPE_)
Definition TRUSTTab.tpp:213
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
_SIZE_ size_totale() const
Definition TRUSTVect.tpp:61
int line_size() const
Definition TRUSTVect.tpp:67