TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Integrale_tps_Champ.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 Integrale_tps_Champ_included
17#define Integrale_tps_Champ_included
18
19#include <Champ_Generique_base.h>
20#include <TRUSTTabs_forward.h>
21#include <Champ_Fonc_base.h>
22#include <TRUST_Deriv.h>
23#include <TRUST_Ref.h>
24
26class Champ_base;
27
29{
30 Declare_instanciable(Integrale_tps_Champ);
31public:
32 inline const Champ_Fonc_base& le_champ_calcule() const { return le_champ_.valeur(); }
33 inline Champ_Fonc_base& le_champ_calcule() { return le_champ_.valeur(); }
34 inline const OBS_PTR(Champ_Generique_base)& le_champ() const { return le_champ_ref_; }
35
36 inline double temps_integrale() const { return tps_integrale_; } // le temps courant de l'integrale
37 inline double t_debut() const { return t_debut_; } // le temps de debut d'integration
38 inline double t_fin() const { return t_fin_; } // le temps de fin d'integration
39 inline double dt_integration() const { return dt_integr_calcul_; } // la duree d'integration deja effectuee
40 inline void fixer_t_debut(double t) { t_debut_ = t; } // Fixe le temps de debut d'integration
41 inline void fixer_t_fin(double t) { t_fin_ = t; } // Fixe le temps de fin d'integration
42 inline void fixer_dt_integr(double t) { dt_integr_calcul_ = t; }
43 inline void fixer_tps_integrale(double t) { tps_integrale_ = t; } // Fixe le temps courant de l'integrale (derniere date a laquelle on a mis l'integrale a jour)
44 inline void associer(const Champ_base&, int, double, double) { }
45 inline void associer(const Champ_Generique_base&, int, double, double);
46 virtual void mettre_a_jour_integrale();
47
48 virtual inline void mettre_a_jour(double)
49 {
51 double le_temps = le_champ_ref_->get_time();
52 le_champ_->changer_temps(le_temps);
53 }
54
55 void typer_champ(const Nom&);
56
57protected:
60 int puissance_ = -10;
61 double t_debut_ = -100., t_fin_ = -100.;
62 double tps_integrale_ = -100., dt_integr_calcul_ = -100.;
63};
64
65inline void Integrale_tps_Champ::associer(const Champ_Generique_base& le_ch, int n, double t0, double t1)
66{
67 le_champ_ref_ = le_ch;
68 puissance_ = n;
69 t_debut_ = t0;
70 t_fin_ = t1;
73}
74
75#endif /* Integrale_tps_Champ_included */
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
class Champ_Generique_base
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
void typer_champ(const Nom &)
OBS_PTR(Champ_Generique_base) le_champ_ref_
const OBS_PTR(Champ_Generique_base) &le_champ() const
void fixer_tps_integrale(double t)
Champ_Fonc_base & le_champ_calcule()
void fixer_dt_integr(double t)
void associer(const Champ_base &, int, double, double)
OWN_PTR(Champ_Fonc_base) le_champ_
virtual void mettre_a_jour(double)
const Champ_Fonc_base & le_champ_calcule() const
void fixer_t_debut(double t)
double dt_integration() const
double temps_integrale() const
virtual void mettre_a_jour_integrale()
Mets a jour l'integrale.
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55