TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champ_Elem_PolyMAC_MPFA.h
1/****************************************************************************
2* Copyright (c) 2024, 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 Champ_Elem_PolyMAC_MPFA_included
17#define Champ_Elem_PolyMAC_MPFA_included
18
19#include <Champ_Elem_PolyMAC_HFV.h>
20#include <Operateur.h>
21
23
24/*! @brief : class Champ_Elem_PolyMAC_MPFA
25 *
26 * Champ correspondant a une inconnue scalaire (type temperature ou pression)
27 * Degres de libertes : valeur aux elements + flux aux faces
28 *
29 */
31{
32 Declare_instanciable(Champ_Elem_PolyMAC_MPFA);
33
34public:
35
37
38 void init_auxiliary_variables() override { }
39 Champ_base& affecter_(const Champ_base& ch) override { return Champ_Inc_P0_base::affecter_(ch); }
40 int reprendre(Entree& fich) override;
41
42 // Fonctions pour le calcul des coefficients du gradient
43 mutable IntTab fgrad_d, fgrad_e; // Tables used in domaine_PolyMAC_MPFA::fgrad
44 mutable DoubleTab fgrad_w;
45 void init_grad(int full_stencil) const; // Call to initialise the tables ; no updates necessary
46 void calc_grad(int full_stencil) const; // Call to calculate the tables ; updates necessary
47 void mettre_a_jour(double tps) override;
48
49protected:
50
51 mutable int grad_a_jour = 0;
52 mutable double tps_last_calc_grad_ = -1.e8;
53};
54
55#endif /* Champ_Elem_PolyMAC_MPFA_included */
: class Champ_Elem_PolyMAC_HFV
: class Champ_Elem_PolyMAC_MPFA
const Domaine_PolyMAC_MPFA & domaine_PolyMAC_MPFA() const
void calc_grad(int full_stencil) const
int reprendre(Entree &fich) override
Reprise d'un Objet_U sur un flot d'entree Methode a surcharger.
Champ_base & affecter_(const Champ_base &ch) override
void mettre_a_jour(double tps) override
mettre_a_jour de la classe de base Champ_base :ne fait rien !
void init_grad(int full_stencil) const
Champ_base & affecter_(const Champ_base &) override
Affectation d'un OWN_PTR(Champ_base) generique (Champ_base) dans un champ inconnue.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42