mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7405 StimPlanModel: Case-insensitive facies/formation mapping for elastic properties
This commit is contained in:
committed by
Magne Sjaastad
parent
6c540ac762
commit
915b16dd78
@@ -103,9 +103,10 @@ void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QSt
|
|||||||
// Group the items with a given facies key
|
// Group the items with a given facies key
|
||||||
for ( RifElasticProperties item : rifElasticProperties )
|
for ( RifElasticProperties item : rifElasticProperties )
|
||||||
{
|
{
|
||||||
if ( item.fieldName == fieldName &&
|
if ( item.fieldName.compare( fieldName, Qt::CaseInsensitive ) == 0 &&
|
||||||
( item.formationName == formationName || item.formationName == formationWildCard ) &&
|
( item.formationName.compare( formationName, Qt::CaseInsensitive ) == 0 ||
|
||||||
item.faciesName == faciesName )
|
item.formationName == formationWildCard ) &&
|
||||||
|
item.faciesName.compare( faciesName, Qt::CaseInsensitive ) == 0 )
|
||||||
{
|
{
|
||||||
matchingFacies.push_back( item );
|
matchingFacies.push_back( item );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,5 +81,20 @@ private:
|
|||||||
caf::PdmChildField<RimElasticPropertyScalingCollection*> m_scalings;
|
caf::PdmChildField<RimElasticPropertyScalingCollection*> m_scalings;
|
||||||
caf::PdmField<bool> m_showScaledProperties;
|
caf::PdmField<bool> m_showScaledProperties;
|
||||||
|
|
||||||
std::map<FaciesKey, RigElasticProperties> m_properties;
|
struct CaseInsensitiveFaciesKeyCompare
|
||||||
|
{
|
||||||
|
bool operator()( const FaciesKey& f1, const FaciesKey& f2 ) const
|
||||||
|
{
|
||||||
|
int fieldCompare = std::get<0>( f1 ).compare( std::get<0>( f2 ), Qt::CaseInsensitive );
|
||||||
|
if ( fieldCompare != 0 ) return fieldCompare < 0;
|
||||||
|
|
||||||
|
int formationCompare = std::get<1>( f1 ).compare( std::get<1>( f2 ), Qt::CaseInsensitive );
|
||||||
|
if ( formationCompare != 0 ) return formationCompare < 0;
|
||||||
|
|
||||||
|
int faciesCompare = std::get<2>( f1 ).compare( std::get<2>( f2 ), Qt::CaseInsensitive );
|
||||||
|
return faciesCompare < 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
std::map<FaciesKey, RigElasticProperties, CaseInsensitiveFaciesKeyCompare> m_properties;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user