TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Iterateur_Source_base.h
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#ifndef Iterateur_Source_base_included
17#define Iterateur_Source_base_included
18
19#include <Domaine_Cl_dis_base.h>
20#include <TRUSTTabs_forward.h>
21#include <Equation_base.h>
22#include <TRUST_Deriv.h>
23#include <TRUST_Ref.h>
24
27class Source_base;
28
30{
31 Declare_base(Iterateur_Source_base);
32public:
33 virtual DoubleTab& ajouter(DoubleTab& ) const = 0;
35 virtual void completer_() = 0;
36
37 virtual DoubleTab& calculer(DoubleTab& resu) const
38 {
39 resu = 0.;
40 return ajouter(resu);
41 }
42
43 virtual int initialiser(double )
44 {
45 Process::exit("Iterateur_Source_base::initialiser must be overloaded !!");
46 return 0;
47 }
48
49 inline void associer(const Source_base& source) { so_base = source; }
50
51 inline int equation_divisee_par_rho() const
52 {
53 Nom nom_eqn = la_zcl->equation().que_suis_je();
54 return (nom_eqn.debute_par("Navier_Stokes")) ? 1 : 0;
55 }
56
57 inline void associer_domaines(const Domaine_dis_base& domaine, const Domaine_Cl_dis_base& domaine_cl)
58 {
59 le_dom = domaine;
60 la_zcl = domaine_cl;
61 }
62
63 virtual int impr(Sortie&) const
64 {
65 Process::exit("Iterateur_Source_base::impr must be overloaded !!");
66 return 0;
67 }
68
69protected:
73};
74
75#endif /* Iterateur_Source_base_included */
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
void associer(const Source_base &source)
OBS_PTR(Domaine_Cl_dis_base) la_zcl
virtual int initialiser(double)
virtual DoubleTab & ajouter(DoubleTab &) const =0
virtual void completer_()=0
virtual Evaluateur_Source & evaluateur()=0
virtual DoubleTab & calculer(DoubleTab &resu) const
OBS_PTR(Domaine_dis_base) le_dom
void associer_domaines(const Domaine_dis_base &domaine, const Domaine_Cl_dis_base &domaine_cl)
virtual int impr(Sortie &) const
OBS_PTR(Source_base) so_base
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
virtual int debute_par(const char *const n) const
Definition Nom.cpp:319
friend class Sortie
Definition Objet_U.h:75
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42