Commit 70fbae89 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

worked on TestStochasticCollocation

parent 4a540a65
Pipeline #157938 failed with stages
in 7 minutes and 24 seconds
#include "TestStochasticCollocation.hpp"
INSTANTIATE_TEST_SUITE_P(
TestStochasticCollocation, TestStochasticCollocationWithoutEpsilon, Values(
TestParams{"SparseGrid2DGeneratorProblem", "FunctionEvaluation", "DummyPDESolver"}
// Todo add more test cases
));
TEST_P(TestStochasticCollocationWithoutEpsilon, TestSeriellAgainstParallel) {
mout << GetParam() << endl;
mout.StartBlock("Stochastic Collocation seriell");
mout << "Start" << endl;
scSeriell->Method();
mout.EndBlock();
mout << endl;
scSeriell->EstimatorResults();
}
int main(int argc, char **argv) {
return MppTest(
......
......@@ -35,12 +35,6 @@ protected:
std::unique_ptr<Estimator> scSeriell;
std::unique_ptr<Estimator> scParallel;
double MeanTolerance() const { return sqrt(1.0 / samples); }
double SVarTolerance() const { return sqrt(10.0 / samples); }
TestStochasticCollocation(double epsilon, int samples) :
samples(samples), epsilon(epsilon),
meshesCreator(MeshesCreator().
......@@ -52,25 +46,21 @@ protected:
WithQuantity(GetParam().quantity).
WithModel(GetParam().model)),
scSeriell(EstimatorCreator("MonteCarlo").
scSeriell(EstimatorCreator("StochasticCollocation").
WithPDESolverCreator(pdeSolverCreator).
WithMeshesCreator(meshesCreator).
WithInitSamples(samples).
WithStochLevel(6).
WithOnlyFine(onlyFine).
WithInitLevel(level).
WithEpsilon(epsilon).
WithParallel(false).
CreateUnique()),
scParallel(EstimatorCreator("MonteCarlo").
WithPDESolverCreator(pdeSolverCreator).
WithMeshesCreator(meshesCreator).
WithInitSamples(samples).
WithOnlyFine(onlyFine).
WithEpsilon(epsilon).
WithInitLevel(level).
WithParallel(true).
CreateUnique()) {}
};
class TestStochasticCollocationWithoutEpsilon : public TestStochasticCollocation {
public:
TestStochasticCollocationWithoutEpsilon() :
TestStochasticCollocation(0.0, 0) {}
};
#endif //TESTSTOCHASTICCOLLOCATION_HPP
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