SPHinXsys  alpha version
Public Member Functions | Protected Attributes | List of all members
SPH::RegressionTestBase< ObserveMethodType > Class Template Reference

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_
 

Detailed Description

template<class ObserveMethodType>
class SPH::RegressionTestBase< ObserveMethodType >

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.

Member Function Documentation

◆ readResultFromXml() [1/2]

template<class ObserveMethodType >
void SPH::RegressionTestBase< ObserveMethodType >::readResultFromXml ( )

transpose the current result (from snapshot*observation to observation*snapshot).

◆ readResultFromXml() [2/2]

template<class ObserveMethodType >
void SPH::RegressionTestBase< ObserveMethodType >::readResultFromXml ( int  index_of_run_)

write the result to the .xml file. (all result)

◆ readXmlFromXmlFile()

template<class ObserveMethodType >
void SPH::RegressionTestBase< ObserveMethodType >::readXmlFromXmlFile ( )
inline

read current result from Xml file into Xml memory.

◆ writeResultToXml() [1/2]

template<class ObserveMethodType >
void SPH::RegressionTestBase< ObserveMethodType >::writeResultToXml ( )

read the result from the .xml file. (all result)

◆ writeResultToXml() [2/2]

template<class ObserveMethodType >
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.

◆ writeToFile()

template<class ObserveMethodType >
void SPH::RegressionTestBase< ObserveMethodType >::writeToFile ( size_t  iteration = 0)
inlineoverride

the interface to write observed quantity into xml memory.

◆ writeXmlToXmlFile()

template<class ObserveMethodType >
void SPH::RegressionTestBase< ObserveMethodType >::writeXmlToXmlFile ( )
inline

the interface to write xml memory into Xml file.


The documentation for this class was generated from the following files: