OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Types.h
Go to the documentation of this file.
1 #ifndef __TYPES_H__
2 #define __TYPES_H__
3 
4 #include <vector>
5 #include <map>
6 
7 #include <boost/serialization/map.hpp>
8 #include "boost/serialization/vector.hpp"
9 #include "boost/tuple/tuple.hpp"
10 
11 #include "boost/variant.hpp"
12 #include "boost/fusion/adapted/struct/adapt_struct.hpp"
13 #include "boost/fusion/include/adapt_struct.hpp"
14 
15 #include "Expression/Expression.h"
16 
17 //FIXME: add namespaces
18 
21 
22 
23 // Variables
24 
25 // information the optimizer can request: either wants a derivative or a
26 // function evaluation.
29 
30 typedef std::pair<std::string, double> namedVariable_t;
31 typedef std::map<std::string, double> namedVariableCollection_t;
32 
35 
38 //typedef boost::variant< double, boost::tuple<double, double, double> >
39  //reqVarValue_t;
40 
41 //FIXME: do we need InfoType_t ?
50 typedef struct {
52  std::vector<double> value;
53  bool is_valid;
54 
55  template<class Archive>
56  void serialize(Archive & ar, const unsigned int version) {
57  ar & type;
58  ar & value;
59  ar & is_valid;
60  }
61 } reqVarInfo_t;
62 
63 typedef std::pair<std::string, reqVarInfo_t> namedReqVar_t;
64 typedef std::map<std::string, reqVarInfo_t> reqVarContainer_t;
65 
66 
67 
69 typedef boost::tuple<std::string, double, double> DVar_t;
70 enum DVar_tIdx {
74 };
75 
76 typedef std::pair<std::string, DVar_t> namedDVar_t;
77 typedef std::map<std::string, DVar_t> DVarContainer_t;
78 
79 #endif
DVar_tIdx
Definition: Types.h:70
std::map< std::string, reqVarInfo_t > reqVarContainer_t
Definition: Types.h:64
void serialize(Archive &ar, const unsigned int version)
Definition: Types.h:56
std::pair< std::string, double > namedVariable_t
Definition: Types.h:30
Role_t
roles a processor can attain
Definition: Types.h:20
Definition: Types.h:20
std::map< std::string, double > namedVariableCollection_t
Definition: Types.h:31
Definition: Types.h:27
Position_t
Definition: Types.h:28
InfoType_t
Definition: Types.h:27
std::pair< std::string, reqVarInfo_t > namedReqVar_t
Definition: Types.h:63
Definition: Types.h:71
bool is_valid
Definition: Types.h:53
namedVariableCollection_t Param_t
Definition: Types.h:33
int version
opal version of input file
Definition: Options.cpp:97
Definition: Types.h:28
boost::tuple< std::string, double, double > DVar_t
type of design variables
Definition: Types.h:69
std::pair< std::string, DVar_t > namedDVar_t
Definition: Types.h:76
std::map< std::string, DVar_t > DVarContainer_t
Definition: Types.h:77
Definition: Types.h:27
Definition: Types.h:20
std::map< std::string, double > variableDictionary_t
Definition: Expression.h:26
InfoType_t type
Definition: Types.h:51
std::vector< double > value
Definition: Types.h:52
Definition: Types.h:28