Commit 310b96d3 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

fixed benchmark tests

parent d46691da
......@@ -3,14 +3,15 @@
#include "MainProgram.hpp"
class TestEllipticResults : public TestWithParam<ConfigMapForTest> {
class TestEllipticResults : public TestWithParam<ConfigMapsForTest> {
protected:
std::unique_ptr<MainProgram> mainProgram;
void SetUp() override {
ConfigMapForTest configMapForTest;
std::map<std::string, std::string> finalMap = configMapForTest.defaultEllipticConfigMap;
std::map<std::string, std::string> additionalMap = GetParam().additionalConfigMap;
std::map<std::string, std::string> finalMap =
GetParam().defaultEllipticConfigMap;
std::map<std::string, std::string> additionalMap =
GetParam().additionalConfigMap;
for (auto &pair: additionalMap)
finalMap[pair.first] = pair.second;
......@@ -31,17 +32,17 @@ protected:
*
*/
class TestEllipticConvergenceResults : public TestEllipticResults{};
class TestEllipticConvergenceResults : public TestEllipticResults {};
INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticConvergenceResults, Values(
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
{"uniformSampleAmount", "500"},
{"Problem", "StochasticLaplace2D"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
......@@ -49,7 +50,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticConvergenceResults, Val
{"Problem", "StochasticLaplace2D"},
{"sigma", "1.5"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
......@@ -57,7 +58,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticConvergenceResults, Val
{"Problem", "StochasticLaplace2D"},
{"sigma", "2.0"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
......@@ -65,7 +66,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticConvergenceResults, Val
{"Problem", "StochasticLaplace2D"},
{"lambda", "0.05"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
......@@ -73,7 +74,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticConvergenceResults, Val
{"Problem", "StochasticLaplace2D"},
{"lambda", "0.15"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
......@@ -81,7 +82,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticConvergenceResults, Val
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.4"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
......@@ -89,7 +90,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticConvergenceResults, Val
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.8"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "ConvergenceTest"},
{"initLevels", "[3, 4, 5, 6, 7, 8, 9]"},
{"maxLevel", "9"},
......@@ -108,10 +109,10 @@ TEST_P(TestEllipticConvergenceResults, TestResults) {
*
*/
class TestEllipticMLMCResults : public TestEllipticResults{};
class TestEllipticMLMCResults : public TestEllipticResults {};
INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......@@ -120,7 +121,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.4"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......@@ -129,7 +130,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.4"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......@@ -138,7 +139,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.4"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......@@ -147,7 +148,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.4"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......@@ -156,7 +157,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.8"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......@@ -165,7 +166,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.8"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......@@ -174,7 +175,7 @@ INSTANTIATE_TEST_CASE_P(TestEllipticResults, TestEllipticMLMCResults, Values(
{"Problem", "StochasticLaplace2D"},
{"smoothing", "1.8"}}},
ConfigMapForTest{std::map<std::string, std::string>{
ConfigMapsForTest{defaultEllipticConfigMap, std::map<std::string, std::string>{
{"Experiment", "MLMCExperiment"},
{"initLevels", "[3, 4, 5]"},
{"initSampleAmount", "[12, 6, 3]"},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment