Commit 7ea012cf authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

implemented problem and deployed in pipeline

parent d2021e28
......@@ -53,7 +53,7 @@ mpitest-mlmc:
tags: [ docker ]
elliptic-exercises-mlmc:
elliptic-experiments-mlmc:
stage: experiments
variables:
GIT_STRATEGY: none
......@@ -74,6 +74,25 @@ elliptic-exercises-mlmc:
paths: [ Elliptic\ Experiments.html ]
elliptic-experiments-mlmc2:
stage: experiments
variables:
GIT_STRATEGY: none
RUN_EXPERIMENTS: ''
image: ${REGISTRY}/${IMAGE_NAME_MLMC}
timeout: '1h'
script:
- cd /mpp/notebooks
- ls -al
- jupyter nbconvert --ExecutePreprocessor.timeout=2400
--execute --to html Elliptic\ Experiments\ 2.ipynb
- cp Elliptic\ Experiments\ 2.html $CI_PROJECT_DIR/
dependencies: [ "build-mlmc" ]
tags: [ docker ]
artifacts:
paths: [ Elliptic\ Experiments.html ]
deploy-mlmc:
stage: deploy
variables:
......
......@@ -61,6 +61,11 @@ void EllipticPDESolver::plotSolution(SampleSolution &solution) {
assemble->SetFlux(solution.U, flux.U);
mpp::plot(flux.IdString()) << flux.U << mpp::endp;
// LagrangeDiscretization kappaDisc(meshes, 0, 0);
// SampleSolution kappa(&kappaDisc, solution.Id(), "Kappa");
// assemble->GetProblem()->Permeability(kappa.U);
// mpp::plot(kappa.IdString()) << kappa.U << mpp::endp;
delete pressureDisc;
}
......
......@@ -16,6 +16,11 @@ public:
virtual Scalar Load(const Point &x) const = 0;
virtual Tensor Permeability(const cell &c) const = 0;
// void Permeability(Vector &kappa) {
// for (cell c = kappa.cells(); c != kappa.cells_end(); ++c)
// Permeability(c);
// }
};
class StochasticLaplace1D : public IStochasticEllipticProblem {
......@@ -90,7 +95,7 @@ public:
class StochasticLaplace2DTest : public IStochasticEllipticProblem {
public:
StochasticLaplace2DTest(Meshes &meshes) :
IStochasticEllipticProblem(meshes, GeneratorNames{"UniformDistributionReal"}) {}
IStochasticEllipticProblem(meshes, GeneratorNames{"UniformDistributionRVector"}) {}
Scalar Solution(const Point &x) const override {
return -x[1];
......@@ -105,17 +110,14 @@ public:
Tensor Permeability(const cell &c) const override {
if (c()[1] > 0.125 && c()[1] < 0.375) {
if (c()[0] > 0.125 && c()[0] < 0.375)
// return this->genContainer.scalarGenerator->EvalSample() * One;
return 2 * One;
else {
return One;
}
} else {
return One;
return (1 + 0.5 * this->genContainer.rVectorGenerator->EvalSample()[0]) * One;
if (c()[0] > 0.625 && c()[0] < 0.875)
return (1 + 0.5 * this->genContainer.rVectorGenerator->EvalSample()[1]) * One;
}
return One;
}
string Name() const override { return "StochasticLaplace2D"; }
string Name() const override { return "StochasticLaplace2DTest"; }
};
class Laplace2D : public IStochasticEllipticProblem {
......
This diff is collapsed.
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