TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Interface_base.h
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#ifndef Interface_base_included
17#define Interface_base_included
18
19#include <TRUST_Ref.h>
20#include <Champ_Don_base.h>
21#include <span.hpp>
22#include <Param.h>
23
24class Probleme_base;
25
26using VectorD = std::vector<double>;
27using ArrayD = std::array<double,1>;
28using SpanD = tcb::span<double>;
29
30class Interface_base : public Objet_U
31{
32 Declare_base(Interface_base);
33public:
34 virtual void completer() { /* Do nothing */ }
35 virtual void set_param(Param& param) const override;
36 virtual void mettre_a_jour(double );
37 void assoscier_pb(const Probleme_base& pb) { pb_ = pb; }
38
39 Champ_Don_base& get_sigma_champ() { return ch_sigma_; }
40 const Champ_Don_base& get_sigma_champ() const { return ch_sigma_; }
41
42 void discretiser_sigma(const Nom& sig_nom, double temps);
43
44 DoubleTab& get_sigma_tab() { return ch_sigma_->valeurs(); }
45 const DoubleTab& get_sigma_tab() const { return ch_sigma_->valeurs(); }
46
47 // lois en T
48 double sigma(const double T, const double P) const; // can be called if point-to-point calculation is required
49 void sigma(const SpanD T, const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const;
50
51 // lois en h
52 double sigma_h(const double h, const double P) const; // can be called if point-to-point calculation is required
53 void sigma_h(const SpanD H, const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const;
54
55protected:
58 double sigma__ = -1.;
59
60 virtual void sigma_(const SpanD T, const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const = 0;
61 virtual void sigma_h_(const SpanD H, const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const = 0;
62};
63
64#endif /* Interface_base_included */
classe Champ_Don_base classe de base des Champs donnes (non calcules)
virtual void set_param(Param &param) const override
double sigma_h(const double h, const double P) const
DoubleTab & get_sigma_tab()
void discretiser_sigma(const Nom &sig_nom, double temps)
virtual void sigma_h_(const SpanD H, const SpanD P, SpanD res, int ncomp=1, int ind=0) const =0
virtual void sigma_(const SpanD T, const SpanD P, SpanD res, int ncomp=1, int ind=0) const =0
double sigma(const double T, const double P) const
OWN_PTR(Champ_Don_base) ch_sigma_
OBS_PTR(Probleme_base) pb_
virtual void completer()
const Champ_Don_base & get_sigma_champ() const
Champ_Don_base & get_sigma_champ()
const DoubleTab & get_sigma_tab() const
void assoscier_pb(const Probleme_base &pb)
virtual void mettre_a_jour(double)
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.