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

adding MGLevel to SampleID

parent d84d771c
......@@ -19,6 +19,10 @@ struct SampleID {
SampleID(Level level, int number, bool coarse) :
level(level), number(number), coarse(coarse) {}
int MGLevel() const {
return level.MGLevel(coarse);
}
std::string Str() const {
return "l:" + std::to_string(level.fine) +
"-m:" + std::to_string(number) +
......@@ -47,9 +51,8 @@ struct SampleSolution {
Init();
}
// Todo might crash if sampleID corresponds to coarse sample
SampleSolution(MatrixGraphs *solMGraphs, SampleID id) :
id(id), U(Vector((*solMGraphs)[id.level.mGfine])) {
SampleSolution(MatrixGraphs *solMGraphs, const SampleID &id) :
id(id), U(Vector((*solMGraphs)[id.MGLevel()])) {
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