mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-05 21:53:27 -06:00
#7117 Fix stale data when reimporting elastic properties
This commit is contained in:
parent
f12a3ed1ba
commit
8ce01c098a
@ -87,6 +87,11 @@ void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QSt
|
|||||||
|
|
||||||
RimElasticProperties* rimElasticProperties = stimPlanModelTemplate->elasticProperties();
|
RimElasticProperties* rimElasticProperties = stimPlanModelTemplate->elasticProperties();
|
||||||
if ( !rimElasticProperties ) rimElasticProperties = new RimElasticProperties;
|
if ( !rimElasticProperties ) rimElasticProperties = new RimElasticProperties;
|
||||||
|
|
||||||
|
// Clear the properties to avoid keeping data which has been deleted
|
||||||
|
// from the file since the last import.
|
||||||
|
rimElasticProperties->clearProperties();
|
||||||
|
|
||||||
for ( FaciesKey key : faciesKeys )
|
for ( FaciesKey key : faciesKeys )
|
||||||
{
|
{
|
||||||
std::vector<RifElasticProperties> matchingFacies;
|
std::vector<RifElasticProperties> matchingFacies;
|
||||||
|
@ -108,6 +108,14 @@ const RigElasticProperties& RimElasticProperties::propertiesForFacies( FaciesKey
|
|||||||
return m_properties.find( key )->second;
|
return m_properties.find( key )->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimElasticProperties::clearProperties()
|
||||||
|
{
|
||||||
|
m_properties.clear();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
void setPropertiesForFacies( FaciesKey& key, const RigElasticProperties& properties );
|
void setPropertiesForFacies( FaciesKey& key, const RigElasticProperties& properties );
|
||||||
bool hasPropertiesForFacies( FaciesKey& key ) const;
|
bool hasPropertiesForFacies( FaciesKey& key ) const;
|
||||||
const RigElasticProperties& propertiesForFacies( FaciesKey& key ) const;
|
const RigElasticProperties& propertiesForFacies( FaciesKey& key ) const;
|
||||||
|
void clearProperties();
|
||||||
|
|
||||||
void loadDataAndUpdate();
|
void loadDataAndUpdate();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user