TrioCFD 1.9.9_beta
TrioCFD documentation
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 // field used for initialization
28 bool is_initialized() { return bool(champ_initial_); }
29 const DoubleTab& initial_values() { return champ_initial_->valeurs(); }
30
31 // classic input field (maybe no more methods needed?)
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 */
class Champ_Don_base base class of Given Fields (not calculated)
const Domaine_dis_base & domaine_dis_base() const override
void setDoubleValue(const double val)
int initialiser(const double t) override
DOES NOTHING.
double changer_temps(const double t) override
Sets the time at which the field is defined.
void mettre_a_jour(double) override
Time update of the field.
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
Overrides Champ_base::valeurs() Returns the array of values.
const Nom & fixer_unite(int i, const Nom &unit) override
Specifies the unit of the i-th component of the field Meaning: the index of the field component whose...
const Nom & fixer_unite(const Nom &unit) override
Specifies the unit of a scalar field or whose all components have the same unit.
virtual DoubleTab & valeurs()=0
class Champ_input_P0
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31