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

use everything again

parent d6a32953
......@@ -97,54 +97,49 @@ IDiscretization *MainProgram::createDiscretization() {
Exit("\nDiscretization not found in " + modelName + "\n")
}
IStochasticProblemT<Vector> *MainProgram::createStochasticProblem() {
IStochasticProblem *MainProgram::createStochasticProblem() {
if (problemName == "StochasticLaplace1D")
return new StochasticLaplace1D(*meshes);
if (problemName == "StochasticLaplace2D")
return new StochasticLaplace2D(*meshes);
// if (problemName.find("StochasticPollution1D") != string::npos ||
// problemName.find("DeterministicPollution1D") != string::npos)
// return new StochasticPollution1D();
// if (problemName.find("StochasticPollutionCosHat1D") != string::npos ||
// problemName.find("DeterministicPollutionCosHat1D") != string::npos)
// return new StochasticPollutionCosHat1D();
// if (problemName.find("StochasticPollution2D") != string::npos ||
// problemName.find("DeterministicPollution2D") != string::npos)
// return new StochasticPollution2D();
// if (problemName.find("StochasticPollutionCosHat2D") != string::npos ||
// problemName.find("DeterministicPollutionCosHat2D") != string::npos)
// return new StochasticPollutionCosHat2D();
// if (problemName.find("StochasticPollutionMollifiedBar2D") != string::npos ||
// problemName.find("DeterministicPollutionMollifiedBar2D") != string::npos)
// return new StochasticPollutionMollifiedBar2D();
// if (problemName.find("StochasticInitialConditions2D") != string::npos)
// return nullptr;
if (problemName == "StochasticPollution1D")
return new StochasticPollution1D(*meshes);
if (problemName == "StochasticPollutionCosHat1D")
return new StochasticPollutionCosHat1D(*meshes);
if (problemName == "StochasticPollution2D")
return new StochasticPollution2D(*meshes);
if (problemName == "StochasticPollutionCosHat2D")
return new StochasticPollutionCosHat2D(*meshes);
if (problemName == "StochasticPollutionMollifiedBar2D")
return new StochasticPollutionMollifiedBar2D(*meshes);
if (problemName == "StochasticInitialConditions2D")
return nullptr;
Exit("\nProblem field not found in " + problemName + "\n")
}
IAssemble *MainProgram::createAssemble() {
IStochasticEllipticProblemT<Vector> *ellipticProblem =
dynamic_cast<IStochasticEllipticProblemT<Vector> * >(problem);
// StochasticTransportProblem *transportProblem =
// dynamic_cast<StochasticTransportProblem * >(problem);
//
// if (ellipticProblem != nullptr) {
IStochasticEllipticProblem *ellipticProblem =
dynamic_cast<IStochasticEllipticProblem * >(problem);
IStochasticTransportProblem *transportProblem =
dynamic_cast<IStochasticTransportProblem * >(problem);
if (ellipticProblem != nullptr) {
if (modelName == "LagrangeFEM")
return new LagrangeEllipticAssemble(disc, ellipticProblem);
// if (modelName == "MixedFEM")
// return new MixedEllipticAssemble(disc, ellipticProblem);
// if (modelName == "HybridFEM")
// return new HybridEllipticAssemble(disc, ellipticProblem);
if (modelName == "MixedFEM")
return new MixedEllipticAssemble(disc, ellipticProblem);
if (modelName == "HybridFEM")
return new HybridEllipticAssemble(disc, ellipticProblem);
// if (modelName == "DGFEM")
// return new DGEllipticAssemble(disc, ellipticProblem);
// }
//
// if (transportProblem != nullptr) {
// if (modelName == "DGTransport")
// return new DGTransportAssemble(disc, transportProblem, nullptr);
// if (modelName == "PGTransport")
// return nullptr; // Todo open research question
// }
}
if (transportProblem != nullptr) {
if (modelName == "DGTransport")
return new DGTransportAssemble(disc, transportProblem, nullptr);
if (modelName == "PGTransport")
return nullptr; // Todo open research question
}
Exit(("\nAssembling for Problem=" + problemName + " with Model=" +
modelName + " not implemented\n"))
......
......@@ -35,7 +35,7 @@ public:
Meshes *meshes;
IDiscretization *disc;
IStochasticProblemT<Vector> *problem;
IStochasticProblem *problem;
IAssemble *assemble;
MultilevelMonteCarlo *mlmc;
......@@ -81,7 +81,7 @@ private:
IDiscretization *createDiscretization();
IStochasticProblemT<Vector> *createStochasticProblem();
IStochasticProblem *createStochasticProblem();
IAssemble *createAssemble();
};
......
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