mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6169 Element property table: invalidate Geo Mech results on changes in table.
This commit is contained in:
parent
1e06f6ae25
commit
a88191be33
@ -101,3 +101,11 @@ std::vector<RigFemResultAddress> RigFemPartResults::loadedResults() const
|
||||
}
|
||||
return currentResults;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartResults::deleteAllScalarResults()
|
||||
{
|
||||
resultSets.clear();
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
RigFemScalarResultFrames* createScalarResult( const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* findScalarResult( const RigFemResultAddress& resVarAddr );
|
||||
void deleteScalarResult( const RigFemResultAddress& resVarAddr );
|
||||
void deleteAllScalarResults();
|
||||
std::vector<RigFemResultAddress> loadedResults() const;
|
||||
|
||||
private:
|
||||
|
@ -599,6 +599,17 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::createScalarResult( int
|
||||
return m_femPartResults[partIndex]->createScalarResult( resVarAddr );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartResultsCollection::deleteAllScalarResults()
|
||||
{
|
||||
for ( cvf::ref<RigFemPartResults> results : m_femPartResults )
|
||||
{
|
||||
results->deleteAllScalarResults();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -147,6 +147,7 @@ public:
|
||||
|
||||
RigFemScalarResultFrames* findOrLoadScalarResult( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* createScalarResult( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
void deleteAllScalarResults();
|
||||
|
||||
bool isValidBiotData( const std::vector<float>& biotData, size_t elementCount ) const;
|
||||
static std::vector<std::string> getStressComponentNames( bool includeShear = true );
|
||||
|
@ -609,6 +609,7 @@ void RimGeoMechCase::addElementPropertyFiles( const std::vector<caf::FilePath>&
|
||||
if ( m_geoMechCaseData.notNull() )
|
||||
{
|
||||
geoMechData()->femPartResults()->addElementPropertyFiles( newFileNames );
|
||||
geoMechData()->femPartResults()->deleteAllScalarResults();
|
||||
}
|
||||
}
|
||||
|
||||
@ -747,9 +748,9 @@ void RimGeoMechCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
updateFormationNamesData();
|
||||
}
|
||||
|
||||
RigGeoMechCaseData* rigCaseData = geoMechData();
|
||||
if ( changedField == &m_cohesion || changedField == &m_frictionAngleDeg )
|
||||
{
|
||||
RigGeoMechCaseData* rigCaseData = geoMechData();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
{
|
||||
rigCaseData->femPartResults()->setCalculationParameters( m_cohesion(),
|
||||
@ -761,7 +762,6 @@ void RimGeoMechCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
else if ( changedField == &m_biotFixedCoefficient || changedField == &m_biotCoefficientType ||
|
||||
changedField == &m_biotResultAddress )
|
||||
{
|
||||
RigGeoMechCaseData* rigCaseData = geoMechData();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
{
|
||||
if ( m_biotCoefficientType() == RimGeoMechCase::BiotCoefficientType::BIOT_NONE )
|
||||
@ -810,7 +810,6 @@ void RimGeoMechCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
else if ( changedField == &m_initialPermeabilityFixed || changedField == &m_initialPermeabilityType ||
|
||||
changedField == &m_initialPermeabilityResultAddress || changedField == &m_permeabilityExponent )
|
||||
{
|
||||
RigGeoMechCaseData* rigCaseData = geoMechData();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
{
|
||||
if ( m_initialPermeabilityType() == RimGeoMechCase::InitialPermeabilityType::INITIAL_PERMEABILITY_FIXED )
|
||||
@ -861,19 +860,34 @@ void RimGeoMechCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
{
|
||||
m_reloadElementPropertyFileCommand = false;
|
||||
reloadSelectedElementPropertyFiles();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
{
|
||||
rigCaseData->femPartResults()->deleteAllScalarResults();
|
||||
}
|
||||
updateConnectedEditors();
|
||||
updateConnectedViews();
|
||||
}
|
||||
else if ( changedField == &m_closeElementPropertyFileCommand )
|
||||
{
|
||||
m_closeElementPropertyFileCommand = false;
|
||||
closeSelectedElementPropertyFiles();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
{
|
||||
rigCaseData->femPartResults()->deleteAllScalarResults();
|
||||
}
|
||||
updateConnectedEditors();
|
||||
updateConnectedViews();
|
||||
}
|
||||
else if ( changedField == &m_importElementPropertyFileCommand )
|
||||
{
|
||||
m_importElementPropertyFileCommand = false;
|
||||
importElementPropertyFile();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
{
|
||||
rigCaseData->femPartResults()->deleteAllScalarResults();
|
||||
}
|
||||
updateConnectedEditors();
|
||||
updateConnectedViews();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1002,6 +1016,7 @@ void RimGeoMechCase::closeSelectedElementPropertyFiles()
|
||||
if ( m_geoMechCaseData.notNull() )
|
||||
{
|
||||
addressesToDelete = geoMechData()->femPartResults()->removeElementPropertyFiles( filesToClose );
|
||||
geoMechData()->femPartResults()->deleteAllScalarResults();
|
||||
}
|
||||
|
||||
for ( RimGeoMechView* view : geoMechViews() )
|
||||
|
Loading…
Reference in New Issue
Block a user