← Documentation
ADS-IDAC Engine 5.0.0
ControlVariable.cpp
Go to the documentation of this file.
1// ControlVariable.cpp: implementation of the ControlVariables class.
2//
4
5#include "ControlVariable.h"
6#include <boost/serialization/export.hpp>
7#include <boost/archive/binary_oarchive.hpp>
8#include <boost/archive/binary_iarchive.hpp>
9BOOST_CLASS_EXPORT_IMPLEMENT(ControlVariable)
10using namespace std;
11
13// Construction/Destruction
15
17{
18 control_value = -1.0;
21 unit_of_control_value = "NOT_SPECIFIED";
23}
24
26{
27
28}
30 control_value = x;
31}
34}
37}
43}
48}
50 double xtemp;
51 xtemp = control_value;
52 if (xtemp > -1e-30 && xtemp < 1e-30) {
53 xtemp = 0.0;
54 }
55 fout << xtemp << ' '
56 << maximum_control_value << ' '
57 << minimum_control_value << ' '
58 << unit_of_control_value << '\n';
59 this->saveTHElementToFile(fout);
60}
62 fin >> control_value
67}
69 this->copyTHElement(_cv);
70 control_value = _cv.getControlValue(); //cnvarn
74}
document e
double minimum_control_value
virtual ~ControlVariable()
std::string unit_of_control_value
double getControlValue()
void setMaximumControlValue(double value)
void setControlValue(double value)
void setMinimumControlValue(double value)
void readInfoFromFile(std::ifstream &)
void setUnitOfControlValue(std::string unit)
std::string getUnitOfControlValue()
double maximum_control_value
void saveControlVariableToFile(std::ofstream &)
void copyControlVariable(ControlVariable &)
double getMaximumControlValue()
void retrieveControlVariableFromFile(std::ifstream &)
double getMinimumControlValue()
void setTypeOfCard(Relap5ComponentType newTypeOfCard)
Definition: THElement.cpp:35
void saveTHElementToFile(std::ofstream &)
Definition: THElement.cpp:36
void copyTHElement(THElement &)
Definition: THElement.cpp:42
void readInfoFromFile(std::ifstream &)
Definition: THElement.cpp:31
void retrieveTHElementFromFile(std::ifstream &)
Definition: THElement.cpp:39