TrioCFD 1.9.9_beta
TrioCFD documentation
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 */
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
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: a character string for naming TRUST objects.
Definition Nom.h:31
virtual int debute_par(const char *const n) const
Definition Nom.cpp:314
friend class Sortie
Definition Objet_U.h:70
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Definition Objet_U.cpp:54
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Source_base A Source_base object is a term appearing on the right-hand side of an.
Definition Source_base.h:42