TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Op_Diff_PolyMAC_CDO_Gen_base.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 Op_Diff_PolyMAC_CDO_Gen_base_included
17#define Op_Diff_PolyMAC_CDO_Gen_base_included
18
19#include <Operateur_Diff_base.h>
20#include <TRUST_Ref.h>
21#include <SFichier.h>
22
25
26/*! @brief class Op_Diff_PolyMAC_CDO_Gen_base
27 *
28 * Classe de base generique pour la diffusion PolyMAC_CDO
29 *
30 */
32{
33 Declare_base(Op_Diff_PolyMAC_CDO_Gen_base);
34public:
35 void associer(const Domaine_dis_base&, const Domaine_Cl_dis_base&, const Champ_Inc_base&) override;
36 void associer_diffusivite(const Champ_base& diffu) override { diffusivite_ = diffu; }
37 const Champ_base& diffusivite() const override { return diffusivite_.valeur(); }
38
39 DoubleTab& calculer(const DoubleTab&, DoubleTab&) const override;
40 virtual void modifier_mu(DoubleTab&) const { }
41
42 /* methodes surchargeables dans des classes derivees pour modifier nu avant de calculer les gradients dans update_nu_xwh */
43 virtual int dimension_min_nu() const /* dimension minimale de nu / nu_bord par composante */
44 {
45 return 1;
46 }
47
48 /* diffusivite / conductivite. Attension : stockage nu(element, composante[, dim 1[, dim 2]]) */
49 inline const DoubleTab& nu() const /* aux elements */
50 {
51 if (!nu_a_jour_) update_nu();
52 return nu_;
53 }
54
55 virtual void update_nu() const = 0; //mise a jour
56
57 int impr(Sortie& os) const override;
58
59 inline const Domaine_PolyMAC_CDO& domaine_poly() const { return le_dom_poly_.valeur(); }
60 inline const Domaine_Cl_PolyMAC_family& domaine_cl_poly() const { return la_zcl_poly_.valeur(); }
61
62protected:
63 mutable SFichier Flux, Flux_moment, Flux_sum; // Fichiers .out
64 mutable DoubleTab nu_; // diffusivite aux elements
65 mutable int nu_a_jour_ = 0, nu_constant_ = 0 /* Elie : pour valgrind */; // si on doit mettre a jour nu, nu constant
66
69 OBS_PTR(Champ_base) diffusivite_;
70};
71
72#endif /* Op_Diff_PolyMAC_CDO_Gen_base_included */
73
Classe Champ_Inc_base.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
friend class Sortie
Definition Objet_U.h:75
class Op_Diff_PolyMAC_CDO_Gen_base
int impr(Sortie &os) const override
DOES NOTHING - to override in derived classes.
virtual void modifier_mu(DoubleTab &) const
const Domaine_PolyMAC_CDO & domaine_poly() const
const Champ_base & diffusivite() const override
void associer_diffusivite(const Champ_base &diffu) override
const Domaine_Cl_PolyMAC_family & domaine_cl_poly() const
OBS_PTR(Domaine_PolyMAC_CDO) le_dom_poly_
OBS_PTR(Champ_base) diffusivite_
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &, const Champ_Inc_base &) override
virtual void update_nu() const =0
OBS_PTR(Domaine_Cl_PolyMAC_family) la_zcl_poly_
classe Operateur_Diff_base Cette classe est la base de la hierarchie des operateurs representant
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27