Skip to content
Snippets Groups Projects
Commit 7a7f1c46 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Add missing state blocks filled with zeros

parent bc36f05e
No related branches found
No related tags found
1 merge request!377Resolve "Fix Problem::getState() and getState(ts)"
Pipeline #5626 passed
This commit is part of merge request !377. Comments created here will be created in the context of that merge request.
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment