Commit ff28ddb0 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

new test case

parent 7baedb9b
......@@ -2,11 +2,15 @@
INSTANTIATE_TEST_SUITE_P(TestMonteCarlo, TestMonteCarloSeriellInterval, Values(
TestStruct{"StochasticDummyScalarGeneratorProblem", 0.0, 0.0, 1.0, 1.0}
TestStruct{"StochasticDummyScalarGeneratorProblem", "GeneratorValue", "DummyPDESolver",
0.0, 0.0, 1.0, 1.0},
TestStruct{"StochasticLaplace2DTest", "L2", "LagrangeElliptic",
0.0, 0.0, 1.0, 1.0}
));
INSTANTIATE_TEST_SUITE_P(TestMonteCarlo, TestMonteCarloParallelInterval, Values(
TestStruct{"StochasticDummyScalarGeneratorProblem", 0.0, 0.0, 1.0, 1.0}
TestStruct{"StochasticDummyScalarGeneratorProblem", "GeneratorValue", "DummyPDESolver",
0.0, 0.0, 1.0, 1.0}
));
TEST_P(TestMonteCarloSeriellInterval, TestMethodOnlyFine) {
......@@ -26,6 +30,8 @@ TEST_P(TestMonteCarloParallelInterval, TestMethodOnlyFine) {
int main(int argc, char **argv) {
return MppTest(
MppTestBuilder(argc, argv).
WithConfigEntry("PDESolverVerbose", 2).
WithConfigEntry("NewtonVerbose", 0).
WithParallelListeners().
WithScreenLogging().
WithPPM()
......
......@@ -8,7 +8,11 @@
#include "TestEnvironment.hpp"
struct TestStruct {
std::string name;
std::string problemName;
std::string quantity ;
std::string model;
double MeanQ;
......@@ -27,22 +31,22 @@ protected:
int level = 3;
int dM = 1e6;
MeshesCreator meshesCreator;
int dM = 1e3;
PDESolverCreator pdeSolverCreator;
MeshesCreator meshesCreator;
MonteCarlo mc;
TestMonteCarlo(const std::string &meshName, bool parallel) :
meshesCreator(MeshesCreator("Interval").
pdeSolverCreator(PDESolverCreator().
WithProblem(GetParam().problemName).
WithQuantity(GetParam().quantity).
WithModel(GetParam().model)),
meshesCreator(MeshesCreator(pdeSolverCreator.GetMeshName()).
WithDistribute("RCB").
WithoutOverlap()),
pdeSolverCreator(PDESolverCreator().
WithProblem(GetParam().name).
WithQuantity("GeneratorValue").
WithModel("DummyPDESolver")),
mc(MonteCarlo(level, dM, onlyFine, parallel,
meshesCreator, pdeSolverCreator)) {
mc.Method();
......
Supports Markdown
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