mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
#6076 Simplify code
This commit is contained in:
1 parent
6a8c9e230f
commit
49d74a4bbb
1 file changed
+30
-32
@@ -183,52 +183,50 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep( std::vector<doubl
|
||||
CAF_ASSERT( values != nullptr );
|
||||
CAF_ASSERT( measuredDepthValues != nullptr );
|
||||
|
||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor;
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor;
|
||||
|
||||
RimWellPath* wellPath;
|
||||
firstAncestorOrThisOfType( wellPath );
|
||||
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case() );
|
||||
|
||||
if ( eclipseCase )
|
||||
{
|
||||
eclExtractor = RiaExtractionTools::wellLogExtractorEclipseCase( wellPath, eclipseCase );
|
||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor =
|
||||
RiaExtractionTools::wellLogExtractorEclipseCase( wellPath, eclipseCase );
|
||||
if ( eclExtractor.notNull() )
|
||||
{
|
||||
*measuredDepthValues = eclExtractor->cellIntersectionMDs();
|
||||
|
||||
m_eclipseResultDefinition->loadResult();
|
||||
|
||||
cvf::ref<RigResultAccessor> resAcc =
|
||||
RigResultAccessorFactory::createFromResultDefinition( eclipseCase->eclipseCaseData(),
|
||||
0,
|
||||
timeStep,
|
||||
m_eclipseResultDefinition );
|
||||
if ( resAcc.notNull() )
|
||||
{
|
||||
eclExtractor->curveData( resAcc.p(), values );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( m_case() );
|
||||
if ( geomCase )
|
||||
{
|
||||
geomExtractor = RiaExtractionTools::wellLogExtractorGeoMechCase( wellPath, geomCase );
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor =
|
||||
RiaExtractionTools::wellLogExtractorGeoMechCase( wellPath, geomCase );
|
||||
|
||||
if ( geomExtractor.notNull() )
|
||||
{
|
||||
*measuredDepthValues = geomExtractor->cellIntersectionMDs();
|
||||
|
||||
RimWellLogExtractionCurve::findAndLoadWbsParametersFromLasFiles( wellPath, geomExtractor.p() );
|
||||
|
||||
m_geomResultDefinition->loadResult();
|
||||
geomExtractor->curveData( m_geomResultDefinition->resultAddress(), timeStep, values );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( eclExtractor.notNull() && eclipseCase )
|
||||
{
|
||||
*measuredDepthValues = eclExtractor->cellIntersectionMDs();
|
||||
|
||||
m_eclipseResultDefinition->loadResult();
|
||||
|
||||
cvf::ref<RigResultAccessor> resAcc =
|
||||
RigResultAccessorFactory::createFromResultDefinition( eclipseCase->eclipseCaseData(),
|
||||
0,
|
||||
timeStep,
|
||||
m_eclipseResultDefinition );
|
||||
if ( resAcc.notNull() )
|
||||
{
|
||||
eclExtractor->curveData( resAcc.p(), values );
|
||||
}
|
||||
}
|
||||
else if ( geomExtractor.notNull() )
|
||||
{
|
||||
*measuredDepthValues = geomExtractor->cellIntersectionMDs();
|
||||
|
||||
RimWellLogExtractionCurve::findAndLoadWbsParametersFromLasFiles( wellPath, geomExtractor.p() );
|
||||
|
||||
m_geomResultDefinition->loadResult();
|
||||
geomExtractor->curveData( m_geomResultDefinition->resultAddress(), timeStep, values );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user