44 template<
class ObserveMethodType>
48 using VariableType = decltype(ObserveMethodType::type_indicator_);
51 std::string input_folder_path_;
52 std::string in_output_filefullpath_;
53 std::string result_filefullpath_;
54 std::string runtimes_filefullpath_;
55 std::string converged;
67 DoubleVec<VariableType> current_result_;
68 DoubleVec<VariableType> current_result_trans_;
70 DoubleVec<VariableType> result_in_;
73 TripleVec<VariableType> result_;
75 int snapshot_, observation_;
79 int label_for_repeat_;
80 int number_of_snapshot_old_;
83 template<
typename... ConstructorArgs>
86 observe_xml_engine_(
"xml_observe_reduce", this->quantity_name_),
87 result_xml_engine_in_(
"result_xml_engine_in",
"result"),
88 result_xml_engine_out_(
"result_xml_engine_out",
"result")
90 input_folder_path_ = this->in_output_.input_folder_;
91 in_output_filefullpath_ = input_folder_path_ +
"/" + this->body_name_
92 +
"_" + this->quantity_name_ +
"_" + this->in_output_.restart_step_ +
".xml";
93 result_filefullpath_ = input_folder_path_ +
"/" + this->body_name_
94 +
"_" + this->quantity_name_ +
"_result.xml";
95 runtimes_filefullpath_ = input_folder_path_ +
"/" + this->body_name_
96 +
"_" + this->quantity_name_ +
"_runtimes.dat";
98 if (!fs::exists(runtimes_filefullpath_))
102 label_for_repeat_ = 0;
106 std::ifstream in_file(runtimes_filefullpath_.c_str());
107 in_file >> converged;
108 in_file >> number_of_run_;
109 in_file >> label_for_repeat_;
116 template <
typename ReduceType>
120 template <
typename ReduceType>
123 void transposeTheIndex();
132 ObserveMethodType::writeToFile(iteration);
133 writeToXml(
this, iteration);
void writeXmlToXmlFile()
Definition: regression_test_base.h:139
Definition: xml_engine.h:116
void writeResultToXml()
Definition: regression_test_base.hpp:112
XML class for xml input and output, this is GUI of simbody xml parser.
void readResultFromXml()
Definition: regression_test_base.hpp:90
The base of regression test for various method (time-averaged, ensemble-averaged, dynamic time warpin...
Definition: regression_test_base.h:45
void writeToFile(size_t iteration=0) override
Definition: regression_test_base.h:130
void readXmlFromXmlFile()
Definition: regression_test_base.h:145
void writeToXmlFile(const std::string &filefullpath)
Definition: xml_engine.cpp:67
write files for observed quantity
Definition: in_output.h:300
Definition: xml_engine.h:56
Classes for input and output functions.
write reduced quantity of a body
Definition: in_output.h:357
Definition: solid_body_supplementary.cpp:9