Skip to content
Snippets Groups Projects

Resolve "Fix Problem::getState() and getState(ts)"

Merged Joan Solà Ortega requested to merge 342-fix-problem-getstate-and-getstate-ts into devel
1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
+ 10
0
@@ -440,6 +440,7 @@ VectorComposite Problem::getState(const StateStructure& _structure) const
state.insert(pair_key_vec);
}
}
// check for empty blocks and fill them with zeros
for (const auto& ckey : frame_structure_)
{
@@ -483,6 +484,15 @@ VectorComposite Problem::getState (const TimeStamp& _ts, const StateStructure& _
state.insert(pair_key_vec);
}
}
// check for empty blocks and fill them with zeros
for (const auto& ckey : frame_structure_)
{
const auto& key = string(1,ckey);
if (state.count(key) == 0)
state.emplace(key, stateZero(key).at(key));
}
return state;
}
Loading