mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 05:37:21 -05:00
#13126 RiaLogging: Use std::string_view instead of QString for logging
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "RiaCompletionTypeCalculationScheduler.h"
|
||||
#include "RiaFractureDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaStimPlanModelDefines.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
@@ -647,7 +648,7 @@ void RimStimPlanModel::updateDistanceToBarrierAndDip()
|
||||
const cvf::Vec3d& position = anchorPosition();
|
||||
|
||||
RiaLogging::info( "Computing distance to barrier." );
|
||||
RiaLogging::info( QString( "Anchor position: %1" ).arg( RigStimPlanModelTools::vecToString( position ) ) );
|
||||
RiaLogging::info( std::format( "Anchor position: {}", RigStimPlanModelTools::vecToString( position ) ) );
|
||||
|
||||
cvf::Vec3d fractureDirectionNormal = computeFractureDirectionNormal( wellPath(), position );
|
||||
|
||||
@@ -660,7 +661,7 @@ void RimStimPlanModel::updateDistanceToBarrierAndDip()
|
||||
cvf::Vec3d directionToBarrier = projectVectorIntoFracturePlane( position, fractureDirectionNormal, m_thicknessDirection );
|
||||
if ( directionToBarrier.isUndefined() ) return;
|
||||
|
||||
RiaLogging::info( QString( "Direction to barrier: %1" ).arg( RigStimPlanModelTools::vecToString( directionToBarrier ) ) );
|
||||
RiaLogging::info( std::format( "Direction to barrier: {}", RigStimPlanModelTools::vecToString( directionToBarrier ) ) );
|
||||
|
||||
auto [foundFault, shortestDistance, barrierPosition, barrierDip] =
|
||||
RigStimPlanModelTools::findClosestFaultBarrier( eclipseCaseData, position, directionToBarrier );
|
||||
@@ -668,7 +669,7 @@ void RimStimPlanModel::updateDistanceToBarrierAndDip()
|
||||
if ( foundFault )
|
||||
{
|
||||
RiaLogging::info(
|
||||
QString( "Found barrier distance: %1. Dip: %2. Fault: %3" ).arg( shortestDistance ).arg( barrierDip ).arg( foundFault->name() ) );
|
||||
QString( "Found barrier distance: %1. Dip: %2. Fault: %3" ).arg( shortestDistance ).arg( barrierDip ).arg( foundFault->name() ).toStdString() );
|
||||
QString barrierText =
|
||||
QString( "Barrier Fault for %1\nFault: %2\nDistance: %3m" ).arg( name() ).arg( foundFault->name() ).arg( shortestDistance );
|
||||
|
||||
@@ -706,11 +707,12 @@ cvf::Vec3d RimStimPlanModel::computeFractureDirectionNormal( RimWellPath* wellPa
|
||||
wellPathGeometry->twoClosestPoints( position, &p1, &p2 );
|
||||
RiaLogging::info( QString( "Closest points on well path: %1 %2" )
|
||||
.arg( RigStimPlanModelTools::vecToString( p1 ) )
|
||||
.arg( RigStimPlanModelTools::vecToString( p2 ) ) );
|
||||
.arg( RigStimPlanModelTools::vecToString( p2 ) )
|
||||
.toStdString() );
|
||||
|
||||
// Create a well direction based on the two points
|
||||
cvf::Vec3d wellDirection = ( p2 - p1 ).getNormalized();
|
||||
RiaLogging::info( QString( "Well direction: %1" ).arg( RigStimPlanModelTools::vecToString( wellDirection ) ) );
|
||||
RiaLogging::info( std::format( "Well direction: {}", RigStimPlanModelTools::vecToString( wellDirection ) ) );
|
||||
|
||||
cvf::Vec3d fractureDirectionNormal = wellDirection;
|
||||
if ( m_fractureOrientation == FractureOrientation::ALONG_WELL_PATH )
|
||||
@@ -1125,7 +1127,7 @@ double RimStimPlanModel::getOverburdenGradient( RiaDefines::CurveProperty curveP
|
||||
else
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "Missing overburden gradient for %1." ).arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
std::format( "Missing overburden gradient for {}.", caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
}
|
||||
@@ -1147,7 +1149,7 @@ double RimStimPlanModel::getUnderburdenGradient( RiaDefines::CurveProperty curve
|
||||
else
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "Missing underburden gradient for %1." ).arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
std::format( "Missing underburden gradient for {}.", caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
}
|
||||
@@ -1171,7 +1173,7 @@ double RimStimPlanModel::getDefaultValueForProperty( RiaDefines::CurveProperty c
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Missing default for %1." ).arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
RiaLogging::error( std::format( "Missing default for {}.", caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,7 +370,8 @@ bool RimStimPlanModelCalculator::calculateStressWithGradients( std::vector<doubl
|
||||
{
|
||||
RiaLogging::error( QString( "Unexpected empty input data for %1 in stress calculation for StimPlan Model: %2" )
|
||||
.arg( propertyName )
|
||||
.arg( m_stimPlanModel->name() ) );
|
||||
.arg( m_stimPlanModel->name() )
|
||||
.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -379,7 +380,8 @@ bool RimStimPlanModelCalculator::calculateStressWithGradients( std::vector<doubl
|
||||
{
|
||||
RiaLogging::error( QString( "Unexpected input data size for %1 in stress calculation for StimPlan Model: %2" )
|
||||
.arg( propertyName )
|
||||
.arg( m_stimPlanModel->name() ) );
|
||||
.arg( m_stimPlanModel->name() )
|
||||
.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -389,7 +391,8 @@ bool RimStimPlanModelCalculator::calculateStressWithGradients( std::vector<doubl
|
||||
{
|
||||
RiaLogging::error( QString( "Unexpected bad data for %1 in stress calculation for StimPlan Model: %2." )
|
||||
.arg( propertyName )
|
||||
.arg( m_stimPlanModel->name() ) );
|
||||
.arg( m_stimPlanModel->name() )
|
||||
.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -694,21 +697,21 @@ std::pair<std::vector<double>, std::vector<QString>> RimStimPlanModelCalculator:
|
||||
RimStimPlanModelTemplate* stimPlanModelTemplate = m_stimPlanModel->stimPlanModelTemplate();
|
||||
if ( !stimPlanModelTemplate )
|
||||
{
|
||||
RiaLogging::error( QString( "No fracture model template found" ) );
|
||||
RiaLogging::error( "No fracture model template found" );
|
||||
return std::make_pair( values, faciesNames );
|
||||
}
|
||||
|
||||
RimFaciesProperties* faciesProperties = stimPlanModelTemplate->faciesProperties();
|
||||
if ( !faciesProperties )
|
||||
{
|
||||
RiaLogging::error( QString( "No facies properties found when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No facies properties found when extracting elastic properties." );
|
||||
return std::make_pair( values, faciesNames );
|
||||
}
|
||||
|
||||
RimColorLegend* colorLegend = faciesProperties->colorLegend();
|
||||
if ( !colorLegend )
|
||||
{
|
||||
RiaLogging::error( QString( "No color legend found when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No color legend found when extracting elastic properties." );
|
||||
return std::make_pair( values, faciesNames );
|
||||
}
|
||||
|
||||
@@ -765,7 +768,8 @@ bool RimStimPlanModelCalculator::isValidInputData( const std::vector<double>&
|
||||
.arg( propertyName )
|
||||
.arg( i )
|
||||
.arg( depthTopOfZone )
|
||||
.arg( value ) );
|
||||
.arg( value )
|
||||
.toStdString() );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+20
-14
@@ -136,7 +136,7 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
RiaResultNames::activeFormationNamesResultName() ) );
|
||||
if ( !formationResultAccessor.notNull() )
|
||||
{
|
||||
RiaLogging::error( QString( "No formation result found." ) );
|
||||
RiaLogging::error( "No formation result found." );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -149,49 +149,49 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
RimStimPlanModelTemplate* stimPlanModelTemplate = stimPlanModel->stimPlanModelTemplate();
|
||||
if ( !stimPlanModelTemplate )
|
||||
{
|
||||
RiaLogging::error( QString( "No fracture model template found" ) );
|
||||
RiaLogging::error( "No fracture model template found" );
|
||||
return false;
|
||||
}
|
||||
|
||||
RimFaciesProperties* faciesProperties = stimPlanModelTemplate->faciesProperties();
|
||||
if ( !faciesProperties )
|
||||
{
|
||||
RiaLogging::error( QString( "No facies properties found when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No facies properties found when extracting elastic properties." );
|
||||
return false;
|
||||
}
|
||||
|
||||
QString defaultFacies = stimPlanModelTemplate->defaultFacies();
|
||||
if ( defaultFacies.isEmpty() )
|
||||
{
|
||||
RiaLogging::error( QString( "No default facies defined when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No default facies defined when extracting elastic properties." );
|
||||
return false;
|
||||
}
|
||||
|
||||
RimColorLegend* colorLegend = faciesProperties->colorLegend();
|
||||
if ( !colorLegend )
|
||||
{
|
||||
RiaLogging::error( QString( "No color legend found when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No color legend found when extracting elastic properties." );
|
||||
return false;
|
||||
}
|
||||
|
||||
RimElasticProperties* elasticProperties = stimPlanModelTemplate->elasticProperties();
|
||||
if ( !elasticProperties )
|
||||
{
|
||||
RiaLogging::error( QString( "No elastic properties found when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No elastic properties found when extracting elastic properties." );
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<double> faciesValues = m_stimPlanModelCalculator->extractValues( RiaDefines::CurveProperty::FACIES, timeStep );
|
||||
if ( faciesValues.empty() )
|
||||
{
|
||||
RiaLogging::error( QString( "No facies values found when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No facies values found when extracting elastic properties." );
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<double> poroValues = m_stimPlanModelCalculator->extractValues( RiaDefines::CurveProperty::POROSITY_UNSCALED, timeStep );
|
||||
if ( poroValues.empty() )
|
||||
{
|
||||
RiaLogging::error( QString( "No porosity values found when extracting elastic properties." ) );
|
||||
RiaLogging::error( "No porosity values found when extracting elastic properties." );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,8 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
RiaLogging::error( QString( "Missing facies name for facies value: %1 (%2). Color legend: '%3'" )
|
||||
.arg( static_cast<int>( faciesValues[i] ) )
|
||||
.arg( faciesValues[i] )
|
||||
.arg( colorLegend->colorLegendName() ) );
|
||||
.arg( colorLegend->colorLegendName() )
|
||||
.toStdString() );
|
||||
values.clear();
|
||||
return false;
|
||||
}
|
||||
@@ -245,8 +246,10 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
int idx = static_cast<int>( formationValues[i] );
|
||||
if ( std::isinf( formationValues[i] ) || idx < 0 || idx >= static_cast<int>( formationNamesVector.size() ) )
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "Unknown formation found in elastic properties. Value: %1, tvd: %2" ).arg( formationValues[i] ).arg( tvDepthValues[i] ) );
|
||||
RiaLogging::error( QString( "Unknown formation found in elastic properties. Value: %1, tvd: %2" )
|
||||
.arg( formationValues[i] )
|
||||
.arg( tvDepthValues[i] )
|
||||
.toStdString() );
|
||||
values.clear();
|
||||
return false;
|
||||
}
|
||||
@@ -274,7 +277,8 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
.arg( faciesName )
|
||||
.arg( tvDepthValues[i] )
|
||||
.arg( porosity )
|
||||
.arg( val ) );
|
||||
.arg( val )
|
||||
.toStdString() );
|
||||
}
|
||||
|
||||
//
|
||||
@@ -300,7 +304,8 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
.arg( netToGrossFaciesName )
|
||||
.arg( tvDepthValues[i] )
|
||||
.arg( porosity )
|
||||
.arg( val ) );
|
||||
.arg( val )
|
||||
.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -318,7 +323,8 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
|
||||
RiaLogging::error( QString( "Missing elastic properties. Formation='%1', facies='%2'. Facies value: %3" )
|
||||
.arg( formationName )
|
||||
.arg( faciesName )
|
||||
.arg( static_cast<int>( faciesValues[i] ) ) );
|
||||
.arg( static_cast<int>( faciesValues[i] ) )
|
||||
.toStdString() );
|
||||
values.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
+3
-3
@@ -107,7 +107,7 @@ bool RimStimPlanModelLayerCalculator::calculate( RiaDefines::CurveProperty curve
|
||||
RiaResultNames::activeFormationNamesResultName() ) );
|
||||
if ( !formationResultAccessor.notNull() )
|
||||
{
|
||||
RiaLogging::error( QString( "No formation result found." ) );
|
||||
RiaLogging::error( "No formation result found." );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -131,14 +131,14 @@ bool RimStimPlanModelLayerCalculator::calculate( RiaDefines::CurveProperty curve
|
||||
std::vector<double> faciesValues = m_stimPlanModelCalculator->extractValues( RiaDefines::CurveProperty::FACIES, timeStep );
|
||||
if ( faciesValues.empty() )
|
||||
{
|
||||
RiaLogging::error( QString( "Empty facies data found for layer curve." ) );
|
||||
RiaLogging::error( "Empty facies data found for layer curve." );
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<double> netToGrossValues = m_stimPlanModelCalculator->extractValues( RiaDefines::CurveProperty::NET_TO_GROSS, timeStep );
|
||||
if ( netToGrossValues.empty() )
|
||||
{
|
||||
RiaLogging::warning( QString( "Empty net-to-gross data found for layer curve." ) );
|
||||
RiaLogging::warning( "Empty net-to-gross data found for layer curve." );
|
||||
}
|
||||
|
||||
measuredDepthValues = curveData.md;
|
||||
|
||||
+19
-14
@@ -21,6 +21,7 @@
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaInterpolationTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaStimPlanModelDefines.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
@@ -174,7 +175,8 @@ bool RimStimPlanModelPressureCalculator::extractValuesForProperty( RiaDefines::C
|
||||
rkbDiff ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Unable to extract pressure values for property: %1" )
|
||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() )
|
||||
.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -429,8 +431,7 @@ void RimStimPlanModelPressureCalculator::binByDepthAndAverage( DepthValuePairVec
|
||||
double minDepth = std::floor( depthValuePairs.front().first );
|
||||
double maxDepth = std::ceil( depthValuePairs.back().first );
|
||||
|
||||
RiaLogging::debug(
|
||||
QString( "Binning: min depth=%1 max depth=%2. Vec size=%3." ).arg( minDepth ).arg( maxDepth ).arg( depthValuePairs.size() ) );
|
||||
RiaLogging::debug( std::format( "Binning: min depth={} max depth={}. Vec size={}.", minDepth, maxDepth, depthValuePairs.size() ) );
|
||||
|
||||
double binSize = 1.0;
|
||||
|
||||
@@ -467,7 +468,8 @@ void RimStimPlanModelPressureCalculator::binByDepthAndAverage( DepthValuePairVec
|
||||
.arg( min )
|
||||
.arg( max )
|
||||
.arg( mean )
|
||||
.arg( dev ) );
|
||||
.arg( dev )
|
||||
.toStdString() );
|
||||
|
||||
if ( !std::isinf( mean ) )
|
||||
{
|
||||
@@ -525,12 +527,14 @@ bool RimStimPlanModelPressureCalculator::buildPressureTablesPerEqlNum( const Rim
|
||||
RiaLogging::error( QString( "EQLNUM grid dimensions: [ %1, %2, %3]" )
|
||||
.arg( eqlNumGrid->cellCountI() )
|
||||
.arg( eqlNumGrid->cellCountJ() )
|
||||
.arg( eqlNumGrid->cellCountK() ) );
|
||||
.arg( eqlNumGrid->cellCountK() )
|
||||
.toStdString() );
|
||||
|
||||
RiaLogging::error( QString( "PRESSURE grid dimensions: [ %1, %2, %3]" )
|
||||
.arg( pressureGrid->cellCountI() )
|
||||
.arg( pressureGrid->cellCountJ() )
|
||||
.arg( pressureGrid->cellCountK() ) );
|
||||
.arg( pressureGrid->cellCountK() )
|
||||
.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -597,7 +601,8 @@ double RimStimPlanModelPressureCalculator::interpolatePressure( const DepthValue
|
||||
.arg( startValue )
|
||||
.arg( endDepth )
|
||||
.arg( endValue )
|
||||
.arg( value ) );
|
||||
.arg( value )
|
||||
.toStdString() );
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -629,7 +634,7 @@ bool RimStimPlanModelPressureCalculator::interpolateInitialPressureByEquilibrati
|
||||
|
||||
std::set<int> presentEqlNums = findUniqueValues( eqlNumValues );
|
||||
|
||||
RiaLogging::info( QString( "Found %1 EQLNUM values." ).arg( presentEqlNums.size() ) );
|
||||
RiaLogging::info( std::format( "Found {} EQLNUM values.", presentEqlNums.size() ) );
|
||||
|
||||
EqlNumToDepthValuePairMap valuesPerEqlNum;
|
||||
if ( !buildPressureTablesPerEqlNum( stimPlanModel, valuesPerEqlNum, presentEqlNums ) )
|
||||
@@ -641,8 +646,8 @@ bool RimStimPlanModelPressureCalculator::interpolateInitialPressureByEquilibrati
|
||||
// EQLNUM data has values for over/underburden, but the pressure values does not.
|
||||
if ( eqlNumValues.size() != ( values.size() + 4 ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to build EQLNUM pressure data for initial pressure: result length mismatch." ) );
|
||||
RiaLogging::error( QString( "EQLNUM length: %1 PRESSURE length: %2" ).arg( eqlNumValues.size() ).arg( values.size() ) );
|
||||
RiaLogging::error( "Failed to build EQLNUM pressure data for initial pressure: result length mismatch." );
|
||||
RiaLogging::error( std::format( "EQLNUM length: {} PRESSURE length: {}", eqlNumValues.size(), values.size() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -694,7 +699,7 @@ bool RimStimPlanModelPressureCalculator::interpolatePressureDifferenceByEquilibr
|
||||
|
||||
std::set<int> presentEqlNums = findUniqueValues( eqlNumValues );
|
||||
|
||||
RiaLogging::info( QString( "Found %1 EQLNUM values." ).arg( presentEqlNums.size() ) );
|
||||
RiaLogging::info( std::format( "Found {} EQLNUM values.", presentEqlNums.size() ) );
|
||||
|
||||
EqlNumToDepthValuePairMap valuesPerEqlNum;
|
||||
if ( !buildPressureTablesPerEqlNum( stimPlanModel, valuesPerEqlNum, presentEqlNums ) )
|
||||
@@ -709,8 +714,8 @@ bool RimStimPlanModelPressureCalculator::interpolatePressureDifferenceByEquilibr
|
||||
// EQLNUM data has values for over/underburden, but the pressure values does not.
|
||||
if ( eqlNumValues.size() != ( values.size() + 4 ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to build EQLNUM pressure data: result length mismatch." ) );
|
||||
RiaLogging::error( QString( "EQLNUM length: %1 PRESSURE length: %2" ).arg( eqlNumValues.size() ).arg( values.size() ) );
|
||||
RiaLogging::error( "Failed to build EQLNUM pressure data: result length mismatch." );
|
||||
RiaLogging::error( std::format( "EQLNUM length: {} PRESSURE length: {}", eqlNumValues.size(), values.size() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -736,7 +741,7 @@ bool RimStimPlanModelPressureCalculator::interpolatePressureDifferenceByEquilibr
|
||||
{
|
||||
values[i] = p2 - p1;
|
||||
}
|
||||
RiaLogging::debug( QString( "INTERPOLATING PRESSURE DIFF: %1 %2 = %3" ).arg( p1 ).arg( p2 ).arg( p2 - p1 ) );
|
||||
RiaLogging::debug( std::format( "INTERPOLATING PRESSURE DIFF: {} {} = {}", p1, p2, p2 - p1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+26
-17
@@ -20,6 +20,7 @@
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaInterpolationTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaStimPlanModelDefines.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
@@ -84,7 +85,7 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
|
||||
std::vector<double>& tvDepthValues,
|
||||
double& rkbDiff ) const
|
||||
{
|
||||
RiaLogging::debug( QString( "Calculating well log for '%1'." ).arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
RiaLogging::debug( std::format( "Calculating well log for '{}'.", caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
|
||||
std::deque<RimExtractionConfiguration> extractionConfigurations = stimPlanModel->extractionConfigurations( curveProperty );
|
||||
|
||||
@@ -97,7 +98,7 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
|
||||
if ( std::find( missingValueStratgies.begin(), missingValueStratgies.end(), RimStimPlanModel::MissingValueStrategy::DEFAULT_VALUE ) !=
|
||||
missingValueStratgies.end() )
|
||||
{
|
||||
RiaLogging::warning( QString( "Extraction failed. Trying fallback" ) );
|
||||
RiaLogging::warning( "Extraction failed. Trying fallback" );
|
||||
if ( !replaceMissingValuesWithDefault( curveProperty, stimPlanModel, values, measuredDepthValues, tvDepthValues, rkbDiff ) )
|
||||
{
|
||||
RiaLogging::error( "Fallback failed too." );
|
||||
@@ -202,7 +203,8 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
|
||||
|
||||
RiaLogging::debug( QString( "Well log for '%1' done. Size: %2." )
|
||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() )
|
||||
.arg( values.size() ) );
|
||||
.arg( values.size() )
|
||||
.toStdString() );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -270,7 +272,7 @@ cvf::ref<RigResultAccessor>
|
||||
// Look for input properties starting with the same name as result definition
|
||||
if ( inputProperty && inputProperty->resultName().startsWith( resultName ) )
|
||||
{
|
||||
RiaLogging::info( QString( "Found missing values result for %1: %2" ).arg( resultName ).arg( inputProperty->resultName() ) );
|
||||
RiaLogging::info( std::format( "Found missing values result for {}: {}", resultName, inputProperty->resultName() ) );
|
||||
|
||||
RigEclipseResultAddress resultAddress( RiaDefines::ResultCatType::INPUT_PROPERTY, inputProperty->resultName() );
|
||||
caseData->results( porosityModelType )->ensureKnownResultLoaded( resultAddress );
|
||||
@@ -384,7 +386,8 @@ void RimStimPlanModelWellLogCalculator::scaleByNetToGross( const RimStimPlanMode
|
||||
{
|
||||
RiaLogging::error( QString( "Different sizes for net to gross calculation. NTG length: %1. Values length: %2" )
|
||||
.arg( netToGross.size() )
|
||||
.arg( values.size() ) );
|
||||
.arg( values.size() )
|
||||
.toStdString() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -432,7 +435,8 @@ bool RimStimPlanModelWellLogCalculator::extractValuesForPropertyWithConfiguratio
|
||||
.arg( curvePropertyName )
|
||||
.arg( resultVariable )
|
||||
.arg( caf::AppEnum<RiaDefines::ResultCatType>( resultType ).uiText() )
|
||||
.arg( caf::AppEnum<RimExtractionConfiguration::EclipseCaseType>( eclipseCaseType ).uiText() ) );
|
||||
.arg( caf::AppEnum<RimExtractionConfiguration::EclipseCaseType>( eclipseCaseType ).uiText() )
|
||||
.toStdString() );
|
||||
|
||||
RimEclipseCase* eclipseCase = stimPlanModel->eclipseCaseForType( eclipseCaseType );
|
||||
|
||||
@@ -460,7 +464,7 @@ bool RimStimPlanModelWellLogCalculator::extractValuesForPropertyWithConfiguratio
|
||||
}
|
||||
}
|
||||
|
||||
RiaLogging::info( QString( "Extraction failed. Tried %1 configurations." ).arg( extractionConfigurations.size() ) );
|
||||
RiaLogging::info( std::format( "Extraction failed. Tried {} configurations.", extractionConfigurations.size() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -521,7 +525,8 @@ bool RimStimPlanModelWellLogCalculator::extractValuesForProperty( RiaDefines::Cu
|
||||
|
||||
RiaLogging::info( QString( "Extracting values for '%1' from grid '%2'." )
|
||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() )
|
||||
.arg( eclipseCase->caseUserDescription() ) );
|
||||
.arg( eclipseCase->caseUserDescription() )
|
||||
.toStdString() );
|
||||
|
||||
auto eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
if ( !eclipseCaseData )
|
||||
@@ -558,11 +563,12 @@ bool RimStimPlanModelWellLogCalculator::extractValuesForProperty( RiaDefines::Cu
|
||||
RiaLogging::info( QString( "Extracted values %1 from grid '%2' for '%3'." )
|
||||
.arg( values.size() )
|
||||
.arg( eclipseCase->caseUserDescription() )
|
||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() )
|
||||
.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "No result found for %1" ).arg( eclipseResultDefinition.resultVariable() ) );
|
||||
RiaLogging::error( std::format( "No result found for {}", eclipseResultDefinition.resultVariable() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -611,13 +617,13 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithDefault( RiaDefi
|
||||
|
||||
if ( backupResAcc.notNull() )
|
||||
{
|
||||
RiaLogging::info( QString( "Reading missing values from input properties for %1." ).arg( resultVariable ) );
|
||||
RiaLogging::info( std::format( "Reading missing values from input properties for {}.", resultVariable ) );
|
||||
std::vector<double> replacementValues;
|
||||
|
||||
RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(), wellPathGeometry, "fracture model" );
|
||||
eclExtractor.curveData( backupResAcc.p(), &replacementValues );
|
||||
|
||||
RiaLogging::debug( QString( "Read %1 values for '%2'" ).arg( replacementValues.size() ).arg( resultVariable ) );
|
||||
RiaLogging::debug( std::format( "Read {} values for '{}'", replacementValues.size(), resultVariable ) );
|
||||
|
||||
if ( values.empty() )
|
||||
{
|
||||
@@ -692,7 +698,7 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherProperty( R
|
||||
|
||||
if ( initialValues.empty() )
|
||||
{
|
||||
RiaLogging::error( QString( "Empty replacement data found for fracture model curve." ) );
|
||||
RiaLogging::error( "Empty replacement data found for fracture model curve." );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -759,7 +765,7 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria
|
||||
QString resultName = stimPlanModel->eclipseResultVariable( curveProperty );
|
||||
if ( resultName.isEmpty() )
|
||||
{
|
||||
RiaLogging::error( QString( "Invalid result for k layer replacement: %1" ).arg( stimPlanModel->name() ) );
|
||||
RiaLogging::error( std::format( "Invalid result for k layer replacement: {}", stimPlanModel->name() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -789,7 +795,8 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria
|
||||
.arg( tvd )
|
||||
.arg( i + 1 )
|
||||
.arg( j + 1 )
|
||||
.arg( k + 1 ) );
|
||||
.arg( k + 1 )
|
||||
.toStdString() );
|
||||
|
||||
int neighborK = static_cast<int>( k ) + moveDirection;
|
||||
const int minK = static_cast<int>( 1 );
|
||||
@@ -812,7 +819,8 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria
|
||||
.arg( j + 1 )
|
||||
.arg( neighborK + 1 )
|
||||
.arg( neighborCellIdx )
|
||||
.arg( neighborValue ) );
|
||||
.arg( neighborValue )
|
||||
.toStdString() );
|
||||
isFound = true;
|
||||
values[idx] = neighborValue;
|
||||
}
|
||||
@@ -829,7 +837,8 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithOtherKLayer( Ria
|
||||
.arg( tvd )
|
||||
.arg( position.x() )
|
||||
.arg( position.y() )
|
||||
.arg( position.z() ) );
|
||||
.arg( position.z() )
|
||||
.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user