Skip to content
Snippets Groups Projects
Commit 2a4822d4 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

GUIStandardTest now using checkSimulation

parent 147feaf8
No related branches found
No related tags found
No related merge requests found
...@@ -48,15 +48,22 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/, ...@@ -48,15 +48,22 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/,
return std::unique_ptr<OutputData<double>>(domain_simulation->result().data()); return std::unique_ptr<OutputData<double>>(domain_simulation->result().data());
} }
bool checkSimulation(const std::string& name, const Simulation& direct_simulation,
const double limit)
{
const std::unique_ptr<OutputData<double>> domain_data =
domainData(name, direct_simulation);
const std::unique_ptr<OutputData<double>> ref_data = direct_simulation.result().data();
return IntensityDataFunctions::checkRelativeDifference(*domain_data, *ref_data, limit);
}
} // namespace } // namespace
bool GUIStandardTest::runTest() bool GUIStandardTest::runTest()
{ {
m_reference_simulation->runSimulation(); m_reference_simulation->runSimulation();
const std::unique_ptr<OutputData<double>> ref_data = m_reference_simulation->result().data();
const std::unique_ptr<OutputData<double>> domain_data =
domainData(m_name, *m_reference_simulation);
return IntensityDataFunctions::checkRelativeDifference(*domain_data, *ref_data, m_threshold); return checkSimulation(m_name, *m_reference_simulation, m_threshold);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment