SPHinXsys
alpha version
|
The base of regression test for various method (time-averaged, ensemble-averaged, dynamic time warping) More...
#include <regression_test_base.h>
Inherits ObserveMethodType.
Inherited by SPH::RegressionTestTimeAveraged< ObserveMethodType >.
Public Member Functions | |
template<typename... ConstructorArgs> | |
RegressionTestBase (ConstructorArgs &&...args) | |
void | writeToXml (ObservedQuantityRecording< VariableType > *observe_method, size_t iteration=0) |
template<typename ReduceType > | |
void | writeToXml (BodyReducedQuantityRecording< ReduceType > *reduce_method, size_t iteration=0) |
void | readFromXml (ObservedQuantityRecording< VariableType > *observe_method) |
template<typename ReduceType > | |
void | readFromXml (BodyReducedQuantityRecording< ReduceType > *reduce_method) |
void | transposeTheIndex () |
void | readResultFromXml () |
void | writeResultToXml () |
void | readResultFromXml (int index_of_run_) |
void | writeResultToXml (int index_of_run_) |
void | writeToFile (size_t iteration=0) override |
void | writeXmlToXmlFile () |
void | readXmlFromXmlFile () |
Protected Attributes | |
std::string | input_folder_path_ |
std::string | in_output_filefullpath_ |
std::string | result_filefullpath_ |
std::string | runtimes_filefullpath_ |
std::string | converged |
XmlMemoryIO | xmlmemory_io_ |
XmlEngine | observe_xml_engine_ |
XmlEngine | result_xml_engine_in_ |
XmlEngine | result_xml_engine_out_ |
StdVec< std::string > | element_tag_ |
DoubleVec< VariableType > | current_result_ |
DoubleVec< VariableType > | current_result_trans_ |
DoubleVec< VariableType > | result_in_ |
TripleVec< VariableType > | result_ |
int | snapshot_ |
int | observation_ |
int | difference_ |
int | number_of_run_ |
int | label_for_repeat_ |
int | number_of_snapshot_old_ |
The base of regression test for various method (time-averaged, ensemble-averaged, dynamic time warping)
The results of current run is saved in a vector of vector. The inner vector gives the values on the observations points. The outer vector gives the snap shots of the observations. The results of all runs is saved in a triple vector, where the outermost vector gives the observations of the runs.
void SPH::RegressionTestBase< ObserveMethodType >::readResultFromXml | ( | ) |
transpose the current result (from snapshot*observation to observation*snapshot).
void SPH::RegressionTestBase< ObserveMethodType >::readResultFromXml | ( | int | index_of_run_ | ) |
write the result to the .xml file. (all result)
|
inline |
read current result from Xml file into Xml memory.
void SPH::RegressionTestBase< ObserveMethodType >::writeResultToXml | ( | ) |
read the result from the .xml file. (all result)
void SPH::RegressionTestBase< ObserveMethodType >::writeResultToXml | ( | int | index_of_run_ | ) |
write result to .xml (with different data structure to Base), here is observation * snapshot, which can be used for TA and DTW methods.
|
inlineoverride |
the interface to write observed quantity into xml memory.
|
inline |
the interface to write xml memory into Xml file.