mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 06:33:05 -06:00
#7405 StimPlanModel: Case-insensitive facies/formation mapping for elastic properties
This commit is contained in:
parent
6c540ac762
commit
915b16dd78
@ -103,9 +103,10 @@ void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QSt
|
||||
// Group the items with a given facies key
|
||||
for ( RifElasticProperties item : rifElasticProperties )
|
||||
{
|
||||
if ( item.fieldName == fieldName &&
|
||||
( item.formationName == formationName || item.formationName == formationWildCard ) &&
|
||||
item.faciesName == faciesName )
|
||||
if ( item.fieldName.compare( fieldName, Qt::CaseInsensitive ) == 0 &&
|
||||
( item.formationName.compare( formationName, Qt::CaseInsensitive ) == 0 ||
|
||||
item.formationName == formationWildCard ) &&
|
||||
item.faciesName.compare( faciesName, Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
matchingFacies.push_back( item );
|
||||
}
|
||||
|
@ -81,5 +81,20 @@ private:
|
||||
caf::PdmChildField<RimElasticPropertyScalingCollection*> m_scalings;
|
||||
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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user