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

added problem

parent ada30f3a
......@@ -3,10 +3,14 @@
IStochasticTransportProblem *
CreateStochasticTransportProblem(std::string problemName, Meshes &meshes) {
if (problemName == "CircleWave2D")
return new CircleWave2D(meshes);
if (problemName == "StochasticPollution1D")
return new StochasticPollution1D(meshes);
if (problemName == "Pollution1D")
return new Pollution1D(meshes);
if (problemName == "CircleWave2D")
return new CircleWave2D(meshes);
if (problemName == "StochasticPollutionCosHat1D")
return new StochasticPollutionCosHat1D(meshes);
if (problemName == "StochasticPollution2D")
......
......@@ -49,6 +49,27 @@ public:
string Name() const override { return "StochasticPollution1D"; }
};
class Pollution1D : public IStochasticTransportProblem {
public:
Pollution1D(Meshes &meshes) : IStochasticTransportProblem(meshes) {}
Scalar Solution(double t, const Point &x) const override {
if (abs(1.0 * t - x[0] + 0.5) > 0.06251) return 0.0;
return 1.0;
}
VectorField CellFlux(const cell &c, const Point &x) const override {
return VectorField(-1.0, 0.0);
}
Scalar FaceNormalFlux(const cell &c, int face, const VectorField &N,
const Point &x) const override {
return 1.0;
}
string Name() const override { return "Pollution1D"; }
};
class StochasticPollutionCosHat1D : public IStochasticTransportProblem {
private:
double amplitude = 1.00;
......
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