Commit 338d4ef1 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

moved test params to test struct

parent f1625d96
......@@ -3,7 +3,7 @@
INSTANTIATE_TEST_SUITE_P(TestMonteCarlo, TestMonteCarloWithoutEpsilon, Values(
TestParams{"ScalarGeneratorProblem", "FunctionEvaluation", "DummyPDESolver"},
TestParams{"StochasticLaplace1D", "L2", "LagrangeElliptic"},
TestParams{"StochasticLaplace1D", "L2", "LagrangeElliptic", 5},
TestParams{"StochasticLaplace2D", "L2", "LagrangeElliptic"},
TestParams{"StochasticLaplace2DTest", "L2", "LagrangeElliptic"}
// TestParams{"StochasticLaplace2DTest", "Outflow", "HybridElliptic"}
......
......@@ -14,6 +14,10 @@ struct TestParams {
std::string quantity;
std::string model;
int level = 3;
bool onlyFine = true;
};
Logging &operator<<(Logging &s, const TestParams &testParams) {
......@@ -24,10 +28,6 @@ Logging &operator<<(Logging &s, const TestParams &testParams) {
class TestMonteCarlo : public TestWithParam<TestParams> {
protected:
bool onlyFine = true;
int level = 3;
int samples;
double epsilon;
......@@ -57,21 +57,21 @@ protected:
mcSeriell(EstimatorCreator(MONTE_CARLO).
WithPDESolverCreator(pdeSolverCreator).
WithOnlyFine(GetParam().onlyFine).
WithMeshesCreator(meshesCreator).
WithInitLevel(GetParam().level).
WithInitSamples(samples).
WithOnlyFine(onlyFine).
WithInitLevel(level).
WithEpsilon(epsilon).
WithParallel(false).
CreateUnique()),
mcParallel(EstimatorCreator(MONTE_CARLO).
WithPDESolverCreator(pdeSolverCreator).
WithOnlyFine(GetParam().onlyFine).
WithMeshesCreator(meshesCreator).
WithInitLevel(GetParam().level).
WithInitSamples(samples).
WithOnlyFine(onlyFine).
WithEpsilon(epsilon).
WithInitLevel(level).
WithParallel(true).
CreateUnique()) {}
......@@ -83,7 +83,6 @@ public:
TestMonteCarloWithoutEpsilon() : TestMonteCarlo(0.0, 100) {}
};
class TestMonteCarloWithEpsilon : public TestMonteCarlo {
// 0.01
// 0.003
......
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