mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3213 Observed data import. Handle custom vector naming. Fix failing unit tests
This commit is contained in:
@@ -41,6 +41,8 @@ RiuSummaryVectorInfo RiuSummaryVectorDescriptionMap::vectorInfo(const std::strin
|
||||
}
|
||||
else if (vectorName.size() > 1 && vectorName[1] == 'U')
|
||||
{
|
||||
// User defined vector name
|
||||
|
||||
std::string key = vectorName.substr(0, 2);
|
||||
|
||||
it = m_summaryToDescMap.find(key);
|
||||
@@ -50,6 +52,20 @@ RiuSummaryVectorInfo RiuSummaryVectorDescriptionMap::vectorInfo(const std::strin
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
else if (vectorName.size() > 5)
|
||||
{
|
||||
// Check for custom vector naming
|
||||
|
||||
std::string baseName = vectorName.substr(0, 5);
|
||||
while (baseName.back() == '_') baseName.pop_back();
|
||||
|
||||
it = m_summaryToDescMap.find(baseName);
|
||||
|
||||
if (it != m_summaryToDescMap.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
|
||||
return RiuSummaryVectorInfo();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user