TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champ_Input_P0_Composite.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 Champ_Input_P0_Composite_included
17#define Champ_Input_P0_Composite_included
18
19#include <Champ_input_P0.h>
20
21using ICoCo::TrioField;
22
24{
25 Declare_instanciable(Champ_Input_P0_Composite);
26public:
27 // champ utilise pour l'initialisation
28 bool is_initialized() { return bool(champ_initial_); }
29 const DoubleTab& initial_values() { return champ_initial_->valeurs(); }
30
31 // champ input classique (faut plus des methodes pt etre ?)
33
34 Champ_input_P0& input_field() { return champ_input_; }
35 DoubleTab& valeurs() override { return champ_input_.valeurs(); }
36 const DoubleTab& valeurs() const override { return champ_input_.valeurs(); }
37
38 void mettre_a_jour(double) override { }
39 int initialiser(const double t) override { return champ_input_.initialiser(t); }
40 double changer_temps(const double t) override { return champ_input_.changer_temps(t); }
41
42 const Nom& fixer_unite(const Nom& unit) override { return champ_input_.fixer_unite(unit); }
43 const Nom& fixer_unite(int i, const Nom& unit) override { return champ_input_.fixer_unite(i,unit); }
44
45 void associer_domaine_dis_base(const Domaine_dis_base& zdb) override { champ_input_.associer_domaine_dis_base(zdb); }
46 const Domaine_dis_base& domaine_dis_base() const override { return champ_input_.domaine_dis_base(); }
47
48 void getTemplate(TrioField& afield) const { champ_input_.getTemplate(afield); }
49 void setValue(const TrioField& afield) { champ_input_.setValue(afield); }
50 void setDoubleValue(const double val) { champ_input_.setDoubleValue(val); }
51
52private:
53 Champ_input_P0 champ_input_;
54 OWN_PTR(Champ_Don_base) champ_initial_;
55};
56
57#endif /* Champ_Input_P0_Composite_included */
classe Champ_Don_base classe de base des Champs donnes (non calcules)
const Domaine_dis_base & domaine_dis_base() const override
void setDoubleValue(const double val)
int initialiser(const double t) override
NE FAIT RIEN.
double changer_temps(const double t) override
Fixe le temps auquel se situe le champ.
void mettre_a_jour(double) override
Mise a jour en temps du champ.
const DoubleTab & valeurs() const override
void getTemplate(TrioField &afield) const
void associer_domaine_dis_base(const Domaine_dis_base &zdb) override
void setValue(const TrioField &afield)
DoubleTab & valeurs() override
Surcharge Champ_base::valeurs() Renvoie le tableau des valeurs.
const Nom & fixer_unite(int i, const Nom &unit) override
Specifie l'unite de la i-eme composante du champ Signification: l'index de la composante du champ don...
const Nom & fixer_unite(const Nom &unit) override
Specifie l'unite d'un champ scalaire ou dont toutes les composantes ont la meme unite.
virtual DoubleTab & valeurs()=0
class Champ_input_P0
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31