mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6076 Simplify code
This commit is contained in:
@@ -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