TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Support_Champ_Masse_Volumique.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 Support_Champ_Masse_Volumique_included
17#define Support_Champ_Masse_Volumique_included
18
19#include <TRUST_Ref.h>
20
21class Champ_base;
22
24{
25public:
28
29 virtual void associer_champ_masse_volumique(const Champ_base&);
31 virtual int has_champ_masse_volumique() const;
32 virtual const Champ_base& get_champ_masse_volumique() const;
33 inline const int& support_ok() const;
34protected:
35 virtual void declare_support_masse_volumique(int ok);
36private:
37 // L'objet derive utilise bien le champ masse volumique.
38 // Voir le constructeur.
39 int support_ok_;
40 // Reference au champ de masse volumique a utiliser.
41 // La ref peut etre nulle.
42 OBS_PTR(Champ_base) ref_champ_rho_;
43};
44
46{
47 return support_ok_;
48}
49
50#endif
51
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
virtual const Champ_base & get_champ_masse_volumique() const
Renvoie le champ de masse volumique.
virtual void dissocier_champ_masse_volumique()
Annule la reference a la masse volumique.
virtual ~Support_Champ_Masse_Volumique()
Destructeur virtuel (pour eviter les warnings).
virtual void declare_support_masse_volumique(int ok)
Le constructeur d'une classe derivee qui se sert de la masse volumique doit appeler cette fonction av...
virtual void associer_champ_masse_volumique(const Champ_base &)
Methode a appeler dans la preparation du probleme pour demander a l'objet de tenir compte du champ de...
Support_Champ_Masse_Volumique()
Constructeur de la classe.
virtual int has_champ_masse_volumique() const
Renvoie 1 si la masse volumique a ete associee, 0 sinon.