TrioCFD 1.9.9_beta
TrioCFD documentation
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 class Pb_MED Class for re-reading MED files and post-processing them.
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 // Methods of the post-processable fields interface
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 // A class carrying post-processable fields normally has an attribute
62 // champs_compris_ containing a reference to those fields.
63 // In the specific case of Pb_MED, this attribute is not declared,
64 // so that a very specific get_champ() method can be implemented for this
65 // problem type, which will not use the Champs_compris methods.
66 // The methods get_noms_champs_postraitables() and creer_champ() will also
67 // not manipulate 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
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Champs_Fonc List of OWN_PTR(Champ_Fonc_base) declared through the LIST(X) macro
Definition Champs_Fonc.h:28
class Equation_base The role of an equation is the calculation of one or more fields....
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
friend class Entree
Definition Objet_U.h:71
class Pb_MED Class for re-reading MED files and post-processing them.
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
Returns the MED-type equation if 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
Returns the number of equations in the problem.
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
Probleme_Couple This is the historical coupling class of TRUST.
class Probleme_base It is a Probleme_U that is not a coupling.
OBS_PTR(Field_base) findInputField(const Nom &name) const override
class Schema_Temps_base