TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Domaine_PolyMAC_MPFA.h
1/****************************************************************************
2* Copyright (c) 2025, 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 Domaine_PolyMAC_MPFA_included
17#define Domaine_PolyMAC_MPFA_included
18
19#include <Domaine_PolyMAC_HFV.h>
20
22{
23 Declare_instanciable(Domaine_PolyMAC_MPFA);
24public :
25 void discretiser() override;
26
27 //stencil du gradient aux faces fgrad : fsten_eb([fsten_d(f), fsten_d(f + 1)[]) -> elements e, faces de bord ne_tot + f
28 void init_stencils() const;
29 mutable IntTab fsten_d, fsten_eb;
30
31 //pour u.n champ T aux elements, interpole [n_f.nu.grad T]_f
32 //en preservant exactement les champs verifiant [nu grad T]_e = cte.
33 //Entrees : N : nombre de composantes
34 // is_p : 1 si on traite le champ de pression (inversion Neumann / Dirichlet)
35 // cls : conditions aux limites
36 // fcl(f, 0/1/2) : donnes sur les CLs (type de CL, indice de CL, indice dans la CL) (cf. Champ_{P0,Face}_PolyMAC_MPFA)
37 // nu(e, n, ..) : diffusivite aux elements (optionnel)
38 // som_ext : liste de sommets a ne pas traiter (ex. : traitement direct des Echange_Contact dans Op_Diff_PolyMAC_MPFA_Elem)
39 // virt : 1 si on veut aussi le flux aux faces virtuelles
40 // full_stencil : 1 si on veut le stencil complet (pour dimensionner())
41 //Sorties : phif_d(f, 0/1) : indices dans phif_{e,c} / phif_{pe,pc} du flux a f dans [phif_d(f, 0/1), phif_d(f + 1, 0/1)[
42 // phif_e(i), phif_c(i, n, c) : indices/coefficients locaux (pas d'Echange_contact) et diagonaux (composantes independantes)
43 void fgrad(int N, int is_p, const Conds_lim& cls, const IntTab& fcl, const DoubleTab *nu, const IntTab *som_ext,
44 int virt, int full_stencil, IntTab& phif_d, IntTab& phif_e, DoubleTab& phif_c) const;
45
46 //MD_Vectors pour Champ_Face_PolyMAC_MPFA (faces + d x elems)
48
49protected:
50 mutable int first_fgrad_ = 1; //pour n'afficher le message "MPFA-O MPFA-O(h) VFSYM" qu'une seule fois par calcul
51};
52
53#endif /* Domaine_PolyMAC_MPFA_included */
classe Conds_lim Cette classe represente un vecteur de conditions aux limites.
Definition Conds_lim.h:32
void fgrad(int N, int is_p, const Conds_lim &cls, const IntTab &fcl, const DoubleTab *nu, const IntTab *som_ext, int virt, int full_stencil, IntTab &phif_d, IntTab &phif_e, DoubleTab &phif_c) const
Computes field gradient interpolation at faces while preserving constant fields.
void init_stencils() const
Initializes the face stencils for gradient computation.
: Cette classe est un OWN_PTR mais l'objet pointe est partage entre plusieurs
Definition MD_Vector.h:48