mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
Specify part id for well extraction from geomech data (#10240)
* Specify part id for well extraction from geomech data * Make sure we clear curve data if there isn't any valid input data
This commit is contained in:
parent
5ee764af48
commit
1d43e1a948
@ -40,14 +40,14 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( Ri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase, int partId )
|
||||
{
|
||||
if ( !( wellPath && geomCase ) ) return nullptr;
|
||||
|
||||
auto wlPlotCollection = wellLogPlotCollection();
|
||||
if ( !wlPlotCollection ) return nullptr;
|
||||
|
||||
return wlPlotCollection->findOrCreateExtractor( wellPath, geomCase );
|
||||
return wlPlotCollection->findOrCreateExtractor( wellPath, geomCase, partId );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -37,7 +37,7 @@ class QString;
|
||||
namespace RiaExtractionTools
|
||||
{
|
||||
RigEclipseWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase, int partId = 0 );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
|
||||
|
||||
|
@ -104,6 +104,7 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::no
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + eclCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor( eclCaseData, wellPathGeometry, errorIdName );
|
||||
|
||||
m_extractors.push_back( extractor.p() );
|
||||
|
||||
return extractor.p();
|
||||
@ -112,8 +113,8 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::no
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geomCase )
|
||||
RigGeoMechWellLogExtractor*
|
||||
RimPltPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId )
|
||||
{
|
||||
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
||||
{
|
||||
@ -124,17 +125,23 @@ RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::no
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
if ( ( m_geomExtractors[exIdx]->caseData() == geomCaseData ) &&
|
||||
( m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry ) && ( m_geomExtractors[exIdx]->partId() == partId ) )
|
||||
{
|
||||
return m_geomExtractors[exIdx].p();
|
||||
}
|
||||
}
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( geomCaseData, wellPathGeometry, errorIdName );
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( geomCaseData, partId, wellPathGeometry, errorIdName );
|
||||
|
||||
return extractor.p();
|
||||
if ( extractor->valid() )
|
||||
{
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
return extractor.p();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -58,7 +58,8 @@ public:
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimEclipseCase*> eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> eclCase );
|
||||
RigGeoMechWellLogExtractor*
|
||||
findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId );
|
||||
|
||||
void removeExtractors( const RigWellPath* wellPath );
|
||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||
|
@ -112,8 +112,8 @@ RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::no
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
||||
gsl::not_null<RimGeoMechCase*> geomCase )
|
||||
RigGeoMechWellLogExtractor*
|
||||
RimRftPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId )
|
||||
{
|
||||
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
||||
{
|
||||
@ -124,17 +124,23 @@ RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::no
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_geomExtractors[exIdx]->caseData() == caseData && m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
if ( ( m_geomExtractors[exIdx]->caseData() == caseData ) && ( m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry ) &&
|
||||
( m_geomExtractors[exIdx]->partId() == partId ) )
|
||||
{
|
||||
return m_geomExtractors[exIdx].p();
|
||||
}
|
||||
}
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, partId, wellPathGeometry, errorIdName );
|
||||
|
||||
return extractor.p();
|
||||
if ( extractor->valid() )
|
||||
{
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
return extractor.p();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -58,7 +58,8 @@ public:
|
||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimEclipseCase*> eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> eclCase );
|
||||
RigGeoMechWellLogExtractor*
|
||||
findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId );
|
||||
|
||||
void removeExtractors( const RigWellPath* wellPath );
|
||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||
|
@ -71,6 +71,7 @@ Rim3dWellLogExtractionCurve::Rim3dWellLogExtractionCurve()
|
||||
m_case = nullptr;
|
||||
|
||||
CAF_PDM_InitField( &m_timeStep, "CurveTimeStep", -1, "Time Step" );
|
||||
CAF_PDM_InitField( &m_geomPartId, "GeomPartId", 0, "Part Id" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_eclipseResultDefinition, "CurveEclipseResult", "" );
|
||||
m_eclipseResultDefinition.uiCapability()->setUiTreeHidden( true );
|
||||
@ -208,7 +209,8 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep( std::vector<doubl
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( m_case() );
|
||||
if ( geomCase )
|
||||
{
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, geomCase );
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor =
|
||||
RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, geomCase, m_geomPartId );
|
||||
|
||||
if ( geomExtractor.notNull() )
|
||||
{
|
||||
@ -439,7 +441,7 @@ void Rim3dWellLogExtractionCurve::fieldChangedByUi( const caf::PdmFieldHandle* c
|
||||
this->resetMinMaxValues();
|
||||
this->updateConnectedEditors();
|
||||
}
|
||||
else if ( changedField == &m_timeStep )
|
||||
else if ( ( changedField == &m_timeStep ) || ( changedField == &m_geomPartId ) )
|
||||
{
|
||||
this->resetMinMaxValues();
|
||||
this->updateConnectedEditors();
|
||||
@ -491,6 +493,7 @@ void Rim3dWellLogExtractionCurve::defineUiOrdering( QString uiConfigName, caf::P
|
||||
}
|
||||
else if ( geomCase )
|
||||
{
|
||||
curveDataGroup->add( &m_geomPartId );
|
||||
m_geomResultDefinition->uiOrdering( uiConfigName, *curveDataGroup );
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ private:
|
||||
private:
|
||||
caf::PdmPtrField<RimCase*> m_case;
|
||||
caf::PdmField<int> m_timeStep;
|
||||
caf::PdmField<int> m_geomPartId;
|
||||
|
||||
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
||||
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
||||
|
@ -131,6 +131,7 @@ RimWellLogExtractionCurve::RimWellLogExtractionCurve()
|
||||
m_geomResultDefinition->setAddWellPathDerivedResults( true );
|
||||
|
||||
CAF_PDM_InitField( &m_timeStep, "CurveTimeStep", 0, "Time Step" );
|
||||
CAF_PDM_InitField( &m_geomPartId, "GeomPartId", 0, "Part Id" );
|
||||
|
||||
// Add some space before name to indicate these belong to the Auto Name field
|
||||
CAF_PDM_InitField( &m_addCaseNameToCurveName, "AddCaseNameToCurveName", true, " Case Name" );
|
||||
@ -308,30 +309,17 @@ void RimWellLogExtractionCurve::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
if ( m_wellPath == m_refWellPath ) m_refWellPath = nullptr;
|
||||
this->loadDataAndUpdate( true );
|
||||
}
|
||||
else if ( changedField == &m_refWellPath )
|
||||
else if ( ( changedField == &m_refWellPath ) || ( changedField == &m_timeStep ) || ( changedField == &m_trajectoryType ) ||
|
||||
( changedField == &m_geomPartId ) )
|
||||
{
|
||||
this->loadDataAndUpdate( true );
|
||||
}
|
||||
else if ( changedField == &m_simWellName )
|
||||
else if ( ( changedField == &m_branchDetection ) || ( changedField == &m_branchIndex ) || ( changedField == &m_simWellName ) )
|
||||
{
|
||||
clearGeneratedSimWellPaths();
|
||||
|
||||
this->loadDataAndUpdate( true );
|
||||
}
|
||||
else if ( changedField == &m_trajectoryType )
|
||||
{
|
||||
this->loadDataAndUpdate( true );
|
||||
}
|
||||
else if ( changedField == &m_branchDetection || changedField == &m_branchIndex )
|
||||
{
|
||||
clearGeneratedSimWellPaths();
|
||||
|
||||
this->loadDataAndUpdate( true );
|
||||
}
|
||||
else if ( changedField == &m_timeStep )
|
||||
{
|
||||
this->loadDataAndUpdate( true );
|
||||
}
|
||||
|
||||
if ( changedField == &m_addCaseNameToCurveName || changedField == &m_addPropertyToCurveName ||
|
||||
changedField == &m_addWellNameToCurveName || changedField == &m_addTimestepToCurveName || changedField == &m_addDateToCurveName )
|
||||
@ -513,6 +501,10 @@ void RimWellLogExtractionCurve::extractData( bool* isUsin
|
||||
curveData.xUnits );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
clearCurveData();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -638,18 +630,26 @@ RimWellLogExtractionCurve::WellLogExtractionCurveData
|
||||
if ( caseData && wellPathGeometry )
|
||||
{
|
||||
std::string errorIdName = ( m_wellPath->name() + " " + geoMechCase->caseUserDescription() ).toStdString();
|
||||
wellExtractor = new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
||||
wellExtractor = new RigGeoMechWellLogExtractor( caseData, m_geomPartId, wellPathGeometry, errorIdName );
|
||||
|
||||
// make sure the resampling of the well path is done before the extraction of the curve data
|
||||
wellExtractor->resampleIntersections( maxDistanceBetweenCurvePoints.value() );
|
||||
if ( wellExtractor->valid() )
|
||||
{
|
||||
// make sure the resampling of the well path is done before the extraction of the curve data
|
||||
wellExtractor->resampleIntersections( maxDistanceBetweenCurvePoints.value() );
|
||||
}
|
||||
else
|
||||
{
|
||||
return curveData;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wellExtractor = wellLogCollection->findOrCreateExtractor( m_wellPath, geoMechCase );
|
||||
wellExtractor = wellLogCollection->findOrCreateExtractor( m_wellPath, geoMechCase, m_geomPartId );
|
||||
}
|
||||
|
||||
cvf::ref<RigGeoMechWellLogExtractor> refWellExtractor = wellLogCollection->findOrCreateExtractor( m_refWellPath, geoMechCase );
|
||||
cvf::ref<RigGeoMechWellLogExtractor> refWellExtractor =
|
||||
wellLogCollection->findOrCreateExtractor( m_refWellPath, geoMechCase, m_geomPartId );
|
||||
|
||||
auto [timeStepIdx, frameIdx] = geoMechCase->geoMechData()->femPartResults()->stepListIndexToTimeStepAndDataFrameIndex( m_timeStep );
|
||||
|
||||
@ -1062,6 +1062,7 @@ void RimWellLogExtractionCurve::defineUiOrdering( QString uiConfigName, caf::Pdm
|
||||
}
|
||||
else if ( geomCase )
|
||||
{
|
||||
curveDataGroup->add( &m_geomPartId );
|
||||
curveDataGroup->add( &m_wellPath );
|
||||
curveDataGroup->add( &m_refWellPath );
|
||||
RimWellLogCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
@ -1394,6 +1395,22 @@ void RimWellLogExtractionCurve::setGeoMechResultAddress( const RigFemResultAddre
|
||||
m_geomResultDefinition->setResultAddress( resAddr );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogExtractionCurve::setGeoMechPart( int partId )
|
||||
{
|
||||
m_geomPartId = partId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimWellLogExtractionCurve::geoMechPart() const
|
||||
{
|
||||
return m_geomPartId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -87,6 +87,8 @@ public:
|
||||
void setEclipseResultCategory( RiaDefines::ResultCatType catType );
|
||||
|
||||
void setGeoMechResultAddress( const RigFemResultAddress& resAddr );
|
||||
void setGeoMechPart( int partId );
|
||||
int geoMechPart() const;
|
||||
|
||||
void setTrajectoryType( TrajectoryType trajectoryType );
|
||||
void setWellName( QString wellName );
|
||||
@ -136,6 +138,7 @@ protected:
|
||||
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
||||
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
||||
caf::PdmField<int> m_timeStep;
|
||||
caf::PdmField<int> m_geomPartId;
|
||||
|
||||
caf::PdmField<bool> m_addCaseNameToCurveName;
|
||||
caf::PdmField<bool> m_addPropertyToCurveName;
|
||||
|
@ -114,7 +114,7 @@ RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase )
|
||||
RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase, int partId )
|
||||
{
|
||||
if ( !( wellPath && geoMechCase ) ) return nullptr;
|
||||
|
||||
@ -124,17 +124,22 @@ RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( Rim
|
||||
|
||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||
{
|
||||
if ( m_geomExtractors[exIdx]->caseData() == caseData && m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
||||
if ( ( m_geomExtractors[exIdx]->caseData() == caseData ) && ( m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry ) &&
|
||||
( m_geomExtractors[exIdx]->partId() == partId ) )
|
||||
{
|
||||
return m_geomExtractors[exIdx].p();
|
||||
}
|
||||
}
|
||||
|
||||
std::string errorIdName = ( wellPath->name() + " " + geoMechCase->caseUserDescription() ).toStdString();
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, partId, wellPathGeometry, errorIdName );
|
||||
if ( extractor->valid() )
|
||||
{
|
||||
m_geomExtractors.push_back( extractor.p() );
|
||||
return extractor.p();
|
||||
}
|
||||
|
||||
return extractor.p();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
const RigEclipseCaseData* eclCaseData );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase, int partId = 0 );
|
||||
|
||||
std::vector<RimWellLogPlot*> wellLogPlots() const;
|
||||
|
||||
|
@ -56,11 +56,16 @@ const double RigGeoMechWellLogExtractor::GRAVITY_ACCEL = 9.81; // m /
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor::RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
||||
int partId,
|
||||
gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName )
|
||||
: RigWellLogExtractor( wellpath, wellCaseErrorMsgName )
|
||||
, m_caseData( aCase )
|
||||
, m_partId( partId )
|
||||
{
|
||||
m_valid = ( ( partId < m_caseData->femParts()->partCount() ) && ( partId >= 0 ) );
|
||||
if ( !valid() ) return;
|
||||
|
||||
calculateIntersection();
|
||||
|
||||
m_waterDepth = calculateWaterDepth();
|
||||
@ -90,8 +95,8 @@ void RigGeoMechWellLogExtractor::performCurveDataSmoothing( int
|
||||
RigFemResultAddress shAddr( RIG_ELEMENT_NODAL, "ST", "S3" );
|
||||
RigFemResultAddress porBarResAddr( RIG_ELEMENT_NODAL, "POR-Bar", "" );
|
||||
|
||||
const std::vector<float>& unscaledShValues = resultCollection->resultValues( shAddr, 0, timeStepIndex, frameIndex );
|
||||
const std::vector<float>& porePressures = resultCollection->resultValues( porBarResAddr, 0, timeStepIndex, frameIndex );
|
||||
const std::vector<float>& unscaledShValues = resultCollection->resultValues( shAddr, m_partId, timeStepIndex, frameIndex );
|
||||
const std::vector<float>& porePressures = resultCollection->resultValues( porBarResAddr, m_partId, timeStepIndex, frameIndex );
|
||||
|
||||
std::vector<float> interfaceShValues = interpolateInterfaceValues( shAddr, timeStepIndex, frameIndex, unscaledShValues );
|
||||
std::vector<float> interfacePorePressures = interpolateInterfaceValues( porBarResAddr, timeStepIndex, frameIndex, porePressures );
|
||||
@ -210,7 +215,7 @@ QString RigGeoMechWellLogExtractor::curveData( const RigFemResultAddress& resAdd
|
||||
|
||||
CVF_ASSERT( resAddr.resultPosType != RIG_WELLPATH_DERIVED );
|
||||
|
||||
const std::vector<float>& resultValues = m_caseData->femPartResults()->resultValues( convResAddr, 0, timeStepIndex, frameIndex );
|
||||
const std::vector<float>& resultValues = m_caseData->femPartResults()->resultValues( convResAddr, m_partId, timeStepIndex, frameIndex );
|
||||
|
||||
if ( !resultValues.empty() )
|
||||
{
|
||||
@ -261,7 +266,7 @@ std::vector<RigGeoMechWellLogExtractor::WbsParameterSource>
|
||||
{
|
||||
RigFemResultAddress nativeAddr = parameter.femAddress( RigWbsParameter::GRID );
|
||||
|
||||
const std::vector<float>& unscaledResultValues = resultCollection->resultValues( nativeAddr, 0, timeStepIndex, frameIndex );
|
||||
const std::vector<float>& unscaledResultValues = resultCollection->resultValues( nativeAddr, m_partId, timeStepIndex, frameIndex );
|
||||
std::vector<float> interpolatedInterfaceValues =
|
||||
interpolateInterfaceValues( nativeAddr, timeStepIndex, frameIndex, unscaledResultValues );
|
||||
gridValues.resize( intersections().size(), std::numeric_limits<double>::infinity() );
|
||||
@ -292,7 +297,7 @@ std::vector<RigGeoMechWellLogExtractor::WbsParameterSource>
|
||||
tvdRKBs.push_back( tvdValue + m_wellPathGeometry->rkbDiff() );
|
||||
}
|
||||
RigFemResultAddress elementPropertyAddr = parameter.femAddress( RigWbsParameter::ELEMENT_PROPERTY_TABLE );
|
||||
elementPropertyValuesInput = &( resultCollection->resultValues( elementPropertyAddr, 0, timeStepIndex, frameIndex ) );
|
||||
elementPropertyValuesInput = &( resultCollection->resultValues( elementPropertyAddr, m_partId, timeStepIndex, frameIndex ) );
|
||||
if ( elementPropertyValuesInput )
|
||||
{
|
||||
RiaWellLogUnitTools<float>::convertValues( tvdRKBs,
|
||||
@ -591,7 +596,7 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData( const RigFemResultAddres
|
||||
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
|
||||
|
||||
// Load results
|
||||
std::vector<caf::Ten3f> vertexStressesFloat = resultCollection->tensors( stressResAddr, 0, timeStepIndex, frameIndex );
|
||||
std::vector<caf::Ten3f> vertexStressesFloat = resultCollection->tensors( stressResAddr, m_partId, timeStepIndex, frameIndex );
|
||||
if ( !vertexStressesFloat.size() ) return;
|
||||
|
||||
std::vector<caf::Ten3d> vertexStresses;
|
||||
@ -867,7 +872,7 @@ T RigGeoMechWellLogExtractor::interpolateGridResultValue( RigFemResultPosEnum
|
||||
const std::vector<T>& gridResultValues,
|
||||
int64_t intersectionIdx ) const
|
||||
{
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||
|
||||
size_t elmIdx = intersectedCellsGlobIdx()[intersectionIdx];
|
||||
@ -963,11 +968,9 @@ size_t RigGeoMechWellLogExtractor::gridResultIndexFace( size_t elementIdx, cvf::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigGeoMechWellLogExtractor::calculateIntersection()
|
||||
{
|
||||
CVF_ASSERT( m_caseData->femParts()->partCount() == 1 );
|
||||
|
||||
std::map<RigMDCellIdxEnterLeaveKey, HexIntersectionInfo> uniqueIntersections;
|
||||
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||
|
||||
for ( size_t wpp = 0; wpp < m_wellPathGeometry->wellPathPoints().size() - 1; ++wpp )
|
||||
@ -1030,7 +1033,7 @@ std::vector<size_t> RigGeoMechWellLogExtractor::findCloseCells( const cvf::Bound
|
||||
|
||||
if ( m_caseData->femParts()->partCount() )
|
||||
{
|
||||
m_caseData->femParts()->part( 0 )->findIntersectingCells( bb, &closeCells );
|
||||
m_caseData->femParts()->part( m_partId )->findIntersectingCells( bb, &closeCells );
|
||||
}
|
||||
return closeCells;
|
||||
}
|
||||
@ -1042,7 +1045,7 @@ cvf::Vec3d RigGeoMechWellLogExtractor::calculateLengthInCell( size_t cellIndex,
|
||||
{
|
||||
std::array<cvf::Vec3d, 8> hexCorners;
|
||||
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||
const int* cornerIndices = femPart->connectivities( cellIndex );
|
||||
|
||||
@ -1105,7 +1108,7 @@ caf::Ten3d RigGeoMechWellLogExtractor::transformTensorToWellPathOrientation( con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3f RigGeoMechWellLogExtractor::cellCentroid( size_t intersectionIdx ) const
|
||||
{
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||
|
||||
size_t elmIdx = intersectedCellsGlobIdx()[intersectionIdx];
|
||||
@ -1243,7 +1246,7 @@ std::vector<T> RigGeoMechWellLogExtractor::interpolateInterfaceValues( RigFemRes
|
||||
std::vector<T> interpolatedInterfaceValues;
|
||||
initializeResultValues( interpolatedInterfaceValues, intersections().size() );
|
||||
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
||||
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||
|
||||
#pragma omp parallel for
|
||||
for ( int64_t intersectionIdx = 0; intersectionIdx < static_cast<int64_t>( intersections().size() ); ++intersectionIdx )
|
||||
@ -1472,3 +1475,19 @@ double RigGeoMechWellLogExtractor::waterDepth() const
|
||||
{
|
||||
return m_waterDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RigGeoMechWellLogExtractor::partId() const
|
||||
{
|
||||
return m_partId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigGeoMechWellLogExtractor::valid() const
|
||||
{
|
||||
return m_valid;
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
|
||||
public:
|
||||
RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
||||
int partId,
|
||||
gsl::not_null<const RigWellPath*> wellpath,
|
||||
const std::string& wellCaseErrorMsgName );
|
||||
|
||||
@ -88,6 +89,9 @@ public:
|
||||
double waterDepth() const;
|
||||
double estimateWaterDepth() const;
|
||||
|
||||
int partId() const;
|
||||
bool valid() const;
|
||||
|
||||
private:
|
||||
enum WellPathTangentCalculation
|
||||
{
|
||||
@ -178,4 +182,6 @@ private:
|
||||
std::map<RigWbsParameter, double> m_userDefinedValues;
|
||||
|
||||
double m_waterDepth;
|
||||
int m_partId;
|
||||
bool m_valid;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user