TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Pb_MED.h
1/****************************************************************************
2* Copyright (c) 2026, 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
17#ifndef Pb_MED_included
18#define Pb_MED_included
19
20#include <Discretisation_base.h>
21#include <Probleme_Couple.h>
22#include <Probleme_base.h>
23#include <Champs_Fonc.h>
24
25/*! @brief Classe Pb_MED Classe pour postraiter relire des fichiers med et les postraiter
26 */
27class Pb_MED : public Probleme_base
28{
29 Declare_instanciable(Pb_MED);
30
31public:
32
33 int nombre_d_equations() const override;
34 const Equation_base& equation(int) const override ;
35 Equation_base& equation(int) override;
36 int comprend_champ(const Motcle& ) const;
37
38 inline const ArrOfDouble& temps_sauv() const { return temps_sauv_ ; }
40
41 /////////////////////////////////////////////////////
42 //Methodes de l interface des champs postraitables
43 /////////////////////////////////////////////////////
44 void creer_champ(const Motcle& motlu) override;
45 const Champ_base& get_champ(const Motcle& nom) const override;
46 void get_noms_champs_postraitables(Noms& nom,Option opt=NONE) const override;
47 bool has_champ(const Motcle& nom, OBS_PTR(Champ_base) &ref_champ) const override;
48 bool has_champ(const Motcle& nom) const override;
49
50 void typer_lire_milieu(Entree& is) override { /* Do nothing */ }
51
52protected :
54
55private:
56 Nom nom_fic;
57 Noms nomschampmed;
58 Discretisation dis_bidon;
59 ArrOfDouble temps_sauv_;
60
61 //Une classe portant des champs postraitables possede normalement un
62 //attribut champs_compris_ qui contient une reference a ces champs.
63 //Dans le cas particulier des Pb_MED on ne declare pas cet attribut
64 //afin de pouvoir coder une methhode get_champ() tres specifique a ce
65 //type de probleme et qui n utilisera pas les methodes de Champs_compris.
66 //La methode get_noms_champs_postraitables() et creer_champ() ne manipuleront
67 //pas non plus de champs_compris_.
68
69 //Champs_compris champs_compris_;
70};
71
73{
74 Declare_instanciable(Pbc_MED);
75private:
76 OWN_PTR(Schema_Temps_base) sch_;
77};
78
79#endif
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Champs_Fonc Liste de OWN_PTR(Champ_Fonc_base) declaree grace a la macro LIST(X)
Definition Champs_Fonc.h:28
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
friend class Entree
Definition Objet_U.h:76
Classe Pb_MED Classe pour postraiter relire des fichiers med et les postraiter.
Definition Pb_MED.h:28
const Champ_base & get_champ(const Motcle &nom) const override
Definition Pb_MED.cpp:325
const Equation_base & equation(int) const override
Renvoie l'equation de type MED si i = 0,.
Definition Pb_MED.cpp:179
Champs_Fonc champs_fonc_post
Definition Pb_MED.h:53
Champs_Fonc & get_champs_fonc_post()
Definition Pb_MED.h:39
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
Definition Pb_MED.cpp:289
void typer_lire_milieu(Entree &is) override
Definition Pb_MED.h:50
const ArrOfDouble & temps_sauv() const
Definition Pb_MED.h:38
int nombre_d_equations() const override
Renvoie le nombre d'equations du probleme.
Definition Pb_MED.cpp:165
int comprend_champ(const Motcle &) const
Definition Pb_MED.cpp:205
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
Definition Pb_MED.cpp:359
void creer_champ(const Motcle &motlu) override
Definition Pb_MED.cpp:228
classe Probleme_Couple C'est la classe historique de couplage de TRUST.
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
OBS_PTR(Field_base) findInputField(const Nom &name) const override
class Schema_Temps_base