TrioCFD 1.9.9_beta
TrioCFD documentation
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// Retrieves a positions array containing coordinates of points
75// contained in the elements stored in the les_polys array
76// Returns the val array containing the field values at those points
77DoubleTab& Champ_P1iP1B_implementation::valeur_aux_elems(const DoubleTab& positions, const IntVect& les_polys, DoubleTab& val) const
78{
79 // zs is properly initialized in 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 // Filter the field into the champ_filtre_ array
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 // Initialize
116 val_v(rang_poly,0) = 0.;
117
118 // Take 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 // Compute the filtered field at point (xs,ys,zs) using P1 shape functions
133 for (int i=0; i<dimension+1; i++)
134 {
135 int som = prs+sommet_poly_v(le_poly,i);
136 double champ_filtre_som = champ_filtre_v(som);
137 double li=0.;
138
139 if (dimension == 2)
140 li=coord_barycentrique_P1_triangle(sommet_poly_v,
141 coord_v, xs, ys,
142 le_poly, i);
143 else if (dimension == 3)
144 li=coord_barycentrique_P1_tetraedre(sommet_poly_v,
145 coord_v, xs, ys, zs,
146 le_poly, i);
147 val_v(rang_poly,0) += champ_filtre_som * li;
148 }
149 }
150 }
151 });
152 end_gpu_timer(__KERNEL_NAME__);
153 }
154 else // nb_compo_ > 1
155 {
156 Cerr << "Are you really here already?" << finl;
158 }
159 return val;
160}
161
162// Same as valeur_aux_elems but for one component of a vector field
163DoubleVect& Champ_P1iP1B_implementation::valeur_aux_elems_compo(const DoubleTab& positions, const IntVect& les_polys, DoubleVect& val, int ncomp) const
164{
165 Cerr << "Champ_P1iP1B_implementation::valeur_aux_elems_compo not implemented." << finl;
166 // Factorize code with the valeur_aux_elems() method
168 return val;
169}
170
171
172// Retrieves a domain
173// Returns an array containing the field values at the domain vertices
174DoubleTab& Champ_P1iP1B_implementation::valeur_aux_sommets(const Domaine& dom, DoubleTab& tab_val) const
175{
176 const Domaine_VEF& zvef = domaine_vef();
177 int nb_compo_=le_champ().nb_comp();
178 assert(nb_compo_ == tab_val.line_size());
179
180 // Filter the field for post-processing (stored in the champ_filtre_ array)
182
183 if (zvef.get_alphaE()) // Support P0
184 {
185 Champ_P0_VEF tmp;
187 tmp.valeurs() = champ_filtre_;
188 tmp.valeur_aux_sommets(zvef.domaine(), tab_val);
189 }
190
191 if (zvef.get_alphaS()) // Support P1
192 {
193 int nbs=zvef.nb_som();
194 int prs=zvef.numero_premier_sommet();
195 if (nb_compo_ == 1)
196 {
197 CDoubleArrView champ_filtre = static_cast<const DoubleVect&>(champ_filtre_).view_ro();
198 DoubleTabView val = tab_val.view_rw();
199 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), nbs, KOKKOS_LAMBDA(const int num_som)
200 {
201 int som = prs+num_som;
202 val(num_som,0) += champ_filtre(som);
203 });
204 end_gpu_timer(__KERNEL_NAME__);
205 }
206 else // nb_compo_ > 1
207 {
208 Cerr << "Are you really here already?" << finl;
210 }
211 }
212 return tab_val;
213}
214
215
216//
218valeur_aux_sommets_compo(const Domaine& dom,
219 DoubleVect& val,
220 int ncomp) const
221{
222 Cerr << "Champ_P1iP1B_implementation::valeur_aux_sommets_compo not implemented." << finl;
223 // Factorize with the valeur_aux_sommets() method
225 return val;
226}
227
229{
230 const Domaine_VEF& zvef=domaine_vef();
231 const Domaine& le_dom=zvef.domaine();
232 const Domaine& dom=le_dom;
233 const DoubleTab& coord_sommets=dom.coord_sommets();
234 int dimension=Objet_U::dimension;
235
236 const DoubleTab& xg = zvef.xp();
237 int nbe=zvef.get_alphaE() ? zvef.nb_elem_tot() : 0;
238 int nbs=zvef.get_alphaS() ? zvef.nb_som_tot() : 0;
239 coord.resize(nbe+nbs,dimension);
240 int k = 0;
241 if (zvef.get_alphaE())
242 {
243 for(int i=0; i<nbe; i++)
244 {
245 for(int j=0; j<dimension; j++)
246 coord(k,j)=xg(i,j);
247 k++;
248 }
249 }
250 if (zvef.get_alphaS())
251 {
252 for(int i=0; i<nbs; i++)
253 {
254 for(int j=0; j<dimension; j++)
255 coord(k,j)=coord_sommets(i,j);
256 k++;
257 }
258 }
259 return coord;
260}
261
263remplir_coord_noeuds_et_polys(DoubleTab& positions,
264 IntVect& polys) const
265{
266 Cerr << "Not implemented" << finl;
267 assert(0);
269 return 1;
270}
271
272void assembler(const Domaine_VEF& domaine_VEF, Matrice& matrice)
273{
274 matrice.typer("Matrice_Morse_Sym");
275 Matrice_Morse_Sym& MatPoisson=ref_cast(Matrice_Morse_Sym, matrice.valeur());
276 int nb_som_tot = domaine_VEF.domaine().nb_som_tot();
277 int nb_arete_tot = domaine_VEF.domaine().nb_aretes_tot();
278 int nnz=nb_som_tot+nb_arete_tot;
279 const IntTab& aretes_som=domaine_VEF.domaine().aretes_som();
280 const ArrOfInt& renum_arete_perio=domaine_VEF.get_renum_arete_perio();
281 const Domaine& dom=domaine_VEF.domaine();
282
283 IntLists voisins(nb_som_tot);
284 DoubleLists coeffs(nb_som_tot);
285 DoubleVect diag(nb_som_tot);
286 // Loop over all non-periodic edges:
287 for(int arete=0; arete<nb_arete_tot; arete++)
288 {
289 if (renum_arete_perio[arete]==arete)
290 {
291 int som1=dom.get_renum_som_perio(aretes_som(arete, 0));
292 int som2=dom.get_renum_som_perio(aretes_som(arete, 1));
293 if(som1>som2)
294 {
295 int tmp=som1;
296 som1=som2;
297 som2=tmp;
298 }
299 voisins[som1].add(som2);
300 coeffs[som1].add(1);
301 diag(som1)++;
302 diag(som2)++;
303 }
304 }
305 for (int i=0; i<nb_som_tot; i++)
306 {
307 if (diag(i)==0)
308 {
309 assert(i!=dom.get_renum_som_perio(i));
310 diag(i)=1; // Periodic vertices
311 }
312 }
313 MatPoisson.dimensionner(nb_som_tot, nnz) ;
314 MatPoisson.remplir(voisins, coeffs, diag) ;
315 MatPoisson.compacte() ;
316 MatPoisson.set_est_definie(1);
317 //Cerr << "Matrice P1";MatPoisson.imprimer(Cerr);
318}
319
320static double coeff = 4. / 5.;
321static double coeff_inv = 1 / coeff;
322double second_membre(const Domaine_VEF& domaine_VEF, ArrOfDouble& Pa, DoubleVect& secmem)
323{
324 int nb_arete_tot = domaine_VEF.domaine().nb_aretes_tot();
325 const IntTab& aretes_som=domaine_VEF.domaine().aretes_som();
326 const ArrOfInt& renum_arete_perio=domaine_VEF.get_renum_arete_perio();
327 const Domaine& dom=domaine_VEF.domaine();
328 secmem=0;
329 // Loop over all non-periodic edges
330 for(int arete=0; arete<nb_arete_tot; arete++)
331 {
332 if (renum_arete_perio[arete]==arete)
333 {
334 double x=Pa[arete];
335 int som1=dom.get_renum_som_perio(aretes_som(arete, 0));
336 int som2=dom.get_renum_som_perio(aretes_som(arete, 1));
337 secmem(som1)+=x;
338 secmem(som2)+=x;
339 }
340 }
341 secmem*=coeff;
342 secmem.echange_espace_virtuel();
343 double norme=mp_norme_vect(secmem);
344 //Cerr << "||somme Pa||= " << norme << finl;
345 return norme;
346}
347
348void corriger(const Domaine_VEF& domaine_VEF, DoubleTab& champ_filtre_, Matrice& matrice, const int Condition_Neumann_imposee_)
349{
350 int nb_elem=domaine_VEF.nb_elem();
351 int nb_som=domaine_VEF.nb_som();
352
353 // Access arrays for Pk and Ps values
354 if (!domaine_VEF.get_alphaE() || !domaine_VEF.get_alphaS())
355 {
356 Cerr << "Error in Champ_P1iP1B_impl.cpp: corriger(...), the field must have both vertex and element parts" << finl;
358 }
359 DoubleTab_parts parties_P(champ_filtre_);
360 DoubleVect& Pk = parties_P[0]; // element part
361 DoubleVect& Ps = parties_P[1]; // vertex part
362
363 // Filtering if edge support is active
364 if (domaine_VEF.get_alphaA())
365 {
366 if (domaine_VEF.get_renum_arete_perio().size_array()==0)
367 {
368 Cerr<<"We try to Champ_P1iP1B_impl::corriger but get_renum_arete_perio"<<finl;
369 }
370 }
371 if (domaine_VEF.get_alphaA()&& domaine_VEF.get_renum_arete_perio().size_array())
372 {
373 champ_filtre_.ensureDataOnHost(); // We need copy H2D as the Pa part of DoubleTab_parts is computed on host
374 ToDo_Kokkos("critical for P0P1Pa");
375 DoubleVect& Pa = parties_P[2]; // edge part
376
377 // If first pass, assemble the matrix
378 if (!matrice) assembler(domaine_VEF, matrice);
379
380 // Build the right-hand side
381 DoubleVect secmem;
382 domaine_VEF.domaine().creer_tableau_sommets(secmem);
383 second_membre(domaine_VEF, Pa, secmem);
384
385 // Compute the correction
386 DoubleVect solution;
387 solution.copy(secmem, RESIZE_OPTIONS::NOCOPY_NOINIT); // Copy of the structure
388 solution = 0.;
389
390 SolveurSys solveur;
391 solveur.typer("Solv_GCP");
392 OWN_PTR(Precond_base) p;
393 p.typer("SSOR");
394 ref_cast(Solv_GCP,solveur.valeur()).set_precond(p);
395 solveur.nommer("Pa_filter_solver");
396 solveur.resoudre_systeme(matrice, secmem, solution);
397
398 // Apply periodicity to the solution:
399 const Domaine& dom=domaine_VEF.domaine();
400 for(int i=0; i<nb_som; i++)
401 {
402 int som=dom.get_renum_som_perio(i);
403 if (som!=i)
404 solution(i)=solution(som);
405 }
406
407 // Correction of Ps:
408 for(int som=0; som<nb_som; som++)
409 Ps(som) += solution(som);
410
411 // Correction of Pa:
412 int nb_arete = domaine_VEF.domaine().nb_aretes();
413 const IntTab& aretes_som=domaine_VEF.domaine().aretes_som();
414 const ArrOfInt& ok_arete=domaine_VEF.get_ok_arete();
415 for(int arete=0; arete<nb_arete; arete++)
416 {
417 if(!ok_arete[arete] && Pa(arete)!=0)
418 {
419 Cerr << "Pa(arete_superflue)!=0 in Champ_P1iP1B_implementation::corriger" << finl;
420 Cerr << "Please contact TRUST support." << finl;
421 Cerr << "If this is a restart from an xyz format calculation," << finl;
422 Cerr << "you must overwrite the .ok_arete file of your restart calculation" << finl;
423 Cerr << "with the .ok_arete file of your previous calculation so as to have the" << finl;
424 Cerr << "same superfluous edges." << finl;
426 }
427 int som1=aretes_som(arete, 0);
428 int som2=aretes_som(arete, 1);
429 double sigma=solution(som1)+solution(som2);
430 Pa(arete)-=sigma*coeff_inv;
431 }
432
433 // Correction of Pk:
434 const IntTab& les_elems = domaine_VEF.domaine().les_elems();
435 int nb_som_par_elem=les_elems.dimension_tot(1);
436 for(int elem=0; elem<nb_elem; elem++)
437 {
438 double sigma=0;
439 for (int som=0; som<nb_som_par_elem; som++)
440 sigma+=solution(les_elems(elem,som));
441 Pk(elem)-=sigma/4;
442 }
443 }
444
445 // L2 filtering:
446 double moyenne_K = mp_moyenne_vect(Pk); // Compute the mean of the element field
447 Pk -= moyenne_K; // Correction of elements of champ_filtre_
448 Ps += moyenne_K; // Correction of vertices of champ_filtre_
449
450 // Subtract the mean from Ps if there is no Neumann BC, to impose a zero mean
451 // It might be better to do this in Assembleur_P_VEFPreP1B::modifier_solution
452 // if possible...
453 assert(Condition_Neumann_imposee_!=-1);
454
455 if (!Condition_Neumann_imposee_)
456 {
457 // The virtual space of Ps does not need to be up to date to correctly compute the mean
458 Ps -= mp_moyenne_vect(Ps); // Correction of vertices of champ_filtre_
459 }
460
461 champ_filtre_.echange_espace_virtuel(); // Update of virtual spaces
462}
463
464DoubleTab& Champ_P1iP1B_implementation::filtrage(const Domaine_VEF& zvef, const Champ_base& un_champ, bool implicitCoupling) const
465{
466 // Filter only if both element and vertex supports are present
467 if (zvef.get_alphaE() && zvef.get_alphaS())
468 {
469 // No filtering if it has already been done on this field during the time step
470 // and if no sub-iterations are performed during the time step
471 // The condition implicitCoupling=true enables filtering and therefore updates
472 // the variable "champ_filtre_" during sub-iterations.
473 // Sub-iterations can be performed within a time step in the case of an implicit
474 // coupling with another code, for example with a structural solver
475 // in fluid-structure interaction applications
476 if (un_champ.valeurs().data()==adresse_champ_filtre_ // PL: data() and not addr(). Else copyFromDevice on GPU !
477 && un_champ.temps()==temps_filtrage_
478 && !implicitCoupling)
479 return champ_filtre_;
480
481 // Copy the field to filter into the array that will hold the filtered field
482 champ_filtre_=un_champ.valeurs();
483 temps_filtrage_=un_champ.temps();
485 //Cout << "Filtering the field " << un_champ.le_nom() << " at time " << un_champ.temps() << finl;
486
487 // Correct the field
489 Debog::verifier("field after filter=", champ_filtre_);
490 return champ_filtre_;
491 }
492 else
493 {
494 champ_filtre_=un_champ.valeurs();
495 return champ_filtre_;
496 }
497}
498
499// Sets Condition_Neumann_imposee_ to 1 if a Neumann BC exists, 0 otherwise
500// If there is no Neumann condition, a zero mean will be imposed during field filtering
501// to get the same field in sequential and parallel runs
503{
504 const Conds_lim& les_cl = zcl.les_conditions_limites();
506 for(int i=0; i<les_cl.size(); i++)
507 if (sub_type(Neumann_sortie_libre,les_cl[i].valeur()))
509}
510
511DoubleTab& Champ_P1iP1B_implementation::trace(const Frontiere_dis_base& fr, const DoubleTab& y, DoubleTab& x,int distant) const
512{
513 assert(distant==0);
514 const Front_VF& fr_vf = ref_cast(Front_VF, fr);
515 const Domaine_VEF& domaine_dis = domaine_vef();
516 const DoubleTab& cg_faces = domaine_dis.xv();
517 int nb_faces_fr = fr_vf.nb_faces();
518 int face, elem;
519
520 assert(x.dimension(0)==fr_vf.nb_faces());
521
522 IntVect elem_voisins(nb_faces_fr);
523 elem_voisins = -1;
524 DoubleTab cg_faces_fr(nb_faces_fr,Objet_U::dimension);
525 DoubleTab val_interp(nb_faces_fr, 1);
526
527 // Retrieve the neighboring elements of the boundary faces
528 for (int i=0; i<nb_faces_fr; i++)
529 {
530 face = fr_vf.num_premiere_face()+i;
531 elem = domaine_dis.face_voisins(face,0);
532 if (elem==-1)
533 elem = domaine_dis.face_voisins(face,1);
534 elem_voisins(i) = elem;
535 }
536
537 // Fill the array containing the coordinates
538 // of the centroid of the boundary faces
539 for (int num_face=0; num_face<nb_faces_fr; num_face++)
540 for (int dim=0; dim<Objet_U::dimension; dim++)
541 {
542 face = fr_vf.num_premiere_face()+num_face;
543 cg_faces_fr(num_face,dim) = cg_faces(face,dim);
544 }
545
546 // Interpolate field values at the centroid of boundary faces
547 valeur_aux_elems(cg_faces_fr,elem_voisins,val_interp);
548
549 for (int i=0; i<nb_faces_fr; i++)
550 {
551 x(i,0) = val_interp(i);
552 }
553 // Useless ? x.echange_espace_virtuel();
554 return x;
555}
DoubleTab & valeur_aux_sommets(const Domaine &domain, DoubleTab &result) const override
Returns the values at the vertices of the Domain dom.
void associer_domaine_dis_base(const Domaine_dis_base &) override
DoubleTab & valeurs() override
Returns the array of field values at the current time.
class Champ_P0_VEF
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
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
double temps() const
Returns the time of the field.
virtual Champ_base & le_champ()=0
class Conds_lim This class represents a vector of boundary conditions.
Definition Conds_lim.h:32
static void verifier(const char *const msg, double)
Definition Debog.cpp:21
int_t nb_aretes_tot() const
returns the total number of edges (real+virtual).
Definition Domaine.h:145
const IntTab_t & aretes_som() const
returns the connectivity array edges/vertices.
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
Returns the number of real edges.
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
Creates an array with one "row" per mesh vertex.
Definition Domaine.cpp:999
int_t nb_som_tot() const
Returns the total number of vertices of the domain i.e. the number of real and virtual vertices on th...
Definition Domaine.h:123
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
class Domaine_VEF
Definition Domaine_VEF.h:53
const IntVect & get_ok_arete() const
Definition Domaine_VEF.h:98
int numero_premier_sommet() const
int get_alphaA() const
Definition Domaine_VEF.h:93
const ArrOfInt & get_renum_arete_perio() const
Definition Domaine_VEF.h:97
int get_alphaS() const
Definition Domaine_VEF.h:92
int get_alphaE() const
Definition Domaine_VEF.h:91
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
Returns the neighbouring element of num_face in 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
class Frontiere_dis_base Class representing a discretized boundary.
Matrice_Morse_Sym class - Represents a sparse symmetric matrix M stored in Morse format.
void compacte(int elim_coeff_nul=0)
Remove duplicates by sorting 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)
Matrice class - Generic class in the matrix hierarchy.
Definition Matrice.h:34
Neumann_sortie_libre This class represents an open boundary without imposed velocity.
static int dimension
Definition Objet_U.h:94
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
class SolveurSys A SolveurSys represents any class
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")