mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-03 20:57:39 -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();
|
||||
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 )
|
||||
{
|
||||
std::vector<RifElasticProperties> matchingFacies;
|
||||
|
@ -108,6 +108,14 @@ const RigElasticProperties& RimElasticProperties::propertiesForFacies( FaciesKey
|
||||
return m_properties.find( key )->second;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimElasticProperties::clearProperties()
|
||||
{
|
||||
m_properties.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
void setPropertiesForFacies( FaciesKey& key, const RigElasticProperties& properties );
|
||||
bool hasPropertiesForFacies( FaciesKey& key ) const;
|
||||
const RigElasticProperties& propertiesForFacies( FaciesKey& key ) const;
|
||||
void clearProperties();
|
||||
|
||||
void loadDataAndUpdate();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user