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

configs and and startet tests

parent ba5f78fe
#Model = LagrangeFEM
Model = LagrangeFEM
#Model = MixedFEM
Model = HybridFEM
#Model = HybridFEM
#Model = DGFEM
degree = 1
#sign = 1
#penalty = 20
Problem = StochasticLaplace1D
#Problem = StochasticLaplace1D
#Problem = DeterministicLaplace1D
#Problem = StochasticLaplace2D
Problem = StochasticLaplace2D
functional = L2
#functional = Energy
......@@ -29,12 +27,13 @@ initLevels = 3, 4, 5
initSampleAmount = 12, 6, 3
uniformSampleAmount = 500
epsilon = 0.01
epsilon = 0.005
mcOnly = false
epsilonList = 0.01, 0.005, 0.001
maxLevel = 9
plevel = 2
degree = 1
MainVerbose = 1
MCVerbose = 2
......@@ -52,7 +51,7 @@ sigma = 1.0
norm_p = 2
lambda1 = 0.15
lambda2 = 0.15
smoothing = 1.0
smoothing = 1.8
evtol = 1e-10
# Other
......
......@@ -3,19 +3,22 @@ Model = DGTransport
Overlap = dG1
flux_alpha = 1 #Upwind: 1, Central: 0
Problem = StochasticPollution1D
#Problem = StochasticPollution1D
#Problem = DeterministicPollution1D
#Problem = StochasticPollutionCosHat1D
#Problem = DeterministicPollutionCosHat1D
#Problem = StochasticPollution2D
#Problem = DeterministicPollution2D
#Problem = StochasticPollutionCosHat2D
#Problem = DeterministicPollutionCosHat2D
#Problem = StochasticPollutionMollifiedBar2D
Problem = StochasticPollutionMollifiedBar2D
#Problem = DeterministicPollutionMollifiedBar2D
scaling = 8
TimeSeries = uniform
startTime = 0.0
endTime = 1.0
endTime = 0.5
Kmax = 250
Keps = 1e-5
......@@ -40,7 +43,7 @@ Experiment = MLMCExperiment
#Experiment = MLMCOverEpsilon
initLevels = 4, 5, 6
initSampleAmount = 16, 4, 2
initSampleAmount = 12, 6, 2
uniformSampleAmount = 1
epsilon = 0.01
......@@ -54,13 +57,13 @@ degree = 2
MainVerbose = 1
MCVerbose = 2
MLMCVerbose = 2
PDEVerbose = 0
PDEVerbose = 1
GeneratorVerbose = 0
AssembleVerbose = 0
AssembleVerbose = 1
GeneratorPlotting = 0
MCPlotting = 0
MLMCPlotting = 0
GeneratorPlotting = 1
MCPlotting = 1
MLMCPlotting = 1
# Stochastic Field
mean = 1.0
......
......@@ -10,6 +10,7 @@ void MonteCarloTransport::initialize() {
}
void MonteCarloTransport::method() {
initialize();
for (int m = M; m < M + dM; m++) {
string sampleDirName = mkSampleDirName(m, true);
mkSampleDir(m, sampleDirName);
......
#include "gtest/gtest.h"
#include "m++.h"
#include "EllipticMain.h"
using namespace ::testing;
class TestEllipticProblems1D : public Test {
protected:
map<string, string> configMap = {
{"Model", "LagrangeFEM"},
{"degree", "1"},
{"Problem", "StochasticLaplace2D"}
{"plevel", "2"},
{"LinearSolver", "GMRES"},
{"Preconditioner", "SuperLU"},
{"Transfer", "MatrixTransfer"},
{"presmoothing", "5"},
{"postsmoothing", "5"},
{"SmootherDamp", "0.8"},
{"Smoother", "SGS"},
{"BasePreconditioner", "LIB_PS"},
{"BaseSolver", "LS"},
{"BaseSolverVerbose", "-1"},
{"LinearReduction", "1e-20"},
{"LinearEpsilon", "1e-10"},
{"LinearSteps", "800"},
{"LinearVerbose", "-1"},
{"NewtonVerbose", "-1"},
{"NewtonEpsilon", "1e-9"},
{"NewtonSteps", "1"},
{"NewtonLineSearchSteps", "0"},
{"DebugLevel", "-1"},
{"TimeLevel", "-1"},
{"MuteLevel", "-999"},
{"vtkplot", "1"}};
virtual void SetUo() {
}
};
TEST_F(TestEllipticProblems1D, LinearFEM) {
vector<string> problems = {"P0Test1D", "P1Test1D", "P2Test1D",
"P3Test1D", "P4Test1D"};
vector<string> levels = {"2", "3", "4", "5", "6"};
vector<string> degrees = {"0", "1", "2", "3", "4", "5", "6"};
configMap["Mesh"] = "LineDirichlet";
configMap["Model"] = "LagrangeFEM";
configMap["degree"] = "1";
for(auto &level: levels) {
configMap["level"] = level;
for(auto &problem : problems) {
configMap["Problem"] = problem;
config = Config(configMap);
std::unique_ptr<EllipticMain> ellipticMain = std::make_unique<EllipticMain>();
ellipticMain->run();
}
}
}
int main(int argc, char **argv) {
InitGoogleTest(&argc, argv);
Config::setSearchPath("../tutorial/tests/");
Config::setConfigFileName("m++.conf");
DPO dpo(&argc, argv);
TestEventListeners &listeners = UnitTest::GetInstance()->listeners();
if (!PPM->master()) {
delete listeners.Release(listeners.default_result_printer());
}
return RUN_ALL_TESTS();
}
\ No newline at end of file
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