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

setting up time series

parent 52fe40ab
......@@ -13,46 +13,45 @@ typedef std::pair<double, double> RatePair;
class IStochasticLinearTransportAssemble : public ILinearTimeAssemble {
protected:
InfoEntries entries;
InfoEntries entries;
IStochasticTransportProblem *problem;
IStochasticTransportProblem *problem;
public:
explicit IStochasticLinearTransportAssemble(IStochasticTransportProblem *problem) :
ILinearTimeAssemble(TimeSeries()),
problem(problem) {
};
explicit IStochasticLinearTransportAssemble(IStochasticTransportProblem *problem) :
ILinearTimeAssemble(TimeSeries(problem->GetStartTime(), problem->GetEndTime(),
problem->GetStepSize(), "UniformTimeSeries")),
problem(problem) {
};
void DrawSample(const SampleID &id) {
problem->DrawSample(id);
}
void DrawSample(const SampleID &id) {
problem->DrawSample(id);
}
IStochasticTransportProblem *GetProblem() {
return problem;
};
IStochasticTransportProblem *GetProblem() {
return problem;
};
TimeSeries GetTimeSeries(const Vector &u) {
return TimeSeries(problem->GetStartTime(), problem->GetEndTime(),
problem->GetCFL() * u.GetMesh().MeshWidth().second,
"UniformTimeSeries");
}
TimeSeries GetTimeSeries(const Vector &u) {
return TimeSeries(problem->GetStartTime(), problem->GetEndTime(),
problem->GetCFL() * u.GetMesh().MeshWidth().second,
"UniformTimeSeries");
}
virtual IDiscretization *GetDisc() = 0;
virtual IDiscretization *GetDisc() = 0;
virtual ~IStochasticLinearTransportAssemble() = default;
virtual ~IStochasticLinearTransportAssemble() = default;
virtual double Energy(const Vector &u) const = 0;
virtual double Energy(const Vector &u) const = 0;
virtual double Mass(const Vector &u) const = 0;
virtual double Mass(const Vector &u) const = 0;
virtual double Error(double t, const Vector &u) const = 0;
virtual double Error(double t, const Vector &u) const = 0;
virtual RatePair InFlowOutFlowRate(const Vector &u) const = 0;
virtual RatePair InflowOutflow(const Vector &u) const = 0;
};
class IStochasticNonLinearTransportAssemble : public INonLinearTimeAssemble {
};
#endif //ISTOCHASTICTRANSPORTASSEMBLE_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