TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
List_Equations_Scalaires_Passifs_Especes.cpp
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#include <List_Equations_Scalaires_Passifs_Especes.h>
17#include <Domaine_Cl_dis_base.h>
18#include <Probleme_base.h>
19
20Implemente_instanciable(List_Equations_Scalaires_Passifs_Especes,"Equations_Scalaires_Passifs|Equations_Especes",Equation_base);
21
23
25{
26 // Ici se situe un gros piratage
27 Motcle motlu;
28
29 is >> motlu;
30 if (motlu != "{")
31 {
32 Cerr << "Big problem in List_Equations_Scalaires_Passifs_Especes::readOn , we expected : { and not " << motlu << " !!!" << finl;
34 }
35 is >> motlu;
36 while (motlu != "}")
37 {
38 Nom nume(list_eq.size());
39 OWN_PTR(Equation_base) &Eqn_nvelle = list_eq.add(OWN_PTR(Equation_base)());
40 Eqn_nvelle.typer(motlu);
41 Equation_base& Eqn = ref_cast(Equation_base, Eqn_nvelle.valeur());
42
43 // maintenant on associe le pb
45 Eqn.associer_milieu_base(mil.valeur());
47
48 // on la discretise (pas fait par discretiser)
50 Eqn.discretiser();
51
52 // on change le nom de l'inconnue et de l equation
53 Nom nom;
54 nom = Eqn.inconnue().le_nom();
55 Nom nom_eq;
56 nom_eq = Eqn.le_nom();
57 nom += nume;
58 Cerr << "The unknown name is modified : new name " << nom << finl;
59 Eqn.inconnue().nommer(nom);
61
62 nom_eq += nume;
63 Cerr << "The equation name is modified : new name " << nom_eq << finl;
64 Eqn.nommer(nom_eq);
65 // enfin on lit
66 is >> Eqn;
67 is >> motlu;
68 }
69 complet = 1;
70 return is;
71}
72
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
const Nom & le_nom() const override
Renvoie le nom de l'equation.
virtual void associer_milieu_equation()
virtual void associer_milieu_base(const Milieu_base &)=0
virtual void associer_domaine_dis(const Domaine_dis_base &)
Associe le domaine discretise a l'equation.
void nommer(const Nom &nom) override
Methode appelee lorsqu'on cree l'instance de l'objet dans le jeu de donnees (Interprete::ajouter).
virtual void associer_pb_base(const Probleme_base &)
S'associe au Probleme passe en parametre.
OWN_PTR(Parametre_equation_base) &parametre_equation()
virtual const Champ_Inc_base & inconnue() const =0
void add_champs_compris(const Champ_base &ch)
Probleme_base & probleme()
Renvoie le probleme associe a l'equation.
virtual void associer_sch_tps_base(const Schema_Temps_base &)
S'associe au schema_en_temps.
Schema_Temps_base & schema_temps()
Renvoie le schema en temps associe a l'equation.
virtual void discretiser()
Discretise l'equation.
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
const Nom & le_nom() const override
Renvoie le nom du champ.
void nommer(const Nom &) override
Donne un nom au champ.
classe List_Equations_Scalaires_Passifs_Especes Represente une liste d'equations de scalaires passifs...
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52