TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champ_P1iP1B_implementation.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 <Champ_P1iP1B_implementation.h>
17#include <Champ_implementation_P1.h>
18#include <Domaine.h>
19#include <Domaine_VEF.h>
20#include <Domaine_Cl_VEF.h>
21#include <Debog.h>
22
23#include <Matrice_Morse_Sym.h>
24#include <TRUSTLists.h>
25#include <SolveurSys.h>
26#include <Solv_GCP.h>
27#include <SSOR.h>
28
29#include <Neumann_sortie_libre.h>
30#include <Champ_P0_VEF.h>
31#include <TRUSTTab_parts.h>
32#include <Frontiere_dis_base.h>
33
34#include <kokkos++.h>
35#include <TRUSTArray_kokkos.tpp>
36
37DoubleVect& Champ_P1iP1B_implementation::valeur_a_elem(const DoubleVect& position, DoubleVect& val, int le_poly) const
38{
39 int dimension=Objet_U::dimension;
40 DoubleTab vals(1,1);
41 IntVect les_polys(1);
42 DoubleTab positions(1,dimension);
43
44 les_polys(0) = le_poly;
45 for (int i=0; i<dimension; i++)
46 positions(0,i) = position(i);
47
48 valeur_aux_elems(positions, les_polys, vals);
49
50 val(0) = vals(0,0);
51 return val;
52}
53
54double Champ_P1iP1B_implementation::valeur_a_elem_compo(const DoubleVect& position, int le_poly, int ncomp) const
55{
56 double val=0;
57 int dimension=Objet_U::dimension;
58
59 DoubleVect vals(1);
60 IntVect les_polys(1);
61 DoubleTab positions(1,dimension);
62
63 les_polys(0) = le_poly;
64 for (int i=0; i<dimension; i++)
65 positions(0,i) = position(i);
66
67 valeur_aux_elems_compo(positions, les_polys, vals, ncomp);
68
69 val = vals(0);
70
71 return val;
72}
73
74// Recupere un tableau positions contenant des coordonnees de points
75// contenus dans les elements ranges dans le tableau les_polys
76// Renvoie le tableau val contenant les valeurs du champ aux points
77DoubleTab& Champ_P1iP1B_implementation::valeur_aux_elems(const DoubleTab& positions, const IntVect& les_polys, DoubleTab& val) const
78{
79 // zs bien initialise en 3D
80
81 const Domaine_VEF& zvef = domaine_vef();
82 const Domaine& domaine_geom = zvef.domaine();
83 const DoubleTab& coord = domaine_geom.coord_sommets();
84 const IntTab& sommet_poly = domaine_geom.les_elems();
85 int prs=zvef.numero_premier_sommet();
86 int nb_compo_=le_champ().nb_comp();
87 int dimension=Objet_U::dimension;
88 const int les_polys_size=les_polys.size();
89
90 // TODO : FIXME
91 // For FT the resize should be done in its good position and not here ...
92 if (val.nb_dim() == 1 ) val.resize(les_polys_size,1);
93
94 assert((val.dimension(0) == les_polys.size())||(val.dimension_tot(0) == les_polys.size()));
95 assert(val.line_size() == nb_compo_);
96
97 // Filtrage du champ dans le tableau champ_filtre_
99
100 if (nb_compo_ == 1)
101 {
102 // HIP Kokkos prevent from the function calls inside the Kokkos region:
103 // Error: error: reference to __host__ function 'get_alphaE' in __host__ __device__ function
104 bool alphaE = zvef.get_alphaE();
105 bool alphaS = zvef.get_alphaS();
106 CDoubleArrView champ_filtre_v = static_cast<DoubleVect&>(champ_filtre_).view_ro();
107 CIntTabView sommet_poly_v = sommet_poly.view_ro();
108 CDoubleTabView coord_v = coord.view_ro();
109 CDoubleTabView positions_v = positions.view_ro();
110 CIntArrView les_polys_v = les_polys.view_ro();
111 DoubleTabView val_v = val.view_rw();
112 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),les_polys_size, KOKKOS_LAMBDA(
113 const int rang_poly)
114 {
115 // On initialise
116 val_v(rang_poly,0) = 0.;
117
118 // On prend le_poly
119 int le_poly=les_polys_v(rang_poly);
120 if (le_poly != -1)
121 {
122 // Contribution P0
123 if (alphaE)
124 val_v(rang_poly, 0) += champ_filtre_v(le_poly);
125 // Contribution P1
126 if (alphaS)
127 {
128 double xs = positions_v(rang_poly,0);
129 double ys = positions_v(rang_poly,1);
130 double zs = (dimension == 3) ? positions_v(rang_poly,2) : 0;
131
132 // Calcul par les fonctions de forme P1 du champ filtre
133 // au point (xs,yz,zs)
134 for (int i=0; i<dimension+1; i++)
135 {
136 int som = prs+sommet_poly_v(le_poly,i);
137 double champ_filtre_som = champ_filtre_v(som);
138 double li=0.;
139
140 if (dimension == 2)
141 li=coord_barycentrique_P1_triangle(sommet_poly_v,
142 coord_v, xs, ys,
143 le_poly, i);
144 else if (dimension == 3)
145 li=coord_barycentrique_P1_tetraedre(sommet_poly_v,
146 coord_v, xs, ys, zs,
147 le_poly, i);
148 val_v(rang_poly,0) += champ_filtre_som * li;
149 }
150 }
151 }
152 });
153 end_gpu_timer(__KERNEL_NAME__);
154 }
155 else // nb_compo_ > 1
156 {
157 Cerr << "Vous en etes deja la vous ?" << finl;
159 }
160 return val;
161}
162
163// Idem que valeur_aux_elems mais pour une composante d'un champ vecteur
164DoubleVect& Champ_P1iP1B_implementation::valeur_aux_elems_compo(const DoubleTab& positions, const IntVect& les_polys, DoubleVect& val, int ncomp) const
165{
166 Cerr << "Champ_P1iP1B_implementation::valeur_aux_elems_compo non code." << finl;
167 // Factoriser le code avec la methode valeur_aux_elems()
169 return val;
170}
171
172
173// Recupere un domaine
174// Renvoie un tableau contenant les valeurs du champ aux sommets du domaine
175DoubleTab& Champ_P1iP1B_implementation::valeur_aux_sommets(const Domaine& dom, DoubleTab& tab_val) const
176{
177 const Domaine_VEF& zvef = domaine_vef();
178 int nb_compo_=le_champ().nb_comp();
179 assert(nb_compo_ == tab_val.line_size());
180
181 // Filtrage du champ pour le postraitement (contenu dans le tableau champ_filtre_)
183
184 if (zvef.get_alphaE()) // Support P0
185 {
186 Champ_P0_VEF tmp;
188 tmp.valeurs() = champ_filtre_;
189 tmp.valeur_aux_sommets(zvef.domaine(), tab_val);
190 }
191
192 if (zvef.get_alphaS()) // Support P1
193 {
194 int nbs=zvef.nb_som();
195 int prs=zvef.numero_premier_sommet();
196 if (nb_compo_ == 1)
197 {
198 CDoubleArrView champ_filtre = static_cast<const DoubleVect&>(champ_filtre_).view_ro();
199 DoubleTabView val = tab_val.view_rw();
200 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), nbs, KOKKOS_LAMBDA(const int num_som)
201 {
202 int som = prs+num_som;
203 val(num_som,0) += champ_filtre(som);
204 });
205 end_gpu_timer(__KERNEL_NAME__);
206 }
207 else // nb_compo_ > 1
208 {
209 Cerr << "Vous en etes deja la vous ?" << finl;
211 }
212 }
213 return tab_val;
214}
215
216
217//
219valeur_aux_sommets_compo(const Domaine& dom,
220 DoubleVect& val,
221 int ncomp) const
222{
223 Cerr << "Champ_P1iP1B_implementation::valeur_aux_sommets_compo pas code." << finl;
224 // Factoriser avec la methode valeur_aux_sommets()
226 return val;
227}
228
230{
231 const Domaine_VEF& zvef=domaine_vef();
232 const Domaine& le_dom=zvef.domaine();
233 const Domaine& dom=le_dom;
234 const DoubleTab& coord_sommets=dom.coord_sommets();
235 int dimension=Objet_U::dimension;
236
237 const DoubleTab& xg = zvef.xp();
238 int nbe=zvef.get_alphaE() ? zvef.nb_elem_tot() : 0;
239 int nbs=zvef.get_alphaS() ? zvef.nb_som_tot() : 0;
240 coord.resize(nbe+nbs,dimension);
241 int k = 0;
242 if (zvef.get_alphaE())
243 {
244 for(int i=0; i<nbe; i++)
245 {
246 for(int j=0; j<dimension; j++)
247 coord(k,j)=xg(i,j);
248 k++;
249 }
250 }
251 if (zvef.get_alphaS())
252 {
253 for(int i=0; i<nbs; i++)
254 {
255 for(int j=0; j<dimension; j++)
256 coord(k,j)=coord_sommets(i,j);
257 k++;
258 }
259 }
260 return coord;
261}
262
264remplir_coord_noeuds_et_polys(DoubleTab& positions,
265 IntVect& polys) const
266{
267 Cerr << "Pas code " << finl;
268 assert(0);
270 return 1;
271}
272
273void assembler(const Domaine_VEF& domaine_VEF, Matrice& matrice)
274{
275 matrice.typer("Matrice_Morse_Sym");
276 Matrice_Morse_Sym& MatPoisson=ref_cast(Matrice_Morse_Sym, matrice.valeur());
277 int nb_som_tot = domaine_VEF.domaine().nb_som_tot();
278 int nb_arete_tot = domaine_VEF.domaine().nb_aretes_tot();
279 int nnz=nb_som_tot+nb_arete_tot;
280 const IntTab& aretes_som=domaine_VEF.domaine().aretes_som();
281 const ArrOfInt& renum_arete_perio=domaine_VEF.get_renum_arete_perio();
282 const Domaine& dom=domaine_VEF.domaine();
283
284 IntLists voisins(nb_som_tot);
285 DoubleLists coeffs(nb_som_tot);
286 DoubleVect diag(nb_som_tot);
287 // On parcourt toutes les aretes non periodiques:
288 for(int arete=0; arete<nb_arete_tot; arete++)
289 {
290 if (renum_arete_perio[arete]==arete)
291 {
292 int som1=dom.get_renum_som_perio(aretes_som(arete, 0));
293 int som2=dom.get_renum_som_perio(aretes_som(arete, 1));
294 if(som1>som2)
295 {
296 int tmp=som1;
297 som1=som2;
298 som2=tmp;
299 }
300 voisins[som1].add(som2);
301 coeffs[som1].add(1);
302 diag(som1)++;
303 diag(som2)++;
304 }
305 }
306 for (int i=0; i<nb_som_tot; i++)
307 {
308 if (diag(i)==0)
309 {
310 assert(i!=dom.get_renum_som_perio(i));
311 diag(i)=1; // Sommets periodiques
312 }
313 }
314 MatPoisson.dimensionner(nb_som_tot, nnz) ;
315 MatPoisson.remplir(voisins, coeffs, diag) ;
316 MatPoisson.compacte() ;
317 MatPoisson.set_est_definie(1);
318 //Cerr << "Matrice P1";MatPoisson.imprimer(Cerr);
319}
320
321static double coeff = 4. / 5.;
322static double coeff_inv = 1 / coeff;
323double second_membre(const Domaine_VEF& domaine_VEF, ArrOfDouble& Pa, DoubleVect& secmem)
324{
325 int nb_arete_tot = domaine_VEF.domaine().nb_aretes_tot();
326 const IntTab& aretes_som=domaine_VEF.domaine().aretes_som();
327 const ArrOfInt& renum_arete_perio=domaine_VEF.get_renum_arete_perio();
328 const Domaine& dom=domaine_VEF.domaine();
329 secmem=0;
330 // On parcourt toutes les aretes non periodiques
331 for(int arete=0; arete<nb_arete_tot; arete++)
332 {
333 if (renum_arete_perio[arete]==arete)
334 {
335 double x=Pa[arete];
336 int som1=dom.get_renum_som_perio(aretes_som(arete, 0));
337 int som2=dom.get_renum_som_perio(aretes_som(arete, 1));
338 secmem(som1)+=x;
339 secmem(som2)+=x;
340 }
341 }
342 secmem*=coeff;
343 secmem.echange_espace_virtuel();
344 double norme=mp_norme_vect(secmem);
345 //Cerr << "||somme Pa||= " << norme << finl;
346 return norme;
347}
348
349void corriger(const Domaine_VEF& domaine_VEF, DoubleTab& champ_filtre_, Matrice& matrice, const int Condition_Neumann_imposee_)
350{
351 int nb_elem=domaine_VEF.nb_elem();
352 int nb_som=domaine_VEF.nb_som();
353
354 // Tableaux d'acces aux valeurs Pk et Ps
355 if (!domaine_VEF.get_alphaE() || !domaine_VEF.get_alphaS())
356 {
357 Cerr << "Erreur dans Champ_P1iP1B_impl.cpp: corriger(...), le champ doit avoir une partie sommets et elements" << finl;
359 }
360 DoubleTab_parts parties_P(champ_filtre_);
361 DoubleVect& Pk = parties_P[0]; // partie elements
362 DoubleVect& Ps = parties_P[1]; // partie sommets
363
364 // Filtrage si support arete
365 if (domaine_VEF.get_alphaA())
366 {
367 if (domaine_VEF.get_renum_arete_perio().size_array()==0)
368 {
369 Cerr<<"We try to Champ_P1iP1B_impl::corriger but get_renum_arete_perio"<<finl;
370 }
371 }
372 if (domaine_VEF.get_alphaA()&& domaine_VEF.get_renum_arete_perio().size_array())
373 {
374 champ_filtre_.ensureDataOnHost(); // We need copy H2D as the Pa part of DoubleTab_parts is computed on host
375 ToDo_Kokkos("critical for P0P1Pa");
376 DoubleVect& Pa = parties_P[2]; // partie aretes
377
378 // Si premier passage on assemble la matrice
379 if (!matrice) assembler(domaine_VEF, matrice);
380
381 // Construction du second membre
382 DoubleVect secmem;
383 domaine_VEF.domaine().creer_tableau_sommets(secmem);
384 second_membre(domaine_VEF, Pa, secmem);
385
386 // Calcul de la correction
387 DoubleVect solution;
388 solution.copy(secmem, RESIZE_OPTIONS::NOCOPY_NOINIT); // Copie de la structure
389 solution = 0.;
390
391 SolveurSys solveur;
392 solveur.typer("Solv_GCP");
393 OWN_PTR(Precond_base) p;
394 p.typer("SSOR");
395 ref_cast(Solv_GCP,solveur.valeur()).set_precond(p);
396 solveur.nommer("Pa_filter_solver");
397 solveur.resoudre_systeme(matrice, secmem, solution);
398
399 // Application de la periodicite sur la solution:
400 const Domaine& dom=domaine_VEF.domaine();
401 for(int i=0; i<nb_som; i++)
402 {
403 int som=dom.get_renum_som_perio(i);
404 if (som!=i)
405 solution(i)=solution(som);
406 }
407
408 // Correction de Ps:
409 for(int som=0; som<nb_som; som++)
410 Ps(som) += solution(som);
411
412 // Correction de Pa:
413 int nb_arete = domaine_VEF.domaine().nb_aretes();
414 const IntTab& aretes_som=domaine_VEF.domaine().aretes_som();
415 const ArrOfInt& ok_arete=domaine_VEF.get_ok_arete();
416 for(int arete=0; arete<nb_arete; arete++)
417 {
418 if(!ok_arete[arete] && Pa(arete)!=0)
419 {
420 Cerr << "Pa(arete_superflue)!=0 dans Champ_P1iP1B_implementation::corriger" << finl;
421 Cerr << "Contacter le support TRUST." << finl;
422 Cerr << "S'il s'agit d'une reprise au format xyz d'un calcul" << finl;
423 Cerr << "alors il faut ecraser le fichier .ok_arete de votre calcul de reprise" << finl;
424 Cerr << "par le fichier .ok_arete de votre calcul precedant afin d'avoir les" << finl;
425 Cerr << "memes aretes superflues." << finl;
427 }
428 int som1=aretes_som(arete, 0);
429 int som2=aretes_som(arete, 1);
430 double sigma=solution(som1)+solution(som2);
431 Pa(arete)-=sigma*coeff_inv;
432 }
433
434 // Correction de Pk:
435 const IntTab& les_elems = domaine_VEF.domaine().les_elems();
436 int nb_som_par_elem=les_elems.dimension_tot(1);
437 for(int elem=0; elem<nb_elem; elem++)
438 {
439 double sigma=0;
440 for (int som=0; som<nb_som_par_elem; som++)
441 sigma+=solution(les_elems(elem,som));
442 Pk(elem)-=sigma/4;
443 }
444 }
445
446 // Filtrage L2:
447 double moyenne_K = mp_moyenne_vect(Pk); // Calcul de la moyenne du champ aux elements
448 Pk -= moyenne_K; // Correction des elements du champ_filtre_
449 Ps += moyenne_K; // Correction des sommets du champ_filtre_
450
451 // On retranche a Ps sa moyenne si pas de Cl de Neumann pour avoir une moyenne nulle
452 // Il faudrait peut etre mieux faire cela dans Assembleur_P_VEFPreP1B::modifier_solution
453 // si cela est possible...
454 assert(Condition_Neumann_imposee_!=-1);
455
456 if (!Condition_Neumann_imposee_)
457 {
458 // L'espace virtuel de Ps n'a pas besoin d'etre a jour pour calculer correctement la moyenne
459 Ps -= mp_moyenne_vect(Ps); // Correction des sommets du champ_filtre_
460 }
461
462 champ_filtre_.echange_espace_virtuel(); // Mise a jour des espaces virtuels
463}
464
465DoubleTab& Champ_P1iP1B_implementation::filtrage(const Domaine_VEF& zvef, const Champ_base& un_champ, bool implicitCoupling) const
466{
467 // Filtrage si supports element et sommet presents au moins
468 if (zvef.get_alphaE() && zvef.get_alphaS())
469 {
470 // No filtering if it has already been done on this field during the time step
471 // and if no sub-iterations are performed during the time step
472 // The condition implicitCoupling=true enables filtering and therefore updates
473 // the variable "champ_filtre_" during sub-iterations.
474 // Sub-iterations can be performed within a time step in the case of an implicit
475 // coupling with another code, for example with a structural solver
476 // in fluid-structure interaction applications
477 if (un_champ.valeurs().data()==adresse_champ_filtre_ // PL: data() and not addr(). Else copyFromDevice on GPU !
478 && un_champ.temps()==temps_filtrage_
479 && !implicitCoupling)
480 return champ_filtre_;
481
482 // On copie le champ a filtrer dans le tableau qui contiendra le champ filtre
483 champ_filtre_=un_champ.valeurs();
484 temps_filtrage_=un_champ.temps();
486 //Cout << "Filtrage du champ " << un_champ.le_nom() << " au temps " << un_champ.temps() << finl;
487
488 // Correction du champ
490 Debog::verifier("champ apres filtre=", champ_filtre_);
491 return champ_filtre_;
492 }
493 else
494 {
495 champ_filtre_=un_champ.valeurs();
496 return champ_filtre_;
497 }
498}
499
500// Fixe Condition_Neumann_imposee_ a 1 si il existe une CL de Neumann 0 sinon
501// Si pas de condition de Neumann, on imposera une moyenne nulle dans le filtrage du champ
502// pour avoir le meme champ en sequentiel et en parallele
504{
505 const Conds_lim& les_cl = zcl.les_conditions_limites();
507 for(int i=0; i<les_cl.size(); i++)
508 if (sub_type(Neumann_sortie_libre,les_cl[i].valeur()))
510}
511
512DoubleTab& Champ_P1iP1B_implementation::trace(const Frontiere_dis_base& fr, const DoubleTab& y, DoubleTab& x,int distant) const
513{
514 assert(distant==0);
515 const Front_VF& fr_vf = ref_cast(Front_VF, fr);
516 const Domaine_VEF& domaine_dis = domaine_vef();
517 const DoubleTab& cg_faces = domaine_dis.xv();
518 int nb_faces_fr = fr_vf.nb_faces();
519 int face, elem;
520
521 assert(x.dimension(0)==fr_vf.nb_faces());
522
523 IntVect elem_voisins(nb_faces_fr);
524 elem_voisins = -1;
525 DoubleTab cg_faces_fr(nb_faces_fr,Objet_U::dimension);
526 DoubleTab val_interp(nb_faces_fr, 1);
527
528 //On recupere les elements voisins des faces de la frontiere
529 for (int i=0; i<nb_faces_fr; i++)
530 {
531 face = fr_vf.num_premiere_face()+i;
532 elem = domaine_dis.face_voisins(face,0);
533 if (elem==-1)
534 elem = domaine_dis.face_voisins(face,1);
535 elem_voisins(i) = elem;
536 }
537
538 //Remplissage du tableau contenant les coordonnees
539 //du centre de gravite des faces de la frontiere
540 for (int num_face=0; num_face<nb_faces_fr; num_face++)
541 for (int dim=0; dim<Objet_U::dimension; dim++)
542 {
543 face = fr_vf.num_premiere_face()+num_face;
544 cg_faces_fr(num_face,dim) = cg_faces(face,dim);
545 }
546
547 //Interpolation des valeurs du champ au centre de gravite des faces frontieres
548 valeur_aux_elems(cg_faces_fr,elem_voisins,val_interp);
549
550 for (int i=0; i<nb_faces_fr; i++)
551 {
552 x(i,0) = val_interp(i);
553 }
554 // Useless ? x.echange_espace_virtuel();
555 return x;
556}
DoubleTab & valeur_aux_sommets(const Domaine &domain, DoubleTab &result) const override
renvoie les valeurs aux sommets du Domaine dom
void associer_domaine_dis_base(const Domaine_dis_base &) override
DoubleTab & valeurs() override
Renvoie le tableau des valeurs du champ au temps courant.
classe Champ_P0_VEF Classe qui represente un champ discret P0 par element associe a un domaine discre...
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const override
DoubleTab & remplir_coord_noeuds(DoubleTab &positions) const override
virtual const Domaine_VEF & domaine_vef() const =0
DoubleTab & filtrage(const Domaine_VEF &, const Champ_base &, bool implicitCoupling=false) const
double valeur_a_elem_compo(const DoubleVect &position, int le_poly, int ncomp) const override
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &val, int le_poly) const override
DoubleVect & valeur_aux_sommets_compo(const Domaine &, DoubleVect &, int) const override
int remplir_coord_noeuds_et_polys(DoubleTab &positions, IntVect &polys) const override
DoubleTab & trace(const Frontiere_dis_base &fr, const DoubleTab &y, DoubleTab &x, int distant) const
void completer(const Domaine_Cl_dis_base &zcl)
const DoubleTab & champ_filtre() const
DoubleTab & valeur_aux_sommets(const Domaine &, DoubleTab &) const override
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const override
virtual DoubleTab & valeurs()=0
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
double temps() const
Renvoie le temps du champ.
virtual Champ_base & le_champ()=0
classe Conds_lim Cette classe represente un vecteur de conditions aux limites.
Definition Conds_lim.h:32
static void verifier(const char *const msg, double)
Definition Debog.cpp:21
int_t nb_aretes_tot() const
renvoie le nombre d'aretes total (reelles+virtuelles).
Definition Domaine.h:145
const IntTab_t & aretes_som() const
renvoie le tableau de connectivite aretes/sommets.
Definition Domaine.h:156
int_t get_renum_som_perio(int_t i) const
Definition Domaine.h:281
IntTab_t & les_elems()
Definition Domaine.h:129
int_t nb_aretes() const
Renvoie le nombre d'aretes reelles.
Definition Domaine.h:143
const DoubleTab_t & coord_sommets() const
Definition Domaine.h:112
virtual void creer_tableau_sommets(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Cree un tableau ayant une "ligne" par sommet du maillage.
Definition Domaine.cpp:1000
int_t nb_som_tot() const
Renvoie le nombre total de sommets du domaine i.e. le nombre de sommets reels et virtuels sur le proc...
Definition Domaine.h:123
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
const Cond_lim & les_conditions_limites(int) const
Renvoie la i-ieme condition aux limites.
class Domaine_VEF
Definition Domaine_VEF.h:54
const IntVect & get_ok_arete() const
Definition Domaine_VEF.h:99
int numero_premier_sommet() const
int get_alphaA() const
Definition Domaine_VEF.h:94
const ArrOfInt & get_renum_arete_perio() const
Definition Domaine_VEF.h:98
int get_alphaS() const
Definition Domaine_VEF.h:93
int get_alphaE() const
Definition Domaine_VEF.h:92
double xv(int num_face, int k) const
Definition Domaine_VF.h:76
double xp(int num_elem, int k) const
Definition Domaine_VF.h:77
int face_voisins(int num_face, int i) const
renvoie l'element voisin de numface dans la direction i.
Definition Domaine_VF.h:418
int nb_elem_tot() const
const Domaine & domaine() const
int nb_som_tot() const
virtual int nb_comp() const
Definition Field_base.h:56
class Front_VF
Definition Front_VF.h:36
int nb_faces() const
Definition Front_VF.h:53
int num_premiere_face() const
Definition Front_VF.h:63
classe Frontiere_dis_base Classe representant une frontiere discretisee.
Classe Matrice_Morse_Sym Represente une matrice M (creuse) symetrique stockee au format Morse.
void compacte(int elim_coeff_nul=0)
Suppression des doublons on ordonne tab2;.
void dimensionner(int n, _SIZE_ nnz)
Size the matrix with n lines and n columns and nnz zero-values coefficients.
void remplir(const IntLists &, const DoubleLists &, const DoubleVect &)
void set_est_definie(int)
Classe Matrice Classe generique de la hierarchie des matrices.
Definition Matrice.h:34
classe Neumann_sortie_libre Cette classe represente une frontiere ouverte sans vitesse imposee
static int dimension
Definition Objet_U.h:99
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
class SolveurSys Un SolveurSys represente n'importe qu'elle classe
Definition SolveurSys.h:32
int resoudre_systeme(const Matrice_Base &matrice, const DoubleVect &secmem, DoubleVect &solution)
void nommer(const Nom &nom) override
Definition SolveurSys.h:37
_SIZE_ size_array() const
_TYPE_ * data()
int nb_dim() const
Definition TRUSTTab.h:199
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, ConstView< _TYPE_, _SHAPE_ > > view_ro() const
Definition TRUSTTab.h:261
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, View< _TYPE_, _SHAPE_ > > view_rw()
Definition TRUSTTab.h:291
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
_SIZE_ size() const
Definition TRUSTVect.tpp:45
void copy(const TRUSTArray< _TYPE_, _SIZE_ > &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
int line_size() const
Definition TRUSTVect.tpp:67
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")