TrioCFD 1.9.9_beta
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 Returns 0 if the problem is not radiating, 1 if it is semi-transparent,
65 *
66 * 2 if it is 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}
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
class Cond_lim_utilisateur_base: Classes inheriting from this class are user classes
void lire(Entree &, Equation_base &, const Nom &nom_bord)
int is_pb_rayo()
Returns 0 if the problem is not radiating, 1 if it is semi-transparent,.
class Cond_lim Generic class used to represent any class
Definition Cond_lim.h:31
This class behaves like EChaine until the end of the string is reached.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Equation_base The role of an equation is the calculation of one or more fields....
Milieu_base This class is the base of the (physical) medium hierarchy.
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: a character string for naming TRUST objects.
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:71
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
Definition Process.cpp:82
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Definition SFichier.h:29
Base class for output streams.
Definition Sortie.h:52