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

renaming to GeneratorValue to FunctionEvaluation

parent fe8aeb3c
......@@ -79,7 +79,7 @@ protected:
void run(SampleSolution &solution) override {}
void computeQ(SampleSolution &solution) override {
if (quantity == "GeneratorValue") solution.Q = assemble->GeneratorValue();
if (quantity == "FunctionEvaluation") solution.Q = assemble->FunctionEvaluation();
else Exit("Quantity of interest not implemented")
}
......
......@@ -10,7 +10,7 @@ private:
std::string _pc;
std::string _model = "DummyPDESolver";
std::string _problem = "StochasticDummyProblem";
std::string _quantity = "GeneratorValue";
std::string _quantity = "FunctionEvaluation";
std::string _costMeasure = "size";
std::string _linearSolver = "GMRES";
......
......@@ -55,8 +55,8 @@ public:
return 0.0;
};
double GeneratorValue() const {
return problem->GeneratorValue();
double FunctionEvaluation() const {
return problem->FunctionEvaluation();
}
};
......
......@@ -29,7 +29,7 @@ public:
explicit StochasticDummyProblem(const Meshes &meshes) :
IStochasticProblem(meshes) {}
virtual double GeneratorValue() = 0;
virtual double FunctionEvaluation() = 0;
};
class StochasticDummyScalarGeneratorProblem : public StochasticDummyProblem {
......@@ -43,7 +43,7 @@ public:
scalarGenerator.DrawSample(id);
}
double GeneratorValue() override {
double FunctionEvaluation() override {
return this->scalarGenerator.EvalSample();
}
......@@ -63,7 +63,7 @@ public:
complexGenerator.DrawSample(id);
}
double GeneratorValue() override {
double FunctionEvaluation() override {
return abs_compl(this->complexGenerator.EvalSample());
}
......@@ -80,7 +80,7 @@ public:
void DrawSample(const SampleID &id) override {}
double GeneratorValue() override {
double FunctionEvaluation() override {
return 0.0;
}
......@@ -97,7 +97,7 @@ public:
void DrawSample(const SampleID &id) override {}
double GeneratorValue() override {
double FunctionEvaluation() override {
return 0.0;
}
......@@ -117,7 +117,7 @@ public:
rVectorGenerator.DrawSample(id);
}
double GeneratorValue() override {
double FunctionEvaluation() override {
return this->rVectorGenerator.EvalSample().Mean();
}
......@@ -137,7 +137,7 @@ public:
cVectorGenerator.DrawSample(id);
}
double GeneratorValue() override {
double FunctionEvaluation() override {
return abs_compl(this->cVectorGenerator.EvalSample().Mean());
}
......@@ -157,7 +157,7 @@ public:
rMatrixGenerator.DrawSample(id);
}
double GeneratorValue() override {
double FunctionEvaluation() override {
return abs_compl(this->rMatrixGenerator.EvalSample().Mean());
}
......@@ -177,7 +177,7 @@ public:
cMatrixGenerator.DrawSample(id);
}
double GeneratorValue() override {
double FunctionEvaluation() override {
return abs_compl(this->cMatrixGenerator.EvalSample().Mean());
}
......
......@@ -2,14 +2,14 @@
INSTANTIATE_TEST_SUITE_P(TestMonteCarlo, TestMonteCarloWithoutEpsilon, Values(
TestParams{"StochasticDummyScalarGeneratorProblem", "GeneratorValue", "DummyPDESolver"},
TestParams{"StochasticDummyScalarGeneratorProblem", "FunctionEvaluation", "DummyPDESolver"},
TestParams{"StochasticLaplace2DTest", "L2", "LagrangeElliptic"},
TestParams{"StochasticLaplace2DTest", "Outflow", "HybridElliptic"}
// Todo add more test cases
));
INSTANTIATE_TEST_SUITE_P(TestMonteCarlo, TestMonteCarloWithEpsilon, Values(
TestParams{"StochasticDummyScalarGeneratorProblem", "GeneratorValue", "DummyPDESolver"},
TestParams{"StochasticDummyScalarGeneratorProblem", "FunctionEvaluation", "DummyPDESolver"},
TestParams{"StochasticLaplace2DTest", "L2", "LagrangeElliptic"},
TestParams{"StochasticLaplace2DTest", "Outflow", "HybridElliptic"}
// Todo add more test cases
......
......@@ -3,7 +3,7 @@
INSTANTIATE_TEST_SUITE_P(
TestMultilevelMonteCarlo, TestMultilevelMonteCarloWithoutEpsilon, Values(
TestParams{"StochasticDummyScalarGeneratorProblem", "GeneratorValue", "DummyPDESolver"},
TestParams{"StochasticDummyScalarGeneratorProblem", "FunctionEvaluation", "DummyPDESolver"},
TestParams{"StochasticLaplace2DTest", "L2", "LagrangeElliptic"},
TestParams{"StochasticLaplace2DTest", "Outflow", "HybridElliptic"}
));
......
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