TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Cond_lim_utilisateur_base.cpp
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#include <Cond_lim_utilisateur_base.h>
17#include <Entree_complete.h>
18#include <Probleme_base.h>
19#include <Equation_base.h>
20#include <Milieu_base.h>
21#include <SFichier.h>
22
23Implemente_base(Cond_lim_utilisateur_base, "Cond_lim_utilisateur_base", Cond_lim_base);
24
26
28
30{
31 if (je_suis_maitre())
32 {
33 SFichier conv("convert_jdd", ios::app);
34 conv << (*this) << " # " << ajout << finl;
35 }
36}
37
38void Cond_lim_utilisateur_base::lire(Entree& s, Equation_base& mon_eq, const Nom& nom_bord)
39{
40 nom_bord_ = nom_bord;
41 mon_equation = mon_eq;
42 la_cl_ = new Cond_lim;
43 Nom ajout("");
44 complement(ajout);
45#ifndef NDEBUG
46 ecrire(ajout);
47#endif
48 Entree_complete s_complete(ajout, s);
49
50 s_complete >> *(la_cl_);
51 Cerr << "end reading cond lim util" << finl;
52}
53
58
60{
61 Cerr << "Cond_lim_utilisateur_base::complement(Nom& ) does nothing" << finl;
62}
63
64/*! @brief renvoit 0 si le pb n'est pas rayonnant 1 si il est semi_transp
65 *
66 * 2 si il est transparent
67 *
68 */
70{
71 const Milieu_base& milieu = ref_cast(Milieu_base, mon_equation->probleme().milieu());
72
73 if (milieu.is_rayo_transp())
74 return 2;
75 else if (milieu.is_rayo_semi_transp())
76 return 1;
77 else
78 return 0;
79}
classe Cond_lim_base Classe de base pour la hierarchie des classes qui representent les differentes c...
classe Cond_lim_utilisateur_base: Les classes heritant de cette classe sont des classes utilisaturs
void lire(Entree &, Equation_base &, const Nom &nom_bord)
int is_pb_rayo()
renvoit 0 si le pb n'est pas rayonnant 1 si il est semi_transp
classe Cond_lim Classe generique servant a representer n'importe quelle classe
Definition Cond_lim.h:31
Cette classe se comporte comme EChaine tant que l'on n'est pas a la fin de la chaine.
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....
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
virtual bool is_rayo_transp() const
Definition Milieu_base.h:83
virtual bool is_rayo_semi_transp() const
Definition Milieu_base.h:82
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:76
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
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 int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
Definition Process.cpp:86
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27
Classe de base des flux de sortie.
Definition Sortie.h:52