English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReLauncher: TMasterVar.h Source File
Uranie / ReLauncher v4.9.0
/* @license-end */
TMasterVar.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2024 CEA/DES
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Lesser General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or any
7// later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
18// $Id$
19// $Author$
20// $Date$
21// $Revision 1.2 $
22// $State$
24
32#ifndef __MASTER_VAR__
33#define __MASTER_VAR__
34
35#include <vector>
36
37//ROOT
38#include "Rtypes.h"
39#include "TObject.h"
40
41//URANIE
42#include "TEval.h"
43#include "UEntry.h"
44
45namespace URANIE
46{
47namespace Relauncher
48{
49
50// Abstract level
51class TMasterVar: public TObject
52{
53protected:
54 URANIE::DataServer::TAttribute *_ref;
55 int _id, _id2;
56
57public:
58 TMasterVar(URANIE::DataServer::TAttribute *, int);
59
60 URANIE::DataServer::TAttribute *getRef(){return _ref;}
61 bool match(URANIE::DataServer::TAttribute *one)
62 {
63 return one == _ref;
64 }
65 void allocCodeEntry(vector<URANIE::DataServer::UEntry*>&);
66 void allocGradEntry(vector<URANIE::DataServer::UEntry*>&);
67 void allocDataEntry(int, vector<URANIE::DataServer::UEntry*>&);
68
69 virtual bool isExported() = 0;
70 virtual bool put(int, const double*, double*) = 0;
71 virtual bool get(int, double*, double*) = 0;
72
73 virtual bool put(int, const double*, vector<URANIE::DataServer::UEntry*>* ) = 0;
74 virtual bool get(int, double*, vector<URANIE::DataServer::UEntry *>*) = 0;
75
76 virtual bool put(int, const vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*) = 0;
77 virtual bool get(int, vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*) = 0;
78};
79
80class TInputVar: public TMasterVar
81{
82public:
83 TInputVar(URANIE::DataServer::TAttribute *, int);
84
85 virtual bool isExported();
86 virtual bool isValid();
87 virtual bool put(int, const double*, double*);
88 virtual bool get(int, double*, double*);
89
90 virtual bool put(int, const double*, vector<URANIE::DataServer::UEntry*>*);
91 virtual bool get(int, double*, vector<URANIE::DataServer::UEntry *>*);
92
93 virtual bool put(int, const vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*);
94 virtual bool get(int, vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*);
95};
96
98{
99protected:
100 bool _temp;
101
102public:
103 TOutputVar(URANIE::DataServer::TAttribute *, int, int);
104
105 void setTemp();
106 void reindice(int);
107
108 virtual bool isExported();
109 virtual bool isPre();
110 virtual bool isPost();
111 virtual bool put(int, const double*, double*);
112 virtual bool get(int, double*, double*);
113
114 virtual bool put(int, const double*, vector<URANIE::DataServer::UEntry*>*);
115 virtual bool get(int, double*, vector<URANIE::DataServer::UEntry *>*);
116
117 virtual bool put(int, const vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*);
118 virtual bool get(int, vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*);
119};
120
121// Concrete level
122class TSolvVar: public TInputVar
123{
124public:
125 TSolvVar(URANIE::DataServer::TAttribute *, int);
126};
127
128class TConstVar: public TInputVar
129{
130protected:
131 URANIE::DataServer::UEntry *_val;
133
134public:
135 TConstVar(URANIE::DataServer::TAttribute *);
136 ~TConstVar();
137
138 void saveValue(bool b){ _keepit=b;}
139 bool getSaveValue(){ return _keepit;}
140 void setValue(double);
141 void setValue(URANIE::DataServer::UEntry*);
142 URANIE::DataServer::UEntry *getValue(){return _val;}
143
144 virtual bool isExported();
145 virtual bool isValid();
146 virtual bool put(int, const double*, double*);
147 virtual bool get(int, double*, double*);
148
149 virtual bool put(int, const double*, vector<URANIE::DataServer::UEntry*>*);
150 virtual bool get(int, double*, vector<URANIE::DataServer::UEntry*>*);
151
152 virtual bool put(int, const vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*);
153 virtual bool get(int, vector<URANIE::DataServer::UEntry*>*, vector<URANIE::DataServer::UEntry*>*);
154};
155
156class TAuxiVar: public TInputVar
157{
158public:
159 TAuxiVar(URANIE::DataServer::TAttribute *, int);
160};
161
162class TCodeVar: public TOutputVar
163{
164public:
165 TCodeVar(URANIE::DataServer::TAttribute *, int, int);
166
167};
168
169class TPreVar: public TOutputVar
170{
171public:
172 TPreVar(URANIE::DataServer::TAttribute *, int, int);
173
174 virtual bool isPre();
175};
176
177class TPostVar: public TOutputVar
178{
179public:
180 TPostVar(URANIE::DataServer::TAttribute *, int, int);
181
182 virtual bool isPost();
183};
184
185
186}
187} // namespace
188
189#endif
evaluation dun jeu de parametres
Definition TMasterVar.h:157
Definition TMasterVar.h:163
Definition TMasterVar.h:129
bool getSaveValue()
Definition TMasterVar.h:139
void setValue(double)
Definition TMasterVar.cxx:264
bool _keepit
Definition TMasterVar.h:132
virtual bool isExported()
Definition TMasterVar.cxx:276
void saveValue(bool b)
Definition TMasterVar.h:138
virtual bool put(int, const double *, double *)
Definition TMasterVar.cxx:290
virtual bool get(int, double *, double *)
Definition TMasterVar.cxx:297
URANIE::DataServer::UEntry * getValue()
Definition TMasterVar.h:142
URANIE::DataServer::UEntry * _val
Definition TMasterVar.h:131
~TConstVar()
Definition TMasterVar.cxx:257
virtual bool isValid()
Definition TMasterVar.cxx:281
Definition TMasterVar.h:81
virtual bool get(int, double *, double *)
Definition TMasterVar.cxx:126
virtual bool isExported()
Definition TMasterVar.cxx:110
virtual bool put(int, const double *, double *)
Definition TMasterVar.cxx:120
virtual bool isValid()
Definition TMasterVar.cxx:115
Definition TMasterVar.h:52
virtual bool get(int, double *, vector< URANIE::DataServer::UEntry * > *)=0
URANIE::DataServer::TAttribute * getRef()
Definition TMasterVar.h:60
virtual bool put(int, const vector< URANIE::DataServer::UEntry * > *, vector< URANIE::DataServer::UEntry * > *)=0
void allocDataEntry(int, vector< URANIE::DataServer::UEntry * > &)
Definition TMasterVar.cxx:84
virtual bool get(int, vector< URANIE::DataServer::UEntry * > *, vector< URANIE::DataServer::UEntry * > *)=0
void allocCodeEntry(vector< URANIE::DataServer::UEntry * > &)
Definition TMasterVar.cxx:50
virtual bool put(int, const double *, double *)=0
virtual bool get(int, double *, double *)=0
virtual bool put(int, const double *, vector< URANIE::DataServer::UEntry * > *)=0
void allocGradEntry(vector< URANIE::DataServer::UEntry * > &)
Definition TMasterVar.cxx:68
int _id
Definition TMasterVar.h:55
URANIE::DataServer::TAttribute * _ref
Definition TMasterVar.h:54
int _id2
Definition TMasterVar.h:55
bool match(URANIE::DataServer::TAttribute *one)
Definition TMasterVar.h:61
Definition TMasterVar.h:98
virtual bool isPre()
Definition TMasterVar.cxx:180
virtual bool get(int, double *, double *)
Definition TMasterVar.cxx:197
virtual bool isExported()
Definition TMasterVar.cxx:175
void reindice(int)
Definition TMasterVar.cxx:170
virtual bool isPost()
Definition TMasterVar.cxx:185
void setTemp()
Definition TMasterVar.cxx:165
virtual bool put(int, const double *, double *)
Definition TMasterVar.cxx:190
bool _temp
Definition TMasterVar.h:100
Definition TMasterVar.h:178
virtual bool isPost()
Definition TMasterVar.cxx:359
Definition TMasterVar.h:170
virtual bool isPre()
Definition TMasterVar.cxx:348
Definition TMasterVar.h:123
Definition TBaseEval.cxx:44