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

sample adaption

parent cf722a00
#include "Sample.hpp"
int SampleID::MGLevel() const {
return level.MGLevel(coarse);
}
std::string SampleID::Str() const {
return "l:" + std::to_string(level.fine) +
"-m:" + std::to_string(number) +
......
......@@ -26,6 +26,8 @@ struct SampleID {
int MGLevel() const;
int l() const { return level.ActualLevel(coarse); };
std::string Str() const;
};
......@@ -40,9 +42,9 @@ struct SampleSolution {
Vector U;
SampleSolution(MatrixGraph *solMGraph,
SampleSolution(IDiscretization *disc,
const std::string &name = "U") :
U(Vector((*solMGraph))),
U(Vector((*disc))),
name(name) {
Init();
}
......@@ -58,7 +60,15 @@ struct SampleSolution {
SampleSolution(MatrixGraphs *solMGraphs,
const SampleID &id,
const std::string &name = "U") :
id(id), U(Vector((*solMGraphs)[id.MGLevel()])),
id(id), U(Vector((*solMGraphs)[id.l() - id.level.pLevel])),
name(name) {
Init();
}
SampleSolution(IDiscretization *disc,
const SampleID &id,
const std::string &name = "U") :
id(id), U(Vector(*disc, id.l())),
name(name) {
Init();
}
......
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