mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5101 clang-format: Adjusted penalties
Use lower absolute values to improve control of behavior
This commit is contained in:
@@ -85,8 +85,7 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
|
||||
cvf::Vec3d horizontalRight = viewCamera->direction() ^ cvf::Vec3d::Z_AXIS;
|
||||
cvf::Vec3d horizontalUp = viewCamera->up() -
|
||||
( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
|
||||
cvf::Vec3d horizontalUp = viewCamera->up() - ( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
|
||||
|
||||
bool isOk = horizontalRight.normalize();
|
||||
if ( !isOk ) horizontalRight = {1.0, 0.0, 0.0};
|
||||
|
||||
@@ -88,8 +88,8 @@ void RicEditPreferencesFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::unique_ptr<RiaPreferences> RicEditPreferencesFeature::clonePreferences( const RiaPreferences* preferences )
|
||||
{
|
||||
caf::PdmObjectHandle* pdmClone = preferences->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() );
|
||||
caf::PdmObjectHandle* pdmClone =
|
||||
preferences->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() );
|
||||
|
||||
return std::unique_ptr<RiaPreferences>( dynamic_cast<RiaPreferences*>( pdmClone ) );
|
||||
}
|
||||
|
||||
@@ -97,11 +97,8 @@ void RicExportFishbonesLateralsFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
// Pad with "0" to get a total of two characters defining the sub index text
|
||||
QString subIndexText = QString( "%1" ).arg( sub.subIndex, 2, 10, QChar( '0' ) );
|
||||
QString lateralName = QString( "%1_%2_Sub%3_Lat%4" )
|
||||
.arg( wellPath->name() )
|
||||
.arg( fishboneName )
|
||||
.arg( subIndexText )
|
||||
.arg( lateralIndex );
|
||||
QString lateralName =
|
||||
QString( "%1_%2_Sub%3_Lat%4" ).arg( wellPath->name() ).arg( fishboneName ).arg( subIndexText ).arg( lateralIndex );
|
||||
|
||||
EXP::writeWellPathGeometryToStream( *stream, &geometry, lateralName, mdStepSize, false, 0.0, false );
|
||||
}
|
||||
|
||||
@@ -96,9 +96,7 @@ public:
|
||||
|
||||
bool reportCompletionsTypesIndividually() const;
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
protected:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
||||
@@ -101,7 +101,8 @@ std::vector<RimWellPath*> RicExportCompletionsForVisibleWellPathsFeature::visibl
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
|
||||
{
|
||||
auto measurementColl = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
|
||||
auto measurementColl =
|
||||
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
|
||||
if ( measurementColl ) return wellPaths;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ void RicExportCompletionsWellSegmentsFeature::onActionTriggered( bool isChecked
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"COMPLETIONS" );
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
|
||||
|
||||
RicCaseAndFileExportSettingsUi exportSettings;
|
||||
std::vector<RimCase*> cases;
|
||||
|
||||
@@ -132,14 +132,14 @@ std::vector<RigCompletionData>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValues(
|
||||
RimEclipseCase* caseToApply,
|
||||
const QString& wellNameForExport,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const std::vector<const RimFracture*>& fractures,
|
||||
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
||||
QTextStream* outputStreamForIntermediateResultsText,
|
||||
PressureDepletionParameters pdParams )
|
||||
std::vector<RigCompletionData>
|
||||
RicExportFractureCompletionsImpl::generateCompdatValues( RimEclipseCase* caseToApply,
|
||||
const QString& wellNameForExport,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const std::vector<const RimFracture*>& fractures,
|
||||
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
||||
QTextStream* outputStreamForIntermediateResultsText,
|
||||
PressureDepletionParameters pdParams )
|
||||
{
|
||||
std::vector<RigCompletionData> fractureCompletions;
|
||||
|
||||
@@ -266,8 +266,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
const std::vector<double>* currentMatrixPressures = nullptr;
|
||||
if ( performPressureDepletionScaling )
|
||||
{
|
||||
pressureResultVector = &results->cellScalarResults(
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
pressureResultVector =
|
||||
&results->cellScalarResults( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
CVF_ASSERT( !pressureResultVector->empty() );
|
||||
|
||||
if ( pdParams.pressureScalingTimeStep < static_cast<int>( pressureResultVector->size() ) )
|
||||
@@ -301,8 +301,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
const RigFractureGrid* fractureGrid = fracTemplate->fractureGrid();
|
||||
if ( !fractureGrid ) continue;
|
||||
|
||||
bool useFiniteConductivityInFracture = ( fracTemplate->conductivityType() ==
|
||||
RimFractureTemplate::FINITE_CONDUCTIVITY );
|
||||
bool useFiniteConductivityInFracture =
|
||||
( fracTemplate->conductivityType() == RimFractureTemplate::FINITE_CONDUCTIVITY );
|
||||
|
||||
// If finite cond chosen and conductivity not present in stimplan file, do not calculate trans for this fracture
|
||||
if ( useFiniteConductivityInFracture && !checkForStimPlanConductivity( fracTemplate, fracture ) )
|
||||
@@ -364,9 +364,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
scaledCondenser.calculateFicticiousFractureToWellTransmissibilities();
|
||||
// b. Calculate new effective matrix to well transmissibilities
|
||||
std::map<size_t, double> effectiveMatrixToWellTrans =
|
||||
scaledCondenser
|
||||
.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
|
||||
fictitiousFractureToWellTransmissibilities );
|
||||
scaledCondenser.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
|
||||
fictitiousFractureToWellTransmissibilities );
|
||||
matrixToWellTrans = effectiveMatrixToWellTrans;
|
||||
}
|
||||
}
|
||||
@@ -461,9 +460,9 @@ void RicExportFractureCompletionsImpl::getWellPressuresAndInitialProductionTimeS
|
||||
currentDate = caseTimeSteps.back();
|
||||
}
|
||||
|
||||
RifEclipseSummaryAddress wbhpPressureAddress = RifEclipseSummaryAddress::wellAddress( "WBHP",
|
||||
wellPathName.toStdString() );
|
||||
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();
|
||||
RifEclipseSummaryAddress wbhpPressureAddress =
|
||||
RifEclipseSummaryAddress::wellAddress( "WBHP", wellPathName.toStdString() );
|
||||
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();
|
||||
if ( mainCollection )
|
||||
{
|
||||
RimSummaryCase* summaryCase = mainCollection->findSummaryCaseFromEclipseResultCase( resultCase );
|
||||
@@ -532,10 +531,9 @@ bool RicExportFractureCompletionsImpl::checkForStimPlanConductivity( const RimFr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities(
|
||||
const RigFractureGrid* fractureGrid,
|
||||
double cDarcyInCorrectUnit,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities( const RigFractureGrid* fractureGrid,
|
||||
double cDarcyInCorrectUnit,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
for ( size_t i = 0; i < fractureGrid->iCellCount(); i++ )
|
||||
{
|
||||
@@ -599,13 +597,12 @@ void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibiliti
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities(
|
||||
const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
////
|
||||
// If fracture has orientation Azimuth or Transverse, assume only radial inflow
|
||||
@@ -627,9 +624,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
cDarcyInCorrectUnit );
|
||||
|
||||
transCondenser.addNeighborTransmissibility( {true, RigTransmissibilityCondenser::CellAddress::WELL, 1},
|
||||
{false,
|
||||
RigTransmissibilityCondenser::CellAddress::STIMPLAN,
|
||||
wellCellIndex},
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, wellCellIndex},
|
||||
radialTrans );
|
||||
}
|
||||
else if ( fracTemplate->orientationType() == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
@@ -653,8 +648,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
if ( intersection.hlength > 0.0 || intersection.vlength > 0.0 )
|
||||
{
|
||||
linearTrans =
|
||||
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell
|
||||
.getConductivityValue(),
|
||||
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell.getConductivityValue(),
|
||||
fractureWellCell.cellSizeX(),
|
||||
fractureWellCell.cellSizeZ(),
|
||||
intersection.vlength,
|
||||
@@ -677,8 +671,8 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities(
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
std::map<size_t, double>
|
||||
RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities( RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
std::map<size_t, double> matrixToWellTransmissibilities;
|
||||
|
||||
@@ -687,10 +681,9 @@ std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWell
|
||||
{
|
||||
if ( externalCell.m_cellIndexSpace == RigTransmissibilityCondenser::CellAddress::ECLIPSE )
|
||||
{
|
||||
double trans = transCondenser.condensedTransmissibility( externalCell,
|
||||
{true,
|
||||
RigTransmissibilityCondenser::CellAddress::WELL,
|
||||
1} );
|
||||
double trans =
|
||||
transCondenser.condensedTransmissibility( externalCell,
|
||||
{true, RigTransmissibilityCondenser::CellAddress::WELL, 1} );
|
||||
|
||||
if ( trans > transCondenser.transmissibilityThreshold() )
|
||||
{
|
||||
@@ -738,9 +731,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
|
||||
const RimFracture* fracture,
|
||||
std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters( const RimFracture* fracture,
|
||||
std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
{
|
||||
double dFactorForFracture = fracture->nonDarcyProperties().dFactor;
|
||||
double khForFracture = fracture->nonDarcyProperties().conductivity;
|
||||
@@ -763,8 +755,7 @@ void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicExportFractureCompletionsImpl::sumUpTransmissibilities(
|
||||
const std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
double RicExportFractureCompletionsImpl::sumUpTransmissibilities( const std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
{
|
||||
double transmissibility = 0.0;
|
||||
for ( const auto& c : allCompletionsForOneFracture )
|
||||
|
||||
@@ -92,12 +92,13 @@ std::vector<RigCompletionData>
|
||||
return completionData;
|
||||
}
|
||||
|
||||
std::map<size_t, std::vector<WellBorePartForTransCalc>> wellBorePartsInCells; // wellBore = main bore or fishbone lateral
|
||||
std::map<size_t, std::vector<WellBorePartForTransCalc>> wellBorePartsInCells; // wellBore = main bore or fishbone
|
||||
// lateral
|
||||
findFishboneLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
|
||||
findFishboneImportedLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
|
||||
RiaDefines::MATRIX_MODEL );
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
||||
for ( const auto& cellAndWellBoreParts : wellBorePartsInCells )
|
||||
{
|
||||
@@ -237,8 +238,9 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
}
|
||||
|
||||
{
|
||||
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for fishbones
|
||||
// defined by ResInsight. It is not trivial to define the open section of the main bore for imported laterals.
|
||||
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for
|
||||
// fishbones defined by ResInsight. It is not trivial to define the open section of the main bore for imported
|
||||
// laterals.
|
||||
|
||||
if ( wellPath->fishbonesCollection()->isChecked() )
|
||||
{
|
||||
@@ -302,11 +304,12 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
||||
for ( const auto& cellIntersectionInfo : intersectedCells )
|
||||
{
|
||||
QString completionMetaData = fishbonesPath->name();
|
||||
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
|
||||
holeRadius,
|
||||
skinFactor,
|
||||
isMainBore,
|
||||
completionMetaData );
|
||||
WellBorePartForTransCalc wellBorePart =
|
||||
WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
|
||||
holeRadius,
|
||||
skinFactor,
|
||||
isMainBore,
|
||||
completionMetaData );
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
|
||||
|
||||
wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back( wellBorePart );
|
||||
|
||||
@@ -48,10 +48,10 @@ private:
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
|
||||
static void findFishboneImportedLateralsWellBoreParts(
|
||||
std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
static void
|
||||
findFishboneImportedLateralsWellBoreParts( std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
|
||||
static void appendMainWellBoreParts( std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswCompletion::RicMswCompletion( const QString& label,
|
||||
size_t index /* = cvf::UNDEFINED_SIZE_T */,
|
||||
int branchNumber /*= 0*/ )
|
||||
RicMswCompletion::RicMswCompletion( const QString& label, size_t index /* = cvf::UNDEFINED_SIZE_T */, int branchNumber /*= 0*/ )
|
||||
: m_label( label )
|
||||
, m_index( index )
|
||||
, m_branchNumber( branchNumber )
|
||||
|
||||
@@ -54,10 +54,10 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
||||
const std::vector<RimWellPath*>& wellPaths,
|
||||
const std::vector<RimSimWellInView*>& simWells )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"COMPLETIONS" );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
|
||||
|
||||
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();
|
||||
|
||||
|
||||
@@ -107,8 +107,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
else
|
||||
{
|
||||
int caseId = exportSettings.caseToApply->caseId();
|
||||
QString format = QString(
|
||||
"Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString format =
|
||||
QString( "Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString errMsg = format.arg( wellPath->name() ).arg( caseId );
|
||||
RiaLogging::error( errMsg );
|
||||
}
|
||||
@@ -142,19 +142,19 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
}
|
||||
else
|
||||
{
|
||||
fractureTransmissibilityExportInformationStream = std::unique_ptr<QTextStream>(
|
||||
new QTextStream( &fractureTransmissibilityExportInformationFile ) );
|
||||
fractureTransmissibilityExportInformationStream =
|
||||
std::unique_ptr<QTextStream>( new QTextStream( &fractureTransmissibilityExportInformationFile ) );
|
||||
}
|
||||
}
|
||||
|
||||
size_t maxProgress = usedWellPaths.size() * 3 + simWells.size() +
|
||||
( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||
? usedWellPaths.size()
|
||||
: exportSettings.fileSplit ==
|
||||
RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
||||
? usedWellPaths.size() * 3
|
||||
: 1 ) +
|
||||
simWells.size();
|
||||
size_t maxProgress =
|
||||
usedWellPaths.size() * 3 + simWells.size() +
|
||||
( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||
? usedWellPaths.size()
|
||||
: exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
||||
? usedWellPaths.size() * 3
|
||||
: 1 ) +
|
||||
simWells.size();
|
||||
|
||||
caf::ProgressInfo progress( maxProgress, "Export Completions" );
|
||||
|
||||
@@ -437,18 +437,16 @@ std::vector<RigCompletionData>
|
||||
exportSettings.includeFractures = true;
|
||||
|
||||
{
|
||||
std::vector<RigCompletionData> completionData = RicFishbonesTransmissibilityCalculationFeatureImp::
|
||||
generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath, exportSettings );
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath,
|
||||
exportSettings );
|
||||
|
||||
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath,
|
||||
eclipseCase,
|
||||
nullptr,
|
||||
nullptr );
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath, eclipseCase, nullptr, nullptr );
|
||||
|
||||
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
|
||||
}
|
||||
@@ -591,8 +589,7 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEclipseDoes( settings.caseToApply(),
|
||||
skinfactor,
|
||||
wellBoreDiameter / 2,
|
||||
cellIndexIJK
|
||||
.globalCellIndex(),
|
||||
cellIndexIJK.globalCellIndex(),
|
||||
cellDirection );
|
||||
|
||||
double wpimult = combinedTrans / transmissibilityEclipseCalculation;
|
||||
@@ -810,8 +807,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||
{
|
||||
for ( const auto& completion : completionsForLgr.second )
|
||||
{
|
||||
const auto wellPath = RicWellPathExportCompletionsFileTools::findWellPathFromExportName(
|
||||
completion.wellName() );
|
||||
const auto wellPath =
|
||||
RicWellPathExportCompletionsFileTools::findWellPathFromExportName( completion.wellName() );
|
||||
auto item = wellPathToLgrNameMap.find( wellPath );
|
||||
wellPathToLgrNameMap[wellPath].insert( completionsForLgr.first );
|
||||
}
|
||||
@@ -821,9 +818,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||
{
|
||||
const RimWellPath* wellPath = wellPathsForLgr.first;
|
||||
|
||||
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD = std::make_tuple( std::numeric_limits<double>::max(),
|
||||
cvf::Vec2i(),
|
||||
"" );
|
||||
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD =
|
||||
std::make_tuple( std::numeric_limits<double>::max(), cvf::Vec2i(), "" );
|
||||
|
||||
// Find first LGR-intersection along the well path
|
||||
|
||||
@@ -884,8 +880,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
{
|
||||
try
|
||||
{
|
||||
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
fileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, fileName );
|
||||
|
||||
std::map<QString, std::vector<RigCompletionData>> completionsForGrid;
|
||||
completionsForGrid.insert( std::pair<QString, std::vector<RigCompletionData>>( "", completionsForMainGrid ) );
|
||||
@@ -904,8 +900,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
try
|
||||
{
|
||||
QString lgrFileName = fileName + "_LGR";
|
||||
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
lgrFileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, lgrFileName );
|
||||
|
||||
exportWellPathFractureReport( eclipseCase, exportFile, wellPathFractureReportItems );
|
||||
exportWelspeclToFile( eclipseCase, exportFile, completionsForSubGrids );
|
||||
@@ -965,46 +961,44 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
|
||||
if ( gridName.isEmpty() )
|
||||
{
|
||||
header =
|
||||
{RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
|
||||
formatter.keyword( "COMPDAT" );
|
||||
}
|
||||
else
|
||||
{
|
||||
header =
|
||||
{RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "LgrName" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "LgrName" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
|
||||
formatter.keyword( "COMPDATL" );
|
||||
}
|
||||
@@ -1167,8 +1161,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
return completionData;
|
||||
}
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
|
||||
RiaDefines::MATRIX_MODEL );
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
||||
if ( wellPath->perforationIntervalCollection()->isChecked() )
|
||||
{
|
||||
@@ -1218,21 +1212,19 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
|
||||
transmissibility = transmissibilityData.connectionFactor();
|
||||
|
||||
if ( nonDarcyParameters->nonDarcyFlowType() ==
|
||||
RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
|
||||
if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
|
||||
{
|
||||
kh = transmissibilityData.kh();
|
||||
dFactor = nonDarcyParameters->userDefinedDFactor();
|
||||
}
|
||||
else if ( nonDarcyParameters->nonDarcyFlowType() ==
|
||||
RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
|
||||
else if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
|
||||
{
|
||||
kh = transmissibilityData.kh();
|
||||
|
||||
const double effectiveH = transmissibilityData.effectiveH();
|
||||
|
||||
const double effectivePermeability = nonDarcyParameters->gridPermeabilityScalingFactor() *
|
||||
transmissibilityData.effectiveK();
|
||||
const double effectivePermeability =
|
||||
nonDarcyParameters->gridPermeabilityScalingFactor() * transmissibilityData.effectiveK();
|
||||
|
||||
dFactor = calculateDFactor( settings.caseToApply,
|
||||
effectiveH,
|
||||
@@ -1418,8 +1410,7 @@ TransmissibilityData
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"NTG" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
|
||||
|
||||
if ( ntgAccessObject.notNull() )
|
||||
{
|
||||
@@ -1450,8 +1441,7 @@ TransmissibilityData
|
||||
if ( directionForVolumeScaling == CellDirection::DIR_K ) dz = dz / volumeScaleConstant;
|
||||
}
|
||||
|
||||
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() *
|
||||
latNtg,
|
||||
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() * latNtg,
|
||||
permy,
|
||||
permz,
|
||||
dy,
|
||||
@@ -1459,8 +1449,7 @@ TransmissibilityData
|
||||
wellRadius,
|
||||
skinFactor,
|
||||
darcy );
|
||||
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() *
|
||||
latNtg,
|
||||
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() * latNtg,
|
||||
permx,
|
||||
permz,
|
||||
dx,
|
||||
@@ -1511,8 +1500,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor( RimEclipseC
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"PORO" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) );
|
||||
|
||||
if ( poroAccessObject.notNull() )
|
||||
{
|
||||
@@ -1607,8 +1595,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"NTG" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
|
||||
ntg = ntgAccessObject->cellScalarGlobIdx( globalCellIndex );
|
||||
}
|
||||
|
||||
@@ -1690,8 +1677,8 @@ std::pair<double, cvf::Vec2i>
|
||||
for ( WellPathCellIntersectionInfo intersection : intersections )
|
||||
{
|
||||
size_t gridLocalCellIndex = 0;
|
||||
const RigGridBase* grid = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex,
|
||||
&gridLocalCellIndex );
|
||||
const RigGridBase* grid =
|
||||
mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex, &gridLocalCellIndex );
|
||||
|
||||
if ( grid->gridId() == gridId && activeCellInfo->isActive( intersection.globCellIndex ) )
|
||||
{
|
||||
|
||||
@@ -96,9 +96,8 @@ private:
|
||||
class RicWellPathExportCompletionDataFeatureImpl
|
||||
{
|
||||
public:
|
||||
static CellDirection calculateCellMainDirection( RimEclipseCase* eclipseCase,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3d& lengthsInCell );
|
||||
static CellDirection
|
||||
calculateCellMainDirection( RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell );
|
||||
|
||||
static TransmissibilityData
|
||||
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
|
||||
@@ -124,9 +123,8 @@ public:
|
||||
static std::vector<RigCompletionData> computeStaticCompletionsForWellPath( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase );
|
||||
|
||||
static std::vector<RigCompletionData> computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStepIndex );
|
||||
static std::vector<RigCompletionData>
|
||||
computeDynamicCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase, size_t timeStepIndex );
|
||||
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationsCompdatValues( const RimWellPath* wellPath,
|
||||
@@ -161,13 +159,12 @@ private:
|
||||
QFilePtr exportFile,
|
||||
const std::map<QString, std::vector<RigCompletionData>>& completions );
|
||||
|
||||
static void
|
||||
sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
|
||||
const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
const std::vector<RigCompletionData>& completions,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType );
|
||||
static void sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
|
||||
const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
const std::vector<RigCompletionData>& completions,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType );
|
||||
|
||||
static void exportCompdatAndWpimultTables( RimEclipseCase* sourceCase,
|
||||
QFilePtr exportFile,
|
||||
|
||||
@@ -91,8 +91,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString unifiedFileName =
|
||||
QString( "UnifiedCompletions_MSW_%1" ).arg( exportSettings.caseToApply->caseUserDescription() );
|
||||
unifiedExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
unifiedFileName );
|
||||
unifiedExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, unifiedFileName );
|
||||
}
|
||||
|
||||
for ( const auto& wellPath : wellPaths )
|
||||
@@ -111,8 +111,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString wellFileName = QString( "%1_UnifiedCompletions_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
unifiedWellPathFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
wellFileName );
|
||||
unifiedWellPathFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, wellFileName );
|
||||
}
|
||||
|
||||
if ( exportFractures )
|
||||
@@ -124,10 +124,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
fractureExportFile = unifiedWellPathFile;
|
||||
else
|
||||
{
|
||||
QString fileName = QString( "%1_Fracture_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fractureExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
QString fileName =
|
||||
QString( "%1_Fracture_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fractureExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForFractures( exportSettings.caseToApply,
|
||||
fractureExportFile,
|
||||
@@ -146,8 +146,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString fileName = QString( "%1_Perforation_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
perforationsExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
perforationsExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForPerforations( exportSettings.caseToApply,
|
||||
perforationsExportFile,
|
||||
@@ -165,10 +165,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
fishbonesExportFile = unifiedWellPathFile;
|
||||
else
|
||||
{
|
||||
QString fileName = QString( "%1_Fishbones_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fishbonesExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
QString fileName =
|
||||
QString( "%1_Fishbones_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fishbonesExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForFishbones( exportSettings.caseToApply,
|
||||
fishbonesExportFile,
|
||||
@@ -204,11 +204,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFractures( RimEcl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones(
|
||||
RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs )
|
||||
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs )
|
||||
{
|
||||
if ( eclipseCase == nullptr )
|
||||
{
|
||||
@@ -242,7 +241,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForPerforations(
|
||||
return;
|
||||
}
|
||||
|
||||
RicMswExportInfo exportInfo = generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
|
||||
RicMswExportInfo exportInfo =
|
||||
generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
|
||||
|
||||
QTextStream stream( exportFile.get() );
|
||||
RifTextDataTableFormatter formatter( stream );
|
||||
@@ -286,15 +286,16 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RifTextDataTableColumn> header =
|
||||
{RifTextDataTableColumn( "First Seg" ),
|
||||
RifTextDataTableColumn( "Last Seg" ),
|
||||
RifTextDataTableColumn( "Branch Num" ),
|
||||
RifTextDataTableColumn( "Outlet Seg" ),
|
||||
RifTextDataTableColumn( "Length" ),
|
||||
RifTextDataTableColumn( "Depth Change" ),
|
||||
RifTextDataTableColumn( "Diam" ),
|
||||
RifTextDataTableColumn( "Rough", RifTextDataTableDoubleFormatting( RIF_FLOAT, 7 ) )};
|
||||
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "First Seg" ),
|
||||
RifTextDataTableColumn( "Last Seg" ),
|
||||
RifTextDataTableColumn( "Branch Num" ),
|
||||
RifTextDataTableColumn( "Outlet Seg" ),
|
||||
RifTextDataTableColumn( "Length" ),
|
||||
RifTextDataTableColumn( "Depth Change" ),
|
||||
RifTextDataTableColumn( "Diam" ),
|
||||
RifTextDataTableColumn( "Rough",
|
||||
RifTextDataTableDoubleFormatting( RIF_FLOAT,
|
||||
7 ) )};
|
||||
formatter.header( header );
|
||||
}
|
||||
|
||||
@@ -329,8 +330,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
|
||||
|
||||
formatter.add( location->segmentNumber() ).add( location->segmentNumber() );
|
||||
formatter.add( 1 ); // All segments on main stem are branch 1
|
||||
formatter.add( location->segmentNumber() -
|
||||
1 ); // All main stem segments are connected to the segment below them
|
||||
formatter.add( location->segmentNumber() - 1 ); // All main stem segments are connected to the segment below
|
||||
// them
|
||||
formatter.add( length );
|
||||
formatter.add( depth );
|
||||
formatter.add( exportInfo.linerDiameter() );
|
||||
@@ -442,9 +443,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsSegments(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader(
|
||||
RifTextDataTableFormatter& formatter,
|
||||
RigCompletionData::CompletionType completionType )
|
||||
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader( RifTextDataTableFormatter& formatter,
|
||||
RigCompletionData::CompletionType completionType )
|
||||
{
|
||||
if ( completionType == RigCompletionData::CT_UNDEFINED )
|
||||
{
|
||||
@@ -705,8 +705,7 @@ void RicWellPathExportMswCompletionsImpl::generateWsegAicdTable( RifTextDataTabl
|
||||
{
|
||||
if ( completion->completionType() == RigCompletionData::PERFORATION_AICD )
|
||||
{
|
||||
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>(
|
||||
completion );
|
||||
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>( completion );
|
||||
if ( !aicd->isValid() )
|
||||
{
|
||||
RiaLogging::error( QString( "Export AICD Valve (%1): Valve is invalid. At least one required "
|
||||
@@ -849,12 +848,11 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
{
|
||||
for ( auto& sub : subs->installedLateralIndices() )
|
||||
{
|
||||
double subEndMD = subs->measuredDepth( sub.subIndex );
|
||||
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
|
||||
int subSegCount = SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD,
|
||||
subEndMD,
|
||||
maxSegmentLength );
|
||||
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
|
||||
double subEndMD = subs->measuredDepth( sub.subIndex );
|
||||
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
|
||||
int subSegCount =
|
||||
SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD, subEndMD, maxSegmentLength );
|
||||
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
|
||||
|
||||
double startMd = subStartMD;
|
||||
double startTvd = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( startMd ).z();
|
||||
@@ -874,8 +872,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
if ( ssi == 0 )
|
||||
{
|
||||
// Add completion for ICD
|
||||
std::shared_ptr<RicMswFishbonesICD> icdCompletion(
|
||||
new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
|
||||
std::shared_ptr<RicMswFishbonesICD> icdCompletion( new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
|
||||
std::shared_ptr<RicMswSubSegment> icdSegment(
|
||||
new RicMswSubSegment( subEndMD, subEndMD + 0.1, subEndTVD, subEndTVD ) );
|
||||
icdCompletion->setFlowCoefficient( subs->icdFlowCoefficient() );
|
||||
@@ -890,11 +887,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
QString label = QString( "Lateral %1" ).arg( lateralIndex );
|
||||
location->addCompletion( std::make_shared<RicMswFishbones>( label, lateralIndex ) );
|
||||
}
|
||||
assignFishbonesLateralIntersections( caseToApply,
|
||||
subs,
|
||||
location,
|
||||
&foundSubGridIntersections,
|
||||
maxSegmentLength );
|
||||
assignFishbonesLateralIntersections( caseToApply, subs, location, &foundSubGridIntersections, maxSegmentLength );
|
||||
}
|
||||
|
||||
exportInfo.addWellSegment( location );
|
||||
@@ -928,10 +921,10 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo(
|
||||
RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimWellPathFracture*>& fractures )
|
||||
RicMswExportInfo
|
||||
RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimWellPathFracture*>& fractures )
|
||||
{
|
||||
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
||||
const RigActiveCellInfo* activeCellInfo = caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
@@ -947,9 +940,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
|
||||
double maxSegmentLength = wellPath->fractureCollection()->mswParameters()->maxSegmentLength();
|
||||
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry,
|
||||
intersections,
|
||||
maxSegmentLength );
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry, intersections, maxSegmentLength );
|
||||
|
||||
double initialMD = 0.0;
|
||||
if ( wellPath->fractureCollection()->mswParameters()->referenceMDType() ==
|
||||
@@ -988,9 +979,9 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
double endTVD = cellIntInfo.endTVD;
|
||||
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
|
||||
&localGridIdx );
|
||||
QString gridName;
|
||||
const RigGridBase* localGrid =
|
||||
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
|
||||
QString gridName;
|
||||
if ( localGrid != grid )
|
||||
{
|
||||
gridName = QString::fromStdString( localGrid->gridName() );
|
||||
@@ -1122,10 +1113,8 @@ std::vector<SubSegmentIntersectionInfo>
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections = filterIntersections( intersections,
|
||||
initialMD,
|
||||
wellPathGeometry,
|
||||
eclipseCase );
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
|
||||
filterIntersections( intersections, initialMD, wellPathGeometry, eclipseCase );
|
||||
|
||||
const double maxSegmentLength = wellPath->perforationIntervalCollection()->mswParameters()->maxSegmentLength();
|
||||
|
||||
@@ -1137,11 +1126,11 @@ std::vector<SubSegmentIntersectionInfo>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::filterIntersections(
|
||||
const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase )
|
||||
std::vector<WellPathCellIntersectionInfo>
|
||||
RicWellPathExportMswCompletionsImpl::filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase )
|
||||
{
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections;
|
||||
|
||||
@@ -1154,14 +1143,14 @@ std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::f
|
||||
|
||||
WellPathCellIntersectionInfo extraIntersection;
|
||||
|
||||
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
|
||||
extraIntersection.startPoint = intersectionPoint;
|
||||
extraIntersection.endPoint = firstIntersection.startPoint;
|
||||
extraIntersection.startMD = initialMD;
|
||||
extraIntersection.endMD = firstIntersection.startMD;
|
||||
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
|
||||
extraIntersection.intersectedCellFaceOut = cvf::StructGridInterface::oppositeFace(
|
||||
firstIntersection.intersectedCellFaceIn );
|
||||
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
|
||||
extraIntersection.startPoint = intersectionPoint;
|
||||
extraIntersection.endPoint = firstIntersection.startPoint;
|
||||
extraIntersection.startMD = initialMD;
|
||||
extraIntersection.endMD = firstIntersection.startMD;
|
||||
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
|
||||
extraIntersection.intersectedCellFaceOut =
|
||||
cvf::StructGridInterface::oppositeFace( firstIntersection.intersectedCellFaceIn );
|
||||
extraIntersection.intersectionLengthsInCellCS = cvf::Vec3d::ZERO;
|
||||
|
||||
filteredIntersections.push_back( extraIntersection );
|
||||
@@ -1236,11 +1225,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
if ( segmentLength > segmentLengthThreshold )
|
||||
{
|
||||
QString label = QString( "Main stem segment %1" ).arg( mainBoreSegments.size() + 2 );
|
||||
std::shared_ptr<RicMswSegment> segment( new RicMswSegment( label,
|
||||
cellIntInfo.startMD,
|
||||
cellIntInfo.endMD,
|
||||
cellIntInfo.startTVD,
|
||||
cellIntInfo.endTVD ) );
|
||||
std::shared_ptr<RicMswSegment> segment(
|
||||
new RicMswSegment( label, cellIntInfo.startMD, cellIntInfo.endMD, cellIntInfo.startTVD, cellIntInfo.endTVD ) );
|
||||
|
||||
for ( const RimPerforationInterval* interval : perforationIntervals )
|
||||
{
|
||||
@@ -1250,10 +1236,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
if ( overlap > 0.0 )
|
||||
{
|
||||
std::shared_ptr<RicMswCompletion> intervalCompletion( new RicMswPerforation( interval->name() ) );
|
||||
std::vector<RigCompletionData> completionData = generatePerforationIntersections( wellPath,
|
||||
interval,
|
||||
timeStep,
|
||||
eclipseCase );
|
||||
std::vector<RigCompletionData> completionData =
|
||||
generatePerforationIntersections( wellPath, interval, timeStep, eclipseCase );
|
||||
assignPerforationIntersections( completionData,
|
||||
intervalCompletion,
|
||||
cellIntInfo,
|
||||
@@ -1267,9 +1251,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
}
|
||||
else
|
||||
{
|
||||
QString text = QString( "Skipping segment , threshold = %1, length = %2" )
|
||||
.arg( segmentLengthThreshold )
|
||||
.arg( segmentLength );
|
||||
QString text =
|
||||
QString( "Skipping segment , threshold = %1, length = %2" ).arg( segmentLengthThreshold ).arg( segmentLength );
|
||||
RiaLogging::info( text );
|
||||
}
|
||||
}
|
||||
@@ -1353,7 +1336,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
|
||||
}
|
||||
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::ICD && !superICD ) )
|
||||
{
|
||||
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
QString valveLabel =
|
||||
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
std::shared_ptr<RicMswSubSegment> subSegment(
|
||||
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
|
||||
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
|
||||
@@ -1361,7 +1345,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
|
||||
}
|
||||
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::AICD && !superAICD ) )
|
||||
{
|
||||
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
QString valveLabel =
|
||||
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
std::shared_ptr<RicMswSubSegment> subSegment(
|
||||
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
|
||||
superAICD = std::make_shared<RicMswPerforationAICD>( valveLabel, valve );
|
||||
@@ -1651,9 +1636,7 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
|
||||
pathGeometry.m_wellPathPoints = lateralCoords;
|
||||
pathGeometry.m_measuredDepths = lateralMDs;
|
||||
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry,
|
||||
intersections,
|
||||
maxSegmentLength );
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry, intersections, maxSegmentLength );
|
||||
|
||||
double previousExitMD = lateralMDs.front();
|
||||
double previousExitTVD = -lateralCoords.front().z();
|
||||
@@ -1661,9 +1644,9 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
|
||||
for ( const auto& cellIntInfo : subSegIntersections )
|
||||
{
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
|
||||
&localGridIdx );
|
||||
QString gridName;
|
||||
const RigGridBase* localGrid =
|
||||
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
|
||||
QString gridName;
|
||||
if ( localGrid != grid )
|
||||
{
|
||||
gridName = QString::fromStdString( localGrid->gridName() );
|
||||
@@ -1728,11 +1711,11 @@ void RicWellPathExportMswCompletionsImpl::assignFractureIntersections( const Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicWellPathExportMswCompletionsImpl::generatePerforationIntersections(
|
||||
const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase )
|
||||
std::vector<RigCompletionData>
|
||||
RicWellPathExportMswCompletionsImpl::generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase )
|
||||
{
|
||||
std::vector<RigCompletionData> completionData;
|
||||
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
||||
@@ -146,11 +146,10 @@ private:
|
||||
std::shared_ptr<RicMswSegment> location,
|
||||
bool* foundSubGridIntersections );
|
||||
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase );
|
||||
static std::vector<RigCompletionData> generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase );
|
||||
|
||||
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
|
||||
std::shared_ptr<RicMswCompletion> perforationCompletion,
|
||||
|
||||
@@ -531,9 +531,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureInstancesText(
|
||||
floatNumberColumn( "LPerf" ),
|
||||
floatNumberColumn( "PerfEff" ),
|
||||
floatNumberColumn( "Wdia" ),
|
||||
RifTextDataTableColumn( "Dfac",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ),
|
||||
RIGHT ),
|
||||
RifTextDataTableColumn( "Dfac", RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ), RIGHT ),
|
||||
};
|
||||
|
||||
formatter.header( header );
|
||||
|
||||
@@ -54,8 +54,7 @@ private:
|
||||
QString createFracturePressureDepletionSummaryText(
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
|
||||
QString createConnectionsPerWellText(
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
QString createConnectionsPerWellText( const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
|
||||
void configureFormatter( RifTextDataTableFormatter* formatter ) const;
|
||||
};
|
||||
|
||||
@@ -54,8 +54,8 @@ void RicAppendSeparateIntersectionResultFeature::onActionTriggered( bool isCheck
|
||||
|
||||
CVF_ASSERT( intersectionResCollection );
|
||||
|
||||
RicAppendSeparateIntersectionResultFeatureCmd* cmd = new RicAppendSeparateIntersectionResultFeatureCmd(
|
||||
intersectionResCollection );
|
||||
RicAppendSeparateIntersectionResultFeatureCmd* cmd =
|
||||
new RicAppendSeparateIntersectionResultFeatureCmd( intersectionResCollection );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,7 @@ class RimIntersectionResultsDefinitionCollection;
|
||||
class RicAppendSeparateIntersectionResultFeatureCmd : public caf::CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
explicit RicAppendSeparateIntersectionResultFeatureCmd(
|
||||
RimIntersectionResultsDefinitionCollection* intersectionCollection );
|
||||
explicit RicAppendSeparateIntersectionResultFeatureCmd( RimIntersectionResultsDefinitionCollection* intersectionCollection );
|
||||
~RicAppendSeparateIntersectionResultFeatureCmd() override;
|
||||
|
||||
QString name() override;
|
||||
|
||||
@@ -63,8 +63,8 @@ void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked )
|
||||
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||
if ( !activeView ) return;
|
||||
|
||||
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(
|
||||
activeView->intersectionCollection() );
|
||||
RicNewAzimuthDipIntersectionFeatureCmd* cmd =
|
||||
new RicNewAzimuthDipIntersectionFeatureCmd( activeView->intersectionCollection() );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
||||
}
|
||||
|
||||
@@ -80,8 +80,7 @@ void RicNewAzimuthDipIntersectionFeature::setupActionLook( QAction* actionToSetu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd(
|
||||
RimIntersectionCollection* intersectionCollection )
|
||||
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd( RimIntersectionCollection* intersectionCollection )
|
||||
: CmdExecuteCommand( nullptr )
|
||||
, m_intersectionCollection( intersectionCollection )
|
||||
{
|
||||
|
||||
@@ -62,8 +62,8 @@ void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked )
|
||||
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||
if ( !activeView ) return;
|
||||
|
||||
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(
|
||||
activeView->intersectionCollection() );
|
||||
RicNewPolylineIntersectionFeatureCmd* cmd =
|
||||
new RicNewPolylineIntersectionFeatureCmd( activeView->intersectionCollection() );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,7 @@ void RicEclipseCaseNewGroupExec::redo()
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
CVF_ASSERT( proj );
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels()
|
||||
: nullptr;
|
||||
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : nullptr;
|
||||
|
||||
if ( analysisModels )
|
||||
{
|
||||
|
||||
@@ -74,9 +74,9 @@ void RicEclipseHideFaultFeature::onActionTriggered( bool isChecked )
|
||||
size_t currentCellIndex = static_cast<size_t>( list[0].toULongLong() );
|
||||
int currentFaceIndex = list[1].toInt();
|
||||
|
||||
const RigFault* fault = eclView->mainGrid()->findFaultFromCellIndexAndCellFace( currentCellIndex,
|
||||
cvf::StructGridInterface::FaceType(
|
||||
currentFaceIndex ) );
|
||||
const RigFault* fault =
|
||||
eclView->mainGrid()->findFaultFromCellIndexAndCellFace( currentCellIndex,
|
||||
cvf::StructGridInterface::FaceType( currentFaceIndex ) );
|
||||
if ( fault )
|
||||
{
|
||||
QString faultName = fault->name();
|
||||
|
||||
@@ -37,7 +37,8 @@ CAF_CMD_SOURCE_INIT( RicEclipsePropertyFilterInsertFeature, "RicEclipsePropertyF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters =
|
||||
RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
if ( propertyFilters.size() == 1 )
|
||||
{
|
||||
return RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable( propertyFilters[0] );
|
||||
@@ -51,7 +52,8 @@ bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicEclipsePropertyFilterInsertFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters =
|
||||
RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
if ( propertyFilters.size() == 1 )
|
||||
{
|
||||
RicEclipsePropertyFilterInsertExec* filterExec = new RicEclipsePropertyFilterInsertExec( propertyFilters[0] );
|
||||
|
||||
@@ -69,8 +69,8 @@ void RicEclipsePropertyFilterNewInViewFeature::onActionTriggered( bool isChecked
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
|
||||
if ( !eclView ) return;
|
||||
|
||||
RicEclipsePropertyFilterNewExec* filterExec = new RicEclipsePropertyFilterNewExec(
|
||||
eclView->eclipsePropertyFilterCollection() );
|
||||
RicEclipsePropertyFilterNewExec* filterExec =
|
||||
new RicEclipsePropertyFilterNewExec( eclView->eclipsePropertyFilterCollection() );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( filterExec );
|
||||
}
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ void RicAdvancedSnapshotExportFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
|
||||
{
|
||||
QString fallbackFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath(
|
||||
"snapshots" );
|
||||
QString fallbackFolderName =
|
||||
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
|
||||
QString folderName =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "ADVANCED_SNAPSHOT_EXPORT",
|
||||
fallbackFolderName );
|
||||
@@ -157,8 +157,7 @@ void RicAdvancedSnapshotExportFeature::exportMultipleSnapshots( const QString& f
|
||||
if ( geomCase && sourceGeoMechView )
|
||||
{
|
||||
RimGeoMechView* copyOfGeoMechView = dynamic_cast<RimGeoMechView*>(
|
||||
sourceGeoMechView->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() ) );
|
||||
sourceGeoMechView->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
CVF_ASSERT( copyOfGeoMechView );
|
||||
|
||||
geomCase->geoMechViews().push_back( copyOfGeoMechView );
|
||||
|
||||
@@ -48,9 +48,7 @@ private:
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
void clampValues();
|
||||
|
||||
@@ -86,13 +86,7 @@ bool RicEclipseCellResultToFileImpl::writeBinaryResultToTextFile( const QString&
|
||||
return false;
|
||||
}
|
||||
|
||||
return writeResultToTextFile( fileName,
|
||||
eclipseCase,
|
||||
resultAccessor.p(),
|
||||
eclipseKeyword,
|
||||
undefinedValue,
|
||||
logPrefix,
|
||||
errorMsg );
|
||||
return writeResultToTextFile( fileName, eclipseCase, resultAccessor.p(), eclipseKeyword, undefinedValue, logPrefix, errorMsg );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -56,9 +56,7 @@ private:
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
|
||||
@@ -97,9 +97,8 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView*
|
||||
const RicExportEclipseSectorModelUi& exportSettings,
|
||||
const QString& logPrefix )
|
||||
{
|
||||
int resultProgressPercentage = exportSettings.exportParameters()
|
||||
? std::min( (int)exportSettings.selectedKeywords().size(), 20 )
|
||||
: 0;
|
||||
int resultProgressPercentage =
|
||||
exportSettings.exportParameters() ? std::min( (int)exportSettings.selectedKeywords().size(), 20 ) : 0;
|
||||
|
||||
int faultsProgressPercentage = exportSettings.exportFaults() ? 10 : 0;
|
||||
|
||||
|
||||
@@ -47,9 +47,7 @@ void RicExportEclipseSectorModelUi::ResultExportOptionsEnum::setUp()
|
||||
{
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_NO_RESULTS, "NO_RESULTS", "Do not export" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_GRID_FILE, "TO_GRID_FILE", "Append to grid file" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE,
|
||||
"TO_SINGLE_RESULT_FILE",
|
||||
"Export to single file" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE, "TO_SINGLE_RESULT_FILE", "Export to single file" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SEPARATE_FILE_PER_RESULT,
|
||||
"TO_SEPARATE_RESULT_FILES",
|
||||
"Export to a separate file per parameter" );
|
||||
@@ -235,9 +233,7 @@ void RicExportEclipseSectorModelUi::defineEditorAttribute( const caf::PdmFieldHa
|
||||
if ( !m_caseData ) return;
|
||||
|
||||
const RigMainGrid* mainGrid = m_caseData->mainGrid();
|
||||
cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ),
|
||||
int( mainGrid->cellCountJ() ),
|
||||
int( mainGrid->cellCountK() ) );
|
||||
cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ), int( mainGrid->cellCountJ() ), int( mainGrid->cellCountK() ) );
|
||||
|
||||
caf::PdmUiLineEditorAttribute* lineEditorAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
|
||||
|
||||
@@ -521,8 +517,8 @@ QString RicExportEclipseSectorModelUi::defaultFolder() const
|
||||
if ( fallbackDirectory.isEmpty() )
|
||||
{
|
||||
QString generalFallback = RiaApplication::instance()->lastUsedDialogDirectory( "GENERAL_DATA" );
|
||||
fallbackDirectory = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID",
|
||||
generalFallback );
|
||||
fallbackDirectory =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID", generalFallback );
|
||||
}
|
||||
return RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "EXPORT_INPUT_GRID", fallbackDirectory );
|
||||
}
|
||||
|
||||
@@ -105,9 +105,7 @@ protected:
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
|
||||
@@ -434,9 +434,7 @@ void RicExportLgrFeature::exportLgrsForWellPaths( const QString&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportLgrFeature::exportLgrs( const QString& exportFolder,
|
||||
const QString& wellName,
|
||||
const std::vector<LgrInfo>& lgrInfos )
|
||||
void RicExportLgrFeature::exportLgrs( const QString& exportFolder, const QString& wellName, const std::vector<LgrInfo>& lgrInfos )
|
||||
{
|
||||
if ( !lgrInfos.empty() )
|
||||
{
|
||||
@@ -477,12 +475,9 @@ std::vector<LgrInfo>
|
||||
{
|
||||
for ( const auto& wellPath : wellPaths )
|
||||
{
|
||||
auto intersectingCells = cellsIntersectingCompletions( eclipseCase,
|
||||
wellPath,
|
||||
timeStep,
|
||||
completionTypes,
|
||||
&isIntersectingOtherLgrs );
|
||||
auto newLgrs = buildLgrsPerMainCell( firstLgrId + (int)lgrs.size(),
|
||||
auto intersectingCells =
|
||||
cellsIntersectingCompletions( eclipseCase, wellPath, timeStep, completionTypes, &isIntersectingOtherLgrs );
|
||||
auto newLgrs = buildLgrsPerMainCell( firstLgrId + (int)lgrs.size(),
|
||||
eclipseCase,
|
||||
wellPath,
|
||||
intersectingCells,
|
||||
@@ -515,11 +510,8 @@ std::vector<LgrInfo>
|
||||
int lgrId = firstLgrId + (int)lgrs.size();
|
||||
auto lgrName = lgrNameFactory.newName( "WELL", lgrId );
|
||||
|
||||
auto intersectingCells = cellsIntersectingCompletions( eclipseCase,
|
||||
wellPath,
|
||||
timeStep,
|
||||
completionTypes,
|
||||
&isIntersectingOtherLgrs );
|
||||
auto intersectingCells =
|
||||
cellsIntersectingCompletions( eclipseCase, wellPath, timeStep, completionTypes, &isIntersectingOtherLgrs );
|
||||
lgrs.push_back( buildLgr( lgrId, lgrName, eclipseCase, wellPath->name(), intersectingCells, lgrCellCounts ) );
|
||||
|
||||
if ( isIntersectingOtherLgrs ) wellsIntersectingOtherLgrs->push_back( wellPath->name() );
|
||||
@@ -610,12 +602,8 @@ std::vector<LgrInfo> RicExportLgrFeature::buildLgrsPerCompletion(
|
||||
for ( auto complInfo : occupiedBbs )
|
||||
{
|
||||
auto lgrName = lgrNameFactory.newName( complInfo.first.type );
|
||||
lgrs.push_back( buildLgr( lgrId++,
|
||||
lgrName,
|
||||
eclipseCase,
|
||||
complInfo.first.wellPathName,
|
||||
complInfo.second,
|
||||
lgrSizesPerMainGridCell ) );
|
||||
lgrs.push_back(
|
||||
buildLgr( lgrId++, lgrName, eclipseCase, complInfo.first.wellPathName, complInfo.second, lgrSizesPerMainGridCell ) );
|
||||
}
|
||||
return lgrs;
|
||||
}
|
||||
@@ -713,12 +701,11 @@ std::vector<RigCompletionDataGridCell>
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<CompletionInfo, std::vector<RigCompletionDataGridCell>>
|
||||
RicExportLgrFeature::cellsIntersectingCompletions_PerCompletion(
|
||||
RimEclipseCase* eclipseCase,
|
||||
const std::vector<RimWellPath*>& wellPaths,
|
||||
size_t timeStep,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
QStringList* wellsIntersectingOtherLgrs )
|
||||
RicExportLgrFeature::cellsIntersectingCompletions_PerCompletion( RimEclipseCase* eclipseCase,
|
||||
const std::vector<RimWellPath*>& wellPaths,
|
||||
size_t timeStep,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
QStringList* wellsIntersectingOtherLgrs )
|
||||
{
|
||||
const RigMainGrid* mainGrid = eclipseCase->mainGrid();
|
||||
|
||||
|
||||
@@ -68,9 +68,7 @@ private:
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
|
||||
@@ -43,10 +43,8 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
static void handleAction( const std::vector<RimWellPath*>& wellPaths );
|
||||
static void exportWellPath( const RimWellPath* wellPath,
|
||||
double mdStepSize,
|
||||
const QString& folder,
|
||||
bool writeProjectInfo = true );
|
||||
static void
|
||||
exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder, bool writeProjectInfo = true );
|
||||
|
||||
static RicExportWellPathsUi* openDialog();
|
||||
static QFilePtr openFileForExport( const QString& folderName, const QString& fileName );
|
||||
|
||||
@@ -141,8 +141,8 @@ void RicExportToLasFileFeature::onActionTriggered( bool isChecked )
|
||||
std::vector<RimWellLogCurve*> curves = RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves();
|
||||
if ( curves.size() == 0 ) return;
|
||||
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"WELL_LOGS_DIR" );
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "WELL_LOGS_DIR" );
|
||||
|
||||
RigLasFileExporter lasExporter( curves );
|
||||
RicExportToLasFileResampleUi featureUi;
|
||||
|
||||
@@ -106,8 +106,7 @@ void RicExportToLasFileResampleUi::tvdrkbDiffForWellPaths( std::vector<double>*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportToLasFileResampleUi::setRkbDiffs( const std::vector<QString>& wellNames,
|
||||
const std::vector<double>& rkbDiffs )
|
||||
void RicExportToLasFileResampleUi::setRkbDiffs( const std::vector<QString>& wellNames, const std::vector<double>& rkbDiffs )
|
||||
{
|
||||
for ( size_t i = 0; i < wellNames.size(); i++ )
|
||||
{
|
||||
@@ -212,8 +211,8 @@ void RicExportToLasFileResampleUi::defineUiOrdering( QString uiConfigName, caf::
|
||||
caf::PdmUiGroup* tvdrkbGroup = uiOrdering.addNewGroup( "TVDRKB" );
|
||||
tvdrkbGroup->add( &exportTvdrkb );
|
||||
|
||||
caf::PdmUiGroup* group = tvdrkbGroup->addNewGroup(
|
||||
"Difference between TVDRKB and TVDMSL, clear diff for no export" );
|
||||
caf::PdmUiGroup* group =
|
||||
tvdrkbGroup->addNewGroup( "Difference between TVDRKB and TVDMSL, clear diff for no export" );
|
||||
for ( auto& obj : m_tvdrkbOffsets )
|
||||
{
|
||||
group->add( &obj->tvdrkbOffset );
|
||||
|
||||
@@ -69,9 +69,7 @@ public:
|
||||
void setRkbDiffs( const std::vector<QString>& wellNames, const std::vector<double>& rkbDiffs );
|
||||
void setUnitConversionOptionEnabled( bool enabled );
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
@@ -46,9 +46,7 @@ CAF_CMD_SOURCE_INIT( RicExportVisibleWellPathsFeature, "RicExportVisibleWellPath
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportVisibleWellPathsFeature::exportWellPath( const RimWellPath* wellPath,
|
||||
double mdStepSize,
|
||||
const QString& folder )
|
||||
void RicExportVisibleWellPathsFeature::exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder )
|
||||
{
|
||||
auto geom = wellPath->wellPathGeometry();
|
||||
double currMd = geom->measureDepths().front() - mdStepSize;
|
||||
|
||||
@@ -83,8 +83,8 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered( bool isChecked )
|
||||
// Find input reservoir for this property
|
||||
RimEclipseCase* eclipseCase = nullptr;
|
||||
{
|
||||
RimEclipseInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimEclipseInputPropertyCollection*>(
|
||||
inputProperty->parentField()->ownerObject() );
|
||||
RimEclipseInputPropertyCollection* inputPropertyCollection =
|
||||
dynamic_cast<RimEclipseInputPropertyCollection*>( inputProperty->parentField()->ownerObject() );
|
||||
if ( !inputPropertyCollection ) return;
|
||||
|
||||
eclipseCase = dynamic_cast<RimEclipseCase*>( inputPropertyCollection->parentField()->ownerObject() );
|
||||
|
||||
@@ -54,9 +54,7 @@ protected:
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
QString getDefaultExportPath() const;
|
||||
|
||||
@@ -112,9 +112,8 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
||||
&errMsg );
|
||||
if ( !isOk )
|
||||
{
|
||||
QString fullError = QString( "Failed to exported current result to %1. Error was: %2" )
|
||||
.arg( exportSettings.fileName )
|
||||
.arg( errMsg );
|
||||
QString fullError =
|
||||
QString( "Failed to exported current result to %1. Error was: %2" ).arg( exportSettings.fileName ).arg( errMsg );
|
||||
RiaLogging::error( fullError );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ void RicSaveEclipseResultAsInputPropertyFeature::onActionTriggered( bool isCheck
|
||||
|
||||
if ( eclipseCellColors )
|
||||
{
|
||||
RicSaveEclipseResultAsInputPropertyExec* cellResultSaveExec = new RicSaveEclipseResultAsInputPropertyExec(
|
||||
eclipseCellColors );
|
||||
RicSaveEclipseResultAsInputPropertyExec* cellResultSaveExec =
|
||||
new RicSaveEclipseResultAsInputPropertyExec( eclipseCellColors );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cellResultSaveExec );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,10 +135,9 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
|
||||
RimGridView* rigv = dynamic_cast<RimGridView*>( riv );
|
||||
if ( rigv )
|
||||
{
|
||||
QImage img = rigv->overlayInfoConfig()->statisticsDialogScreenShotImage();
|
||||
absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath,
|
||||
fileName + "_Statistics",
|
||||
".png" );
|
||||
QImage img = rigv->overlayInfoConfig()->statisticsDialogScreenShotImage();
|
||||
absoluteFileName =
|
||||
caf::Utils::constructFullFileName( absSnapshotPath, fileName + "_Statistics", ".png" );
|
||||
RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, img );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,10 +63,8 @@ QString RicSnapshotFilenameGenerator::generateSnapshotFilenameForRimView( Rim3dV
|
||||
QStringList timeSteps = rimView->ownerCase()->timeStepStrings();
|
||||
int timeStep = rimView->currentTimeStep();
|
||||
|
||||
QString fileName = QString( "%1_%2_%3" )
|
||||
.arg( rimView->ownerCase()->caseUserDescription() )
|
||||
.arg( rimView->name() )
|
||||
.arg( resultName( rimView ) );
|
||||
QString fileName =
|
||||
QString( "%1_%2_%3" ).arg( rimView->ownerCase()->caseUserDescription() ).arg( rimView->name() ).arg( resultName( rimView ) );
|
||||
|
||||
if ( !timeSteps.empty() )
|
||||
fileName += QString( "_%1_%2" ).arg( timeStep, 2, 10, QChar( '0' ) ).arg( timeSteps[timeStep] );
|
||||
|
||||
@@ -201,10 +201,8 @@ QString RicSnapshotViewToFileFeature::generateSaveFileName( const QString& defau
|
||||
}
|
||||
|
||||
QString defaultAbsFileName = caf::Utils::constructFullFileName( startPath, defaultFileBaseName, ".png" );
|
||||
QString fileName = QFileDialog::getSaveFileName( nullptr,
|
||||
tr( "Export to File" ),
|
||||
defaultAbsFileName,
|
||||
fileExtensionFilter );
|
||||
QString fileName =
|
||||
QFileDialog::getSaveFileName( nullptr, tr( "Export to File" ), defaultAbsFileName, fileExtensionFilter );
|
||||
if ( !fileName.isEmpty() )
|
||||
{
|
||||
// Remember the directory to next time
|
||||
|
||||
@@ -46,8 +46,8 @@ bool RicAddStoredFlowCharacteristicsPlotFeature::isCommandEnabled()
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimFlowCharacteristicsPlot* flowCharacteristicsPlot = dynamic_cast<RimFlowCharacteristicsPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimFlowCharacteristicsPlot* flowCharacteristicsPlot =
|
||||
dynamic_cast<RimFlowCharacteristicsPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
if ( flowPlotColl->defaultFlowCharacteristicsPlot() == flowCharacteristicsPlot )
|
||||
{
|
||||
@@ -70,8 +70,8 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered( bool isCheck
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimFlowCharacteristicsPlot* sourceObject = dynamic_cast<RimFlowCharacteristicsPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimFlowCharacteristicsPlot* sourceObject =
|
||||
dynamic_cast<RimFlowCharacteristicsPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimFlowCharacteristicsPlot* flowCharacteristicsPlot = dynamic_cast<RimFlowCharacteristicsPlot*>(
|
||||
sourceObject->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
@@ -46,8 +46,8 @@ bool RicAddStoredWellAllocationPlotFeature::isCommandEnabled()
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
if ( flowPlotColl->defaultWellAllocPlot() == wellAllocationPlot )
|
||||
{
|
||||
@@ -70,8 +70,8 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered( bool isChecked )
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimWellAllocationPlot* sourceObject = dynamic_cast<RimWellAllocationPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimWellAllocationPlot* sourceObject =
|
||||
dynamic_cast<RimWellAllocationPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
sourceObject->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
@@ -77,9 +77,8 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
CAF_ASSERT( project );
|
||||
|
||||
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField()
|
||||
? project->activeOilField()->summaryCaseMainCollection()
|
||||
: nullptr;
|
||||
RimSummaryCaseMainCollection* sumCaseColl =
|
||||
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
if ( !sumCaseColl ) return;
|
||||
|
||||
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
|
||||
|
||||
@@ -101,8 +101,8 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells( Rim
|
||||
// assert(flowDiagSolution);
|
||||
CVF_ASSERT( flowDiagSolution );
|
||||
|
||||
RimFlowDiagSolution::TracerStatusType tracerStatus = flowDiagSolution->tracerStatusInTimeStep( selectedWell->name(),
|
||||
timeStep );
|
||||
RimFlowDiagSolution::TracerStatusType tracerStatus =
|
||||
flowDiagSolution->tracerStatusInTimeStep( selectedWell->name(), timeStep );
|
||||
if ( !( tracerStatus == RimFlowDiagSolution::INJECTOR || tracerStatus == RimFlowDiagSolution::PRODUCER ) )
|
||||
{
|
||||
return;
|
||||
@@ -130,9 +130,8 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells( Rim
|
||||
viewToModify->cellResult()->loadDataAndUpdate();
|
||||
viewToModify->cellResult()->updateConnectedEditors();
|
||||
|
||||
std::vector<QString> tracerNames = findContributingTracerNames( flowDiagSolution,
|
||||
selectedWell->simWellData(),
|
||||
timeStep );
|
||||
std::vector<QString> tracerNames =
|
||||
findContributingTracerNames( flowDiagSolution, selectedWell->simWellData(), timeStep );
|
||||
|
||||
for ( RimSimWellInView* w : viewToModify->wellCollection()->wells() )
|
||||
{
|
||||
|
||||
@@ -35,8 +35,8 @@ CAF_CMD_SOURCE_INIT( RicShowContributingWellsFromPlotFeature, "RicShowContributi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
RiaGuiApplication::instance()->activePlotWindow() );
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>( RiaGuiApplication::instance()->activePlotWindow() );
|
||||
|
||||
if ( wellAllocationPlot ) return true;
|
||||
|
||||
@@ -48,8 +48,8 @@ bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowContributingWellsFromPlotFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
RiaGuiApplication::instance()->activePlotWindow() );
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>( RiaGuiApplication::instance()->activePlotWindow() );
|
||||
|
||||
if ( !wellAllocationPlot ) return;
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ bool RicShowWellAllocationPlotFeature::isCommandEnabled()
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
|
||||
if ( !eclView ) return false;
|
||||
|
||||
RimSimWellInView* simWellFromWellPath = eclView->wellCollection()->findWell(
|
||||
wellPathCollection[0]->associatedSimulationWellName() );
|
||||
RimSimWellInView* simWellFromWellPath =
|
||||
eclView->wellCollection()->findWell( wellPathCollection[0]->associatedSimulationWellName() );
|
||||
|
||||
if ( simWellFromWellPath )
|
||||
{
|
||||
|
||||
@@ -117,8 +117,8 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
|
||||
// If this is the first fracture, set default result name
|
||||
if ( fractureCollection->allFractures().empty() )
|
||||
{
|
||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(
|
||||
RiaApplication::instance()->activeReservoirView() );
|
||||
RimEclipseView* activeView =
|
||||
dynamic_cast<RimEclipseView*>( RiaApplication::instance()->activeReservoirView() );
|
||||
if ( activeView )
|
||||
{
|
||||
activeView->fractureColors()->setDefaultResultName();
|
||||
@@ -220,8 +220,9 @@ void RicCreateMultipleFracturesFeature::onActionTriggered( bool isChecked )
|
||||
dialogButtonBox->clear();
|
||||
|
||||
{
|
||||
QPushButton* pushButton = dialogButtonBox->addButton( RiuCreateMultipleFractionsUi::REPLACE_FRACTURES_BUTTON_TEXT,
|
||||
QDialogButtonBox::ActionRole );
|
||||
QPushButton* pushButton =
|
||||
dialogButtonBox->addButton( RiuCreateMultipleFractionsUi::REPLACE_FRACTURES_BUTTON_TEXT,
|
||||
QDialogButtonBox::ActionRole );
|
||||
connect( pushButton, SIGNAL( clicked() ), this, SLOT( slotDeleteAndAppendFractures() ) );
|
||||
pushButton->setDefault( false );
|
||||
pushButton->setAutoDefault( false );
|
||||
|
||||
@@ -44,9 +44,7 @@ public:
|
||||
bool isKLayerContained( int oneBasedK ) const;
|
||||
|
||||
private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
@@ -349,8 +349,8 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
|
||||
}
|
||||
else
|
||||
{
|
||||
double spacing = std::max( options[i - 1].uiOption->minimumSpacing(),
|
||||
option.uiOption->minimumSpacing() );
|
||||
double spacing =
|
||||
std::max( options[i - 1].uiOption->minimumSpacing(), option.uiOption->minimumSpacing() );
|
||||
fracMdCandidate = lastFracMd - spacing;
|
||||
}
|
||||
|
||||
@@ -358,8 +358,7 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
|
||||
|
||||
while ( fracMdCandidate > option.endMd )
|
||||
{
|
||||
items.push_back(
|
||||
LocationForNewFracture( option.uiOption->fractureTemplate(), w, fracMdCandidate ) );
|
||||
items.push_back( LocationForNewFracture( option.uiOption->fractureTemplate(), w, fracMdCandidate ) );
|
||||
lastFracMd = fracMdCandidate;
|
||||
fracMdCandidate -= option.uiOption->minimumSpacing();
|
||||
fractureCountForWell++;
|
||||
|
||||
@@ -93,9 +93,7 @@ public:
|
||||
private:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu,
|
||||
QMenu* menu,
|
||||
QWidget* fieldEditorWidget ) override;
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
@@ -90,8 +90,7 @@ void RicPasteGridCrossPlotDataSetFeature::setupActionLook( QAction* actionToSetu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>>
|
||||
RicPasteGridCrossPlotDataSetFeature::gridCrossPlotDataSetsOnClipboard()
|
||||
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>> RicPasteGridCrossPlotDataSetFeature::gridCrossPlotDataSetsOnClipboard()
|
||||
{
|
||||
caf::PdmObjectGroup objectGroup;
|
||||
RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup );
|
||||
|
||||
@@ -46,10 +46,7 @@ void RicHoloLensCreateSessionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicHoloLensCreateSessionUi createSessionUi;
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog( RiuMainWindow::instance(),
|
||||
&createSessionUi,
|
||||
"HoloLens - Create Session",
|
||||
"" );
|
||||
caf::PdmUiPropertyViewDialog propertyDialog( RiuMainWindow::instance(), &createSessionUi, "HoloLens - Create Session", "" );
|
||||
propertyDialog.resize( QSize( 400, 330 ) );
|
||||
|
||||
{
|
||||
|
||||
@@ -71,8 +71,7 @@ RimGridView* RicHoloLensExportToFolderUi::viewForExport() const
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo>
|
||||
RicHoloLensExportToFolderUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly )
|
||||
RicHoloLensExportToFolderUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
|
||||
@@ -33,8 +33,7 @@ public:
|
||||
virtual void handleSuccessfulCreateSession() = 0;
|
||||
virtual void handleFailedCreateSession() = 0;
|
||||
|
||||
virtual void handleSuccessfulSendMetaData( int metaDataSequenceNumber,
|
||||
const QByteArray& jsonServerResponseString ) = 0;
|
||||
virtual void handleSuccessfulSendMetaData( int metaDataSequenceNumber, const QByteArray& jsonServerResponseString ) = 0;
|
||||
|
||||
virtual void handleError( const QString& errMsg, const QString& url, const QString& serverData ) = 0;
|
||||
};
|
||||
|
||||
@@ -157,7 +157,8 @@ void RicHoloLensSession::updateSessionDataFromView( const RimGridView& activeVie
|
||||
// Note!
|
||||
// The packet directory should now contain all the packets that are being actively referenced.
|
||||
// We now prune out any packets that are no longer being referenced. This means we do no caching of actual packet
|
||||
// data over time and that we assume that the server will ask for data packets/arrays right after having received updated meta data
|
||||
// data over time and that we assume that the server will ask for data packets/arrays right after having received
|
||||
// updated meta data
|
||||
m_packetDirectory.pruneUnreferencedPackets( allReferencedPacketIds );
|
||||
|
||||
m_lastExtractionMetaDataSequenceNumber++;
|
||||
@@ -178,8 +179,7 @@ void RicHoloLensSession::updateSessionDataFromView( const RimGridView& activeVie
|
||||
|
||||
if ( !outputDir.mkpath( "." ) )
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "HoloLens: Could not create debug file export folder: %1" ).arg( absOutputFolder ) );
|
||||
RiaLogging::error( QString( "HoloLens: Could not create debug file export folder: %1" ).arg( absOutputFolder ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -280,8 +280,8 @@ void RicHoloLensSession::handleSuccessfulSendMetaData( int metaDat
|
||||
return;
|
||||
}
|
||||
|
||||
RiaLogging::info( QString( "HoloLens: Start sending data to server, %1 data arrays have been requested" )
|
||||
.arg( arrayIdsToSend.size() ) );
|
||||
RiaLogging::info(
|
||||
QString( "HoloLens: Start sending data to server, %1 data arrays have been requested" ).arg( arrayIdsToSend.size() ) );
|
||||
|
||||
size_t totalBytesSent = 0;
|
||||
size_t totalNumArraysSent = 0;
|
||||
|
||||
@@ -57,8 +57,7 @@ public:
|
||||
size_t fullPacketSize() const;
|
||||
const char* fullPacketRawPtr() const;
|
||||
|
||||
static std::unique_ptr<VdeArrayDataPacket>
|
||||
fromFloat32Arr( int arrayId, const float* srcArr, size_t srcArrElementCount );
|
||||
static std::unique_ptr<VdeArrayDataPacket> fromFloat32Arr( int arrayId, const float* srcArr, size_t srcArrElementCount );
|
||||
static std::unique_ptr<VdeArrayDataPacket>
|
||||
fromUint32Arr( int arrayId, const unsigned int* srcArr, size_t srcArrElementCount );
|
||||
static std::unique_ptr<VdeArrayDataPacket> fromUint8ImageRGBArr( int arrayId,
|
||||
|
||||
@@ -102,9 +102,7 @@ int VdeCachingHashedIdFactory::getOrCreateIdForUint32Arr( ArrayRole ar
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int VdeCachingHashedIdFactory::getOrCreateIdForUint8Arr( ArrayRole arrayRole,
|
||||
const unsigned char* uint8Arr,
|
||||
size_t elementCount )
|
||||
int VdeCachingHashedIdFactory::getOrCreateIdForUint8Arr( ArrayRole arrayRole, const unsigned char* uint8Arr, size_t elementCount )
|
||||
{
|
||||
return getOrCreateIdForArrOfType( arrayRole, Uint8, sizeof( unsigned char ), uint8Arr, elementCount );
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ bool VdePacketDirectory::getPacketsAsCombinedBuffer( const std::vector<int>& pac
|
||||
}
|
||||
|
||||
const VdeArrayDataPacket& packet = *it->second;
|
||||
*combinedPacketArr += QByteArray::fromRawData( packet.fullPacketRawPtr(),
|
||||
static_cast<int>( packet.fullPacketSize() ) );
|
||||
*combinedPacketArr +=
|
||||
QByteArray::fromRawData( packet.fullPacketRawPtr(), static_cast<int>( packet.fullPacketSize() ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -89,9 +89,10 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
{
|
||||
const float* floatArr = reinterpret_cast<const float*>( mesh->vertexArr->ptr() );
|
||||
const size_t arrElementCount = 3 * mesh->vertexArr->size();
|
||||
arrayIdsThisMesh.vertexArrId = m_cachingIdFactory->getOrCreateIdForFloatArr( VdeCachingHashedIdFactory::VertexArr,
|
||||
floatArr,
|
||||
arrElementCount );
|
||||
arrayIdsThisMesh.vertexArrId =
|
||||
m_cachingIdFactory->getOrCreateIdForFloatArr( VdeCachingHashedIdFactory::VertexArr,
|
||||
floatArr,
|
||||
arrElementCount );
|
||||
|
||||
if ( !packetDirectory->lookupPacket( arrayIdsThisMesh.vertexArrId ) )
|
||||
{
|
||||
@@ -100,8 +101,9 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
VdeArrayDataPacket::fromFloat32Arr( arrayIdsThisMesh.vertexArrId, floatArr, arrElementCount );
|
||||
|
||||
// Debug testing of decoding
|
||||
// debugComparePackets(*dataPacket, VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(),
|
||||
// dataPacket->fullPacketSize(), nullptr));
|
||||
// debugComparePackets(*dataPacket,
|
||||
// VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(), dataPacket->fullPacketSize(),
|
||||
// nullptr));
|
||||
|
||||
packetDirectory->addPacket( std::move( dataPacket ) );
|
||||
}
|
||||
@@ -109,9 +111,8 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
{
|
||||
const unsigned int* uintArr = mesh->connArr.data();
|
||||
const size_t arrElementCount = mesh->connArr.size();
|
||||
arrayIdsThisMesh.connArrId = m_cachingIdFactory->getOrCreateIdForUint32Arr( VdeCachingHashedIdFactory::ConnArr,
|
||||
uintArr,
|
||||
arrElementCount );
|
||||
arrayIdsThisMesh.connArrId =
|
||||
m_cachingIdFactory->getOrCreateIdForUint32Arr( VdeCachingHashedIdFactory::ConnArr, uintArr, arrElementCount );
|
||||
|
||||
if ( !packetDirectory->lookupPacket( arrayIdsThisMesh.connArrId ) )
|
||||
{
|
||||
@@ -120,8 +121,9 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
VdeArrayDataPacket::fromUint32Arr( arrayIdsThisMesh.connArrId, uintArr, arrElementCount );
|
||||
|
||||
// Debug testing of decoding
|
||||
// debugComparePackets(*dataPacket, VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(),
|
||||
// dataPacket->fullPacketSize(), nullptr));
|
||||
// debugComparePackets(*dataPacket,
|
||||
// VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(), dataPacket->fullPacketSize(),
|
||||
// nullptr));
|
||||
|
||||
packetDirectory->addPacket( std::move( dataPacket ) );
|
||||
}
|
||||
@@ -144,7 +146,8 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
VdeArrayDataPacket::fromFloat32Arr( arrayIdsThisMesh.texCoordsArrId, floatArr, arrElementCount );
|
||||
|
||||
// Debug testing of decoding
|
||||
// debugComparePackets(*dataPacket, VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(),
|
||||
// debugComparePackets(*dataPacket,
|
||||
// VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(),
|
||||
// dataPacket->fullPacketSize(), nullptr));
|
||||
|
||||
packetDirectory->addPacket( std::move( dataPacket ) );
|
||||
@@ -168,7 +171,8 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
byteArr->size() );
|
||||
|
||||
// Debug testing of decoding
|
||||
// debugComparePackets(*dataPacket, VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(),
|
||||
// debugComparePackets(*dataPacket,
|
||||
// VdeArrayDataPacket::fromRawPacketBuffer(dataPacket->fullPacketRawPtr(),
|
||||
// dataPacket->fullPacketSize(), nullptr));
|
||||
|
||||
packetDirectory->addPacket( std::move( dataPacket ) );
|
||||
@@ -182,8 +186,8 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
const int fillPacketDir_ms = static_cast<int>( tim.lapTime() * 1000 );
|
||||
|
||||
// Extract any exportable labels present in the view
|
||||
const std::vector<std::pair<cvf::Vec3f, cvf::String>> labelAndPositionsArr = RicHoloLensExportImpl::labelsForExport(
|
||||
m_view );
|
||||
const std::vector<std::pair<cvf::Vec3f, cvf::String>> labelAndPositionsArr =
|
||||
RicHoloLensExportImpl::labelsForExport( m_view );
|
||||
|
||||
// Actually create the JSON containing model meta data
|
||||
*modelMetaJsonStr = createModelMetaJsonString( meshArr, allMeshesArrayIdsArr, labelAndPositionsArr );
|
||||
@@ -200,16 +204,16 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
|
||||
allReferencedArrayIds->assign( referencedIdsSet.begin(), referencedIdsSet.end() );
|
||||
|
||||
RiaLogging::debug(
|
||||
QString(
|
||||
"HoloLens: Extracted %1 meshes (total of %2 primitives) in %3ms (buildMeshes=%4ms, fillPacketDir=%5ms)" )
|
||||
.arg( meshCount )
|
||||
.arg( totNumPrimitives )
|
||||
.arg( static_cast<int>( tim.time() * 1000 ) )
|
||||
.arg( buildMeshes_ms )
|
||||
.arg( fillPacketDir_ms ) );
|
||||
RiaLogging::debug( QString( "HoloLens: Extracted %1 meshes (total of %2 primitives) in %3ms (buildMeshes=%4ms, "
|
||||
"fillPacketDir=%5ms)" )
|
||||
.arg( meshCount )
|
||||
.arg( totNumPrimitives )
|
||||
.arg( static_cast<int>( tim.time() * 1000 ) )
|
||||
.arg( buildMeshes_ms )
|
||||
.arg( fillPacketDir_ms ) );
|
||||
|
||||
// cvf::Trace::show("Total number of primitives extracted: %d in %dms", totNumPrimitives, static_cast<int>(tim.time()*1000));
|
||||
// cvf::Trace::show("Total number of primitives extracted: %d in %dms", totNumPrimitives,
|
||||
// static_cast<int>(tim.time()*1000));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -262,8 +266,7 @@ std::unique_ptr<VdeMesh> VdeVizDataExtractor::createMeshFromExportPart( const Vd
|
||||
if ( primType != cvf::PT_TRIANGLES && primType != cvf::PT_LINES )
|
||||
{
|
||||
RiaLogging::debug(
|
||||
QString( "Currently only triangle and line primitive sets are supported (saw primitive type: %1)" )
|
||||
.arg( primType ) );
|
||||
QString( "Currently only triangle and line primitive sets are supported (saw primitive type: %1)" ).arg( primType ) );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -346,7 +349,8 @@ std::unique_ptr<VdeMesh> VdeVizDataExtractor::createMeshFromExportPart( const Vd
|
||||
mesh->cullFaceModeStr = "none";
|
||||
}
|
||||
|
||||
// cvf::Trace::show("createMeshFromExportPart(): numFaces=%d, time=%dms", faceCount, static_cast<int>(tim.time()*1000));
|
||||
// cvf::Trace::show("createMeshFromExportPart(): numFaces=%d, time=%dms", faceCount,
|
||||
// static_cast<int>(tim.time()*1000));
|
||||
|
||||
return mesh;
|
||||
}
|
||||
@@ -354,10 +358,9 @@ std::unique_ptr<VdeMesh> VdeVizDataExtractor::createMeshFromExportPart( const Vd
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString VdeVizDataExtractor::createModelMetaJsonString(
|
||||
const std::vector<std::unique_ptr<VdeMesh>>& meshArr,
|
||||
const std::vector<VdeMeshArrayIds>& meshContentIdsArr,
|
||||
const std::vector<std::pair<cvf::Vec3f, cvf::String>>& labelAndPositionsArr )
|
||||
QString VdeVizDataExtractor::createModelMetaJsonString( const std::vector<std::unique_ptr<VdeMesh>>& meshArr,
|
||||
const std::vector<VdeMeshArrayIds>& meshContentIdsArr,
|
||||
const std::vector<std::pair<cvf::Vec3f, cvf::String>>& labelAndPositionsArr )
|
||||
{
|
||||
QVariantList jsonMeshMetaList;
|
||||
for ( size_t i = 0; i < meshArr.size(); i++ )
|
||||
|
||||
@@ -136,8 +136,8 @@ bool RicBoxManipulatorEventHandler::eventFilter( QObject* obj, QEvent* inputEven
|
||||
{
|
||||
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( inputEvent );
|
||||
|
||||
cvf::ref<cvf::RayIntersectSpec> rayIS = viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->pos().x(),
|
||||
mouseEvent->pos().y() );
|
||||
cvf::ref<cvf::RayIntersectSpec> rayIS =
|
||||
viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->pos().x(), mouseEvent->pos().y() );
|
||||
|
||||
if ( rayIS.notNull() )
|
||||
{
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicIntersectionFeatureImpl::createIntersectionBoxSlize( const QString& name,
|
||||
RimBoxIntersection::SinglePlaneState plane )
|
||||
void RicIntersectionFeatureImpl::createIntersectionBoxSlize( const QString& name, RimBoxIntersection::SinglePlaneState plane )
|
||||
{
|
||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
||||
RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||
|
||||
@@ -64,11 +64,10 @@ void RicNewIntersectionViewFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
if ( intersection->direction() != RimExtrudedCurveIntersection::CS_VERTICAL )
|
||||
{
|
||||
QString text =
|
||||
QString(
|
||||
"The intersection view only supports vertical intersections.\n"
|
||||
"The intersection '%1' is not vertical but a converted version will be shown in the view ." )
|
||||
.arg( intersection->name() );
|
||||
QString text = QString( "The intersection view only supports vertical intersections.\n"
|
||||
"The intersection '%1' is not vertical but a converted version will be shown "
|
||||
"in the view ." )
|
||||
.arg( intersection->name() );
|
||||
|
||||
QMessageBox::warning( Riu3DMainWindowTools::mainWindowWidget(), "New Intersection View", text );
|
||||
}
|
||||
@@ -111,8 +110,8 @@ std::set<RimExtrudedCurveIntersection*> RicNewIntersectionViewFeature::selectedI
|
||||
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
|
||||
if ( generalSelectionItem )
|
||||
{
|
||||
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>(
|
||||
generalSelectionItem->m_object );
|
||||
RimExtrudedCurveIntersection* intersection =
|
||||
dynamic_cast<RimExtrudedCurveIntersection*>( generalSelectionItem->m_object );
|
||||
if ( intersection )
|
||||
{
|
||||
objects.insert( intersection );
|
||||
|
||||
@@ -49,8 +49,8 @@ bool RicAddScriptPathFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicAddScriptPathFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
QString selectedFolder = QFileDialog::getExistingDirectory( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Select script folder" );
|
||||
QString selectedFolder =
|
||||
QFileDialog::getExistingDirectory( Riu3DMainWindowTools::mainWindowWidget(), "Select script folder" );
|
||||
if ( !selectedFolder.isEmpty() )
|
||||
{
|
||||
QString filePathString = RiaApplication::instance()->preferences()->scriptDirectories();
|
||||
|
||||
@@ -60,8 +60,8 @@ bool RicPasteEclipseCasesFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup( destinationObject );
|
||||
if ( gridCaseGroup ) return true;
|
||||
@@ -74,8 +74,8 @@ bool RicPasteEclipseCasesFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteEclipseCasesFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup( destinationObject );
|
||||
if ( !gridCaseGroup ) return;
|
||||
|
||||
@@ -54,8 +54,8 @@ bool RicPasteEclipseViewsFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup( destinationObject );
|
||||
if ( gridCaseGroup ) return false;
|
||||
@@ -71,8 +71,8 @@ bool RicPasteEclipseViewsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteEclipseViewsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimEclipseCase* eclipseCase = RicPasteFeatureImpl::findEclipseCase( destinationObject );
|
||||
assert( eclipseCase );
|
||||
|
||||
@@ -66,8 +66,7 @@ void RicPasteFeatureImpl::referencesFromClipboard( std::vector<QString>& referen
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
if ( !clipboard ) return;
|
||||
|
||||
const MimeDataWithReferences* mimeDataReferences = dynamic_cast<const MimeDataWithReferences*>(
|
||||
clipboard->mimeData() );
|
||||
const MimeDataWithReferences* mimeDataReferences = dynamic_cast<const MimeDataWithReferences*>( clipboard->mimeData() );
|
||||
if ( !mimeDataReferences ) return;
|
||||
|
||||
referenceList = mimeDataReferences->references();
|
||||
|
||||
@@ -51,8 +51,8 @@ bool RicPasteGeoMechViewsFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimGeoMechCase* geoMechCase = RicPasteFeatureImpl::findGeoMechCase( destinationObject );
|
||||
if ( geoMechCase ) return true;
|
||||
@@ -65,8 +65,8 @@ bool RicPasteGeoMechViewsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteGeoMechViewsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimGeoMechCase* geomCase = RicPasteFeatureImpl::findGeoMechCase( destinationObject );
|
||||
assert( geomCase );
|
||||
|
||||
@@ -52,8 +52,8 @@ bool RicPasteIntersectionsFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
if ( findIntersectionCollection( destinationObject ) )
|
||||
{
|
||||
@@ -68,11 +68,11 @@ bool RicPasteIntersectionsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteIntersectionsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
caf::PdmObjectHandle* destinationObject =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimIntersectionCollection* intersectionCollection = RicPasteIntersectionsFeature::findIntersectionCollection(
|
||||
destinationObject );
|
||||
RimIntersectionCollection* intersectionCollection =
|
||||
RicPasteIntersectionsFeature::findIntersectionCollection( destinationObject );
|
||||
|
||||
CAF_ASSERT( intersectionCollection );
|
||||
|
||||
@@ -108,8 +108,7 @@ void RicPasteIntersectionsFeature::onActionTriggered( bool isChecked )
|
||||
for ( size_t i = 0; i < intersectionBoxObjects.size(); i++ )
|
||||
{
|
||||
RimBoxIntersection* intersectionBox = dynamic_cast<RimBoxIntersection*>(
|
||||
intersectionBoxObjects[i]->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() ) );
|
||||
intersectionBoxObjects[i]->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
QString nameOfCopy = QString( "Copy of " ) + intersectionBox->name();
|
||||
intersectionBox->setName( nameOfCopy );
|
||||
|
||||
@@ -115,9 +115,8 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
|
||||
const QString placeholderString = RicSummaryPlotTemplateTools::placeholderTextForSummaryCase();
|
||||
|
||||
auto referenceString = fieldHandle->xmlCapability()->referenceString();
|
||||
int indexValue = RicSummaryPlotTemplateTools::findValueForKeyword( placeholderString,
|
||||
referenceString,
|
||||
&conversionOk );
|
||||
int indexValue =
|
||||
RicSummaryPlotTemplateTools::findValueForKeyword( placeholderString, referenceString, &conversionOk );
|
||||
|
||||
maximumIndexValue = std::max( maximumIndexValue, indexValue );
|
||||
|
||||
@@ -131,8 +130,8 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
|
||||
{
|
||||
auto allAddresses = summaryCaseY->summaryReader()->allResultAddresses();
|
||||
|
||||
auto candidate = RicSummaryPlotTemplateTools::firstAddressByQuantity( currentAddressY,
|
||||
allAddresses );
|
||||
auto candidate =
|
||||
RicSummaryPlotTemplateTools::firstAddressByQuantity( currentAddressY, allAddresses );
|
||||
if ( candidate.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
{
|
||||
curve->setSummaryAddressY( candidate );
|
||||
@@ -152,8 +151,8 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
|
||||
|
||||
for ( size_t i = maximumIndexValue; i < selectedSummaryCases.size(); i++ )
|
||||
{
|
||||
auto newCurve = dynamic_cast<RimSummaryCurve*>(
|
||||
lastSummaryCurve->xmlCapability()->copyByXmlSerialization(
|
||||
auto newCurve =
|
||||
dynamic_cast<RimSummaryCurve*>( lastSummaryCurve->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
auto summaryCaseY = selectedSummaryCases[i];
|
||||
@@ -182,9 +181,8 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
|
||||
const QString placeholderString = RicSummaryPlotTemplateTools::placeholderTextForSummaryGroup();
|
||||
|
||||
auto referenceString = fieldHandle->xmlCapability()->referenceString();
|
||||
int indexValue = RicSummaryPlotTemplateTools::findValueForKeyword( placeholderString,
|
||||
referenceString,
|
||||
&conversionOk );
|
||||
int indexValue =
|
||||
RicSummaryPlotTemplateTools::findValueForKeyword( placeholderString, referenceString, &conversionOk );
|
||||
|
||||
maximumIndexValue = std::max( maximumIndexValue, indexValue );
|
||||
|
||||
@@ -206,8 +204,8 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
|
||||
|
||||
for ( size_t i = maximumIndexValue; i < selectedEnsembles.size(); i++ )
|
||||
{
|
||||
auto newCurveSet = dynamic_cast<RimEnsembleCurveSet*>(
|
||||
lastSummaryCurveSet->xmlCapability()->copyByXmlSerialization(
|
||||
auto newCurveSet =
|
||||
dynamic_cast<RimEnsembleCurveSet*>( lastSummaryCurveSet->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
auto ensembleDataSource = selectedEnsembles[i];
|
||||
@@ -227,10 +225,9 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicSummaryPlotTemplateTools::htmlTextFromPlotAndSelection(
|
||||
const RimSummaryPlot* templatePlot,
|
||||
const std::set<RifEclipseSummaryAddress>& selectedSummaryAddresses,
|
||||
const std::vector<caf::PdmObject*>& selectedSources )
|
||||
QString RicSummaryPlotTemplateTools::htmlTextFromPlotAndSelection( const RimSummaryPlot* templatePlot,
|
||||
const std::set<RifEclipseSummaryAddress>& selectedSummaryAddresses,
|
||||
const std::vector<caf::PdmObject*>& selectedSources )
|
||||
{
|
||||
QString text;
|
||||
|
||||
@@ -303,9 +300,7 @@ QString RicSummaryPlotTemplateTools::htmlTextFromPlotAndSelection(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicSummaryPlotTemplateTools::htmlTextFromCount( const QString& itemText,
|
||||
size_t requiredItemCount,
|
||||
size_t selectionCount )
|
||||
QString RicSummaryPlotTemplateTools::htmlTextFromCount( const QString& itemText, size_t requiredItemCount, size_t selectionCount )
|
||||
{
|
||||
QString text;
|
||||
|
||||
|
||||
@@ -190,10 +190,9 @@ void RicCloseCaseFeature::deleteEclipseCase( RimEclipseCase* eclipseCase )
|
||||
RimEclipseResultCase* resultCase = dynamic_cast<RimEclipseResultCase*>( eclipseCase );
|
||||
if ( resultCase )
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField()
|
||||
? project->activeOilField()->summaryCaseMainCollection()
|
||||
: nullptr;
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RimSummaryCaseMainCollection* sumCaseColl =
|
||||
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
if ( sumCaseColl )
|
||||
{
|
||||
RimSummaryCase* summaryCase = sumCaseColl->findSummaryCaseFromEclipseResultCase( resultCase );
|
||||
@@ -255,8 +254,8 @@ bool RicCloseCaseFeature::hasAnyStatisticsResults( RimIdenticalGridCaseGroup* gr
|
||||
|
||||
for ( size_t i = 0; i < gridCaseGroup->statisticsCaseCollection()->reservoirs().size(); i++ )
|
||||
{
|
||||
RimEclipseStatisticsCase* rimStaticsCase = dynamic_cast<RimEclipseStatisticsCase*>(
|
||||
gridCaseGroup->statisticsCaseCollection()->reservoirs[i] );
|
||||
RimEclipseStatisticsCase* rimStaticsCase =
|
||||
dynamic_cast<RimEclipseStatisticsCase*>( gridCaseGroup->statisticsCaseCollection()->reservoirs[i] );
|
||||
if ( rimStaticsCase )
|
||||
{
|
||||
if ( rimStaticsCase->hasComputedStatistics() )
|
||||
|
||||
@@ -67,9 +67,8 @@ bool RicContourMapPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eve
|
||||
{
|
||||
QString curveText;
|
||||
curveText += QString( "%1\n" ).arg( view->createAutoName() );
|
||||
curveText += QString( "Picked Point X, Y: %1, %2\n" )
|
||||
.arg( pickedPoint.x(), 5, 'f', 0 )
|
||||
.arg( pickedPoint.y(), 5, 'f', 0 );
|
||||
curveText +=
|
||||
QString( "Picked Point X, Y: %1, %2\n" ).arg( pickedPoint.x(), 5, 'f', 0 ).arg( pickedPoint.y(), 5, 'f', 0 );
|
||||
curveText += QString( "Result Type: %1\n" ).arg( contourMap->resultDescriptionText() );
|
||||
curveText += QString( "Aggregated Value: %1\n" ).arg( valueAtPoint );
|
||||
|
||||
|
||||
@@ -191,10 +191,10 @@ void RicCreateTemporaryLgrFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
if ( !wellsIntersectingOtherLgrs.empty() )
|
||||
{
|
||||
QMessageBox::
|
||||
warning( nullptr,
|
||||
"LGR cells intersected",
|
||||
"At least one completion intersects with an LGR. No LGR(s) for those cells are produced" );
|
||||
QMessageBox::warning( nullptr,
|
||||
"LGR cells intersected",
|
||||
"At least one completion intersects with an LGR. No LGR(s) for those cells are "
|
||||
"produced" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,8 +224,7 @@ void RicCreateTemporaryLgrFeature::createLgr( const LgrInfo& lgrInfo, RigMainGri
|
||||
localGrid->setGridId( lgrId );
|
||||
localGrid->setIndexToStartOfCells( totalCellCount );
|
||||
localGrid->setGridName( lgrInfo.name.toStdString() );
|
||||
localGrid->setGridPointDimensions(
|
||||
cvf::Vec3st( lgrInfo.sizes.i() + 1, lgrInfo.sizes.j() + 1, lgrInfo.sizes.k() + 1 ) );
|
||||
localGrid->setGridPointDimensions( cvf::Vec3st( lgrInfo.sizes.i() + 1, lgrInfo.sizes.j() + 1, lgrInfo.sizes.k() + 1 ) );
|
||||
mainGrid->addLocalGrid( localGrid );
|
||||
|
||||
size_t cellStartIndex = mainGrid->globalCellArray().size();
|
||||
|
||||
@@ -73,8 +73,8 @@ QString RicDeleteItemExec::name()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicDeleteItemExec::redo()
|
||||
{
|
||||
caf::PdmFieldHandle* field = caf::PdmReferenceHelper::fieldFromReference( m_commandData->m_rootObject,
|
||||
m_commandData->m_pathToField );
|
||||
caf::PdmFieldHandle* field =
|
||||
caf::PdmReferenceHelper::fieldFromReference( m_commandData->m_rootObject, m_commandData->m_pathToField );
|
||||
|
||||
caf::PdmChildArrayFieldHandle* listField = dynamic_cast<caf::PdmChildArrayFieldHandle*>( field );
|
||||
if ( listField )
|
||||
@@ -346,8 +346,8 @@ void RicDeleteItemExec::redo()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicDeleteItemExec::undo()
|
||||
{
|
||||
caf::PdmFieldHandle* field = caf::PdmReferenceHelper::fieldFromReference( m_commandData->m_rootObject,
|
||||
m_commandData->m_pathToField );
|
||||
caf::PdmFieldHandle* field =
|
||||
caf::PdmReferenceHelper::fieldFromReference( m_commandData->m_rootObject, m_commandData->m_pathToField );
|
||||
|
||||
caf::PdmChildArrayFieldHandle* listField = dynamic_cast<caf::PdmChildArrayFieldHandle*>( field );
|
||||
if ( listField )
|
||||
|
||||
@@ -37,13 +37,7 @@ public:
|
||||
"CmdDeleteItemExecData tooltip",
|
||||
"CmdDeleteItemExecData whatsthis" );
|
||||
|
||||
CAF_PDM_InitField( &m_pathToField,
|
||||
"PathToField",
|
||||
QString(),
|
||||
"PathToField",
|
||||
"",
|
||||
"PathToField tooltip",
|
||||
"PathToField whatsthis" );
|
||||
CAF_PDM_InitField( &m_pathToField, "PathToField", QString(), "PathToField", "", "PathToField tooltip", "PathToField whatsthis" );
|
||||
CAF_PDM_InitField( &m_indexToObject,
|
||||
"indexToObject",
|
||||
-1,
|
||||
|
||||
@@ -175,8 +175,8 @@ bool RicDeleteItemFeature::isCommandEnabled()
|
||||
caf::PdmObject* currentPdmObject = dynamic_cast<caf::PdmObject*>( item );
|
||||
if ( !currentPdmObject ) return false;
|
||||
|
||||
caf::PdmChildArrayFieldHandle* childArrayFieldHandle = dynamic_cast<caf::PdmChildArrayFieldHandle*>(
|
||||
currentPdmObject->parentField() );
|
||||
caf::PdmChildArrayFieldHandle* childArrayFieldHandle =
|
||||
dynamic_cast<caf::PdmChildArrayFieldHandle*>( currentPdmObject->parentField() );
|
||||
if ( !childArrayFieldHandle ) return false;
|
||||
}
|
||||
|
||||
@@ -199,8 +199,8 @@ void RicDeleteItemFeature::onActionTriggered( bool isChecked )
|
||||
caf::PdmObject* currentPdmObject = dynamic_cast<caf::PdmObject*>( item );
|
||||
if ( !currentPdmObject ) continue;
|
||||
|
||||
caf::PdmChildArrayFieldHandle* childArrayFieldHandle = dynamic_cast<caf::PdmChildArrayFieldHandle*>(
|
||||
currentPdmObject->parentField() );
|
||||
caf::PdmChildArrayFieldHandle* childArrayFieldHandle =
|
||||
dynamic_cast<caf::PdmChildArrayFieldHandle*>( currentPdmObject->parentField() );
|
||||
if ( !childArrayFieldHandle ) continue;
|
||||
|
||||
int indexAfter = -1;
|
||||
@@ -223,9 +223,9 @@ void RicDeleteItemFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
RicDeleteItemExecData* data = executeCmd->commandData();
|
||||
data->m_rootObject = caf::PdmReferenceHelper::findRoot( childArrayFieldHandle );
|
||||
data->m_pathToField = caf::PdmReferenceHelper::referenceFromRootToField( data->m_rootObject,
|
||||
childArrayFieldHandle );
|
||||
data->m_indexToObject = indexAfter;
|
||||
data->m_pathToField =
|
||||
caf::PdmReferenceHelper::referenceFromRootToField( data->m_rootObject, childArrayFieldHandle );
|
||||
data->m_indexToObject = indexAfter;
|
||||
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( executeCmd );
|
||||
}
|
||||
|
||||
@@ -141,8 +141,7 @@ void RicDeleteSummaryCaseCollectionFeature::setupActionLook( QAction* actionToSe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicDeleteSummaryCaseCollectionFeature::moveAllCasesToMainSummaryCollection(
|
||||
RimSummaryCaseCollection* summaryCaseCollection )
|
||||
void RicDeleteSummaryCaseCollectionFeature::moveAllCasesToMainSummaryCollection( RimSummaryCaseCollection* summaryCaseCollection )
|
||||
{
|
||||
std::vector<RimSummaryCase*> summaryCases = summaryCaseCollection->allSummaryCases();
|
||||
if ( summaryCases.size() == 0 ) return;
|
||||
|
||||
@@ -230,8 +230,8 @@ std::pair<RimEclipseContourMapView*, RimGeoMechContourMapView*> RicExportContour
|
||||
RimEclipseContourMapView* existingEclipseContourMap = nullptr;
|
||||
RimGeoMechContourMapView* existingGeoMechContourMap = nullptr;
|
||||
|
||||
auto contextMenuWidget = dynamic_cast<RiuViewer*>(
|
||||
caf::CmdFeatureManager::instance()->currentContextMenuTargetWidget() );
|
||||
auto contextMenuWidget =
|
||||
dynamic_cast<RiuViewer*>( caf::CmdFeatureManager::instance()->currentContextMenuTargetWidget() );
|
||||
|
||||
if ( contextMenuWidget )
|
||||
{
|
||||
|
||||
@@ -100,8 +100,8 @@ bool RicGeoMechPropertyFilterFeatureImpl::isPropertyFilterCommandAvailable( caf:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechPropertyFilter* RicGeoMechPropertyFilterFeatureImpl::createPropertyFilter(
|
||||
RimGeoMechPropertyFilterCollection* propertyFilterCollection )
|
||||
RimGeoMechPropertyFilter*
|
||||
RicGeoMechPropertyFilterFeatureImpl::createPropertyFilter( RimGeoMechPropertyFilterCollection* propertyFilterCollection )
|
||||
{
|
||||
CVF_ASSERT( propertyFilterCollection );
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ CAF_CMD_SOURCE_INIT( RicGeoMechPropertyFilterInsertFeature, "RicGeoMechPropertyF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicGeoMechPropertyFilterInsertFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimGeoMechPropertyFilter*> propertyFilters = RicGeoMechPropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
std::vector<RimGeoMechPropertyFilter*> propertyFilters =
|
||||
RicGeoMechPropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
if ( propertyFilters.size() == 1 )
|
||||
{
|
||||
return RicGeoMechPropertyFilterFeatureImpl::isPropertyFilterCommandAvailable( propertyFilters[0] );
|
||||
@@ -51,7 +52,8 @@ bool RicGeoMechPropertyFilterInsertFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicGeoMechPropertyFilterInsertFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
std::vector<RimGeoMechPropertyFilter*> propertyFilters = RicGeoMechPropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
std::vector<RimGeoMechPropertyFilter*> propertyFilters =
|
||||
RicGeoMechPropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
if ( propertyFilters.size() == 1 )
|
||||
{
|
||||
RicGeoMechPropertyFilterInsertExec* filterExec = new RicGeoMechPropertyFilterInsertExec( propertyFilters[0] );
|
||||
|
||||
@@ -67,8 +67,8 @@ void RicGeoMechPropertyFilterNewInViewFeature::onActionTriggered( bool isChecked
|
||||
RimGeoMechView* eclView = dynamic_cast<RimGeoMechView*>( view );
|
||||
if ( !eclView ) return;
|
||||
|
||||
RicGeoMechPropertyFilterNewExec* filterExec = new RicGeoMechPropertyFilterNewExec(
|
||||
eclView->geoMechPropertyFilterCollection() );
|
||||
RicGeoMechPropertyFilterNewExec* filterExec =
|
||||
new RicGeoMechPropertyFilterNewExec( eclView->geoMechPropertyFilterCollection() );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( filterExec );
|
||||
}
|
||||
|
||||
|
||||
@@ -227,12 +227,12 @@ void RicGridStatisticsDialog::setHistogramData( RimGridView* view )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicGridStatisticsDialog::createAndConnectToolbarActions()
|
||||
{
|
||||
QAction* scrShotToClipboardAction = m_toolBar->addAction( RicSnapshotViewToClipboardFeature::icon(),
|
||||
RicSnapshotViewToClipboardFeature::text() );
|
||||
QAction* scrShotToClipboardAction =
|
||||
m_toolBar->addAction( RicSnapshotViewToClipboardFeature::icon(), RicSnapshotViewToClipboardFeature::text() );
|
||||
connect( scrShotToClipboardAction, SIGNAL( triggered() ), this, SLOT( slotScreenShotToClipboard() ) );
|
||||
|
||||
QAction* scrShotToFileAction = m_toolBar->addAction( RicSnapshotViewToFileFeature::icon(),
|
||||
RicSnapshotViewToFileFeature::text() );
|
||||
QAction* scrShotToFileAction =
|
||||
m_toolBar->addAction( RicSnapshotViewToFileFeature::icon(), RicSnapshotViewToFileFeature::text() );
|
||||
connect( scrShotToFileAction, SIGNAL( triggered() ), this, SLOT( slotScreenShotToFile() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ bool RicHideIntersectionFeature::isCommandEnabled()
|
||||
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
|
||||
if ( !generalSelectionItem ) return false;
|
||||
|
||||
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>(
|
||||
generalSelectionItem->m_object );
|
||||
RimExtrudedCurveIntersection* intersection =
|
||||
dynamic_cast<RimExtrudedCurveIntersection*>( generalSelectionItem->m_object );
|
||||
if ( intersection )
|
||||
{
|
||||
return true;
|
||||
@@ -66,8 +66,8 @@ void RicHideIntersectionFeature::onActionTriggered( bool isChecked )
|
||||
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
|
||||
if ( !generalSelectionItem ) return;
|
||||
|
||||
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>(
|
||||
generalSelectionItem->m_object );
|
||||
RimExtrudedCurveIntersection* intersection =
|
||||
dynamic_cast<RimExtrudedCurveIntersection*>( generalSelectionItem->m_object );
|
||||
if ( intersection )
|
||||
{
|
||||
intersection->setActive( false );
|
||||
|
||||
@@ -47,10 +47,8 @@ void RicImportElementPropertyFeature::onActionTriggered( bool isChecked )
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "ELM_PROPS" );
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames( nullptr,
|
||||
"Import Element Property Table",
|
||||
defaultDir,
|
||||
"Property Table (*.inp)" );
|
||||
QStringList fileNames =
|
||||
QFileDialog::getOpenFileNames( nullptr, "Import Element Property Table", defaultDir, "Property Table (*.inp)" );
|
||||
|
||||
if ( !fileNames.empty() )
|
||||
{
|
||||
|
||||
@@ -65,8 +65,8 @@ void RicImportEnsembleFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString pathCacheName = "ENSEMBLE_FILES";
|
||||
QStringList fileNames = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog( "Import Ensemble",
|
||||
pathCacheName );
|
||||
QStringList fileNames =
|
||||
RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog( "Import Ensemble", pathCacheName );
|
||||
|
||||
if ( fileNames.isEmpty() ) return;
|
||||
|
||||
@@ -77,9 +77,8 @@ void RicImportEnsembleFeature::onActionTriggered( bool isChecked )
|
||||
RicImportSummaryCasesFeature::createSummaryCasesFromFiles( fileNames, &cases, true );
|
||||
|
||||
RicImportSummaryCasesFeature::addSummaryCases( cases );
|
||||
RimSummaryCaseCollection* ensemble = RicCreateSummaryCaseCollectionFeature::groupSummaryCases( cases,
|
||||
ensembleName,
|
||||
true );
|
||||
RimSummaryCaseCollection* ensemble =
|
||||
RicCreateSummaryCaseCollectionFeature::groupSummaryCases( cases, ensembleName, true );
|
||||
|
||||
if ( ensemble )
|
||||
{
|
||||
|
||||
@@ -76,9 +76,9 @@ void RicImportFormationNamesFeature::onActionTriggered( bool isChecked )
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "BINARY_GRID" );
|
||||
|
||||
QString filterText = QString(
|
||||
"Formation Names description File (*.lyr);;FMU Layer Zone Table(%1);;All Files (*.*)" )
|
||||
.arg( RimFormationNames::layerZoneTableFileName() );
|
||||
QString filterText =
|
||||
QString( "Formation Names description File (*.lyr);;FMU Layer Zone Table(%1);;All Files (*.*)" )
|
||||
.arg( RimFormationNames::layerZoneTableFileName() );
|
||||
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Formation Names",
|
||||
|
||||
@@ -94,8 +94,7 @@ RicImportGeneralDataFeature::OpenCaseResults
|
||||
return OpenCaseResults();
|
||||
}
|
||||
results.eclipseSummaryFiles = eclipseSummaryFiles;
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory( defaultDirectoryLabel( ECLIPSE_SUMMARY_FILE ),
|
||||
defaultDir );
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory( defaultDirectoryLabel( ECLIPSE_SUMMARY_FILE ), defaultDir );
|
||||
}
|
||||
return results;
|
||||
}
|
||||
@@ -191,10 +190,8 @@ QStringList RicImportGeneralDataFeature::getEclipseFileNamesWithDialog( RiaDefin
|
||||
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectory( defaultDirectoryLabel( fileTypes ) );
|
||||
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Data File",
|
||||
defaultDir,
|
||||
fullPattern );
|
||||
QStringList fileNames =
|
||||
QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(), "Import Data File", defaultDir, fullPattern );
|
||||
return fileNames;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,10 +41,8 @@ void RicImportGeoMechCaseFeature::onActionTriggered( bool isChecked )
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "GEOMECH_MODEL" );
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames( nullptr,
|
||||
"Import Geo-Mechanical Model",
|
||||
defaultDir,
|
||||
"Abaqus results (*.odb)" );
|
||||
QStringList fileNames =
|
||||
QFileDialog::getOpenFileNames( nullptr, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)" );
|
||||
if ( fileNames.size() ) defaultDir = QFileInfo( fileNames.last() ).absolutePath();
|
||||
app->setLastUsedDialogDirectory( "GEOMECH_MODEL", defaultDir );
|
||||
|
||||
|
||||
@@ -37,10 +37,8 @@ void RicImportGeoMechCaseTimeStepFilterFeature::onActionTriggered( bool isChecke
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "GEOMECH_MODEL" );
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames( nullptr,
|
||||
"Import Geo-Mechanical Model",
|
||||
defaultDir,
|
||||
"Abaqus results (*.odb)" );
|
||||
QStringList fileNames =
|
||||
QFileDialog::getOpenFileNames( nullptr, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)" );
|
||||
if ( fileNames.size() ) defaultDir = QFileInfo( fileNames.last() ).absolutePath();
|
||||
for ( QString fileName : fileNames )
|
||||
{
|
||||
|
||||
@@ -53,10 +53,9 @@ void RicImportObservedDataFeature::selectObservedDataFileInDialog()
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( "INPUT_FILES", QFileInfo( fileNames.last() ).absolutePath() );
|
||||
|
||||
RimProject* proj = app->project();
|
||||
RimObservedDataCollection* observedDataCollection = proj->activeOilField()
|
||||
? proj->activeOilField()->observedDataCollection()
|
||||
: nullptr;
|
||||
RimProject* proj = app->project();
|
||||
RimObservedDataCollection* observedDataCollection =
|
||||
proj->activeOilField() ? proj->activeOilField()->observedDataCollection() : nullptr;
|
||||
if ( !observedDataCollection ) return;
|
||||
|
||||
RimObservedSummaryData* observedData = nullptr;
|
||||
@@ -74,14 +73,14 @@ void RicImportObservedDataFeature::selectObservedDataFileInDialog()
|
||||
observedData = observedDataCollection->createAndAddRsmObservedSummaryDataFromFile( fileName, &errorText );
|
||||
retryImport = false;
|
||||
}
|
||||
else if ( fileName.endsWith( ".txt", Qt::CaseInsensitive ) ||
|
||||
fileName.endsWith( ".csv", Qt::CaseInsensitive ) )
|
||||
else if ( fileName.endsWith( ".txt", Qt::CaseInsensitive ) || fileName.endsWith( ".csv", Qt::CaseInsensitive ) )
|
||||
{
|
||||
bool useSavedFieldValuesInDialog = retryImport;
|
||||
observedData = observedDataCollection->createAndAddCvsObservedSummaryDataFromFile( fileName,
|
||||
useSavedFieldValuesInDialog,
|
||||
&errorText );
|
||||
retryImport = !errorText.isEmpty();
|
||||
observedData =
|
||||
observedDataCollection->createAndAddCvsObservedSummaryDataFromFile( fileName,
|
||||
useSavedFieldValuesInDialog,
|
||||
&errorText );
|
||||
retryImport = !errorText.isEmpty();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -61,11 +61,10 @@ void RicImportObservedFmuDataFeature::selectObservedDataPathInDialog()
|
||||
QStringList subDirsWithFmuData = RifReaderFmuRft::findSubDirectoriesWithFmuRftData( directory );
|
||||
if ( subDirsWithFmuData.empty() )
|
||||
{
|
||||
QString message =
|
||||
QString(
|
||||
"Could not find the file %1 in any sub-folder of %2.\nThis file is required for import of FMU data." )
|
||||
.arg( RifReaderFmuRft::wellPathFileName() )
|
||||
.arg( directory );
|
||||
QString message = QString( "Could not find the file %1 in any sub-folder of %2.\nThis file is required for "
|
||||
"import of FMU data." )
|
||||
.arg( RifReaderFmuRft::wellPathFileName() )
|
||||
.arg( directory );
|
||||
|
||||
RiaGuiApplication* guiApp = RiaGuiApplication::instance();
|
||||
if ( guiApp )
|
||||
@@ -78,10 +77,9 @@ void RicImportObservedFmuDataFeature::selectObservedDataPathInDialog()
|
||||
return;
|
||||
}
|
||||
|
||||
RimProject* proj = app->project();
|
||||
RimObservedDataCollection* observedDataCollection = proj->activeOilField()
|
||||
? proj->activeOilField()->observedDataCollection()
|
||||
: nullptr;
|
||||
RimProject* proj = app->project();
|
||||
RimObservedDataCollection* observedDataCollection =
|
||||
proj->activeOilField() ? proj->activeOilField()->observedDataCollection() : nullptr;
|
||||
if ( !observedDataCollection ) return;
|
||||
|
||||
const RimObservedFmuRftData* importedData = nullptr;
|
||||
|
||||
@@ -176,9 +176,8 @@ bool RicImportSummaryCasesFeature::createSummaryCasesFromFiles( const QStringLis
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* proj = app->project();
|
||||
|
||||
RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField()
|
||||
? proj->activeOilField()->summaryCaseMainCollection()
|
||||
: nullptr;
|
||||
RimSummaryCaseMainCollection* sumCaseColl =
|
||||
proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
|
||||
if ( newCases ) newCases->clear();
|
||||
if ( !sumCaseColl ) return false;
|
||||
@@ -210,11 +209,10 @@ bool RicImportSummaryCasesFeature::createSummaryCasesFromFiles( const QStringLis
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportSummaryCasesFeature::addSummaryCases( const std::vector<RimSummaryCase*>& cases )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* proj = app->project();
|
||||
RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField()
|
||||
? proj->activeOilField()->summaryCaseMainCollection()
|
||||
: nullptr;
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* proj = app->project();
|
||||
RimSummaryCaseMainCollection* sumCaseColl =
|
||||
proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
sumCaseColl->addCases( cases );
|
||||
|
||||
sumCaseColl->updateAllRequiredEditors();
|
||||
|
||||
@@ -62,8 +62,7 @@ void RicImportSummaryGroupFeature::onActionTriggered( bool isChecked )
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
QString pathCacheName = "INPUT_FILES";
|
||||
QStringList fileNames =
|
||||
RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog( "Import Summary Case Group",
|
||||
pathCacheName );
|
||||
RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog( "Import Summary Case Group", pathCacheName );
|
||||
|
||||
if ( fileNames.isEmpty() ) return;
|
||||
|
||||
|
||||
@@ -139,10 +139,9 @@ void RicNewContourMapViewFeature::onActionTriggered( bool isChecked )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewContourMapViewFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
bool contourMapSelected = caf::SelectionManager::instance()->selectedItemOfType<RimEclipseContourMapView>() !=
|
||||
nullptr ||
|
||||
caf::SelectionManager::instance()->selectedItemOfType<RimGeoMechContourMapView>() !=
|
||||
nullptr;
|
||||
bool contourMapSelected =
|
||||
caf::SelectionManager::instance()->selectedItemOfType<RimEclipseContourMapView>() != nullptr ||
|
||||
caf::SelectionManager::instance()->selectedItemOfType<RimGeoMechContourMapView>() != nullptr;
|
||||
|
||||
bool viewSelected = caf::SelectionManager::instance()->selectedItemOfType<RimEclipseView>() != nullptr ||
|
||||
caf::SelectionManager::instance()->selectedItemOfType<RimGeoMechView>() != nullptr;
|
||||
@@ -165,9 +164,9 @@ void RicNewContourMapViewFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMapFromExistingContourMap(
|
||||
RimEclipseCase* eclipseCase,
|
||||
RimEclipseContourMapView* existingContourMap )
|
||||
RimEclipseContourMapView*
|
||||
RicNewContourMapViewFeature::createEclipseContourMapFromExistingContourMap( RimEclipseCase* eclipseCase,
|
||||
RimEclipseContourMapView* existingContourMap )
|
||||
{
|
||||
RimEclipseContourMapView* contourMap = dynamic_cast<RimEclipseContourMapView*>(
|
||||
existingContourMap->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
@@ -260,9 +259,9 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMap(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechContourMapView* RicNewContourMapViewFeature::createGeoMechContourMapFromExistingContourMap(
|
||||
RimGeoMechCase* geoMechCase,
|
||||
RimGeoMechContourMapView* existingContourMap )
|
||||
RimGeoMechContourMapView*
|
||||
RicNewContourMapViewFeature::createGeoMechContourMapFromExistingContourMap( RimGeoMechCase* geoMechCase,
|
||||
RimGeoMechContourMapView* existingContourMap )
|
||||
{
|
||||
RimGeoMechContourMapView* contourMap = dynamic_cast<RimGeoMechContourMapView*>(
|
||||
existingContourMap->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
@@ -41,9 +41,7 @@ class Rim3dView;
|
||||
class Ric3dPickEvent : public caf::PickEvent
|
||||
{
|
||||
public:
|
||||
Ric3dPickEvent( const std::vector<RiuPickItemInfo>& pickItemInfos,
|
||||
Rim3dView* view,
|
||||
Qt::KeyboardModifiers keyboardModifiers )
|
||||
Ric3dPickEvent( const std::vector<RiuPickItemInfo>& pickItemInfos, Rim3dView* view, Qt::KeyboardModifiers keyboardModifiers )
|
||||
: m_pickItemInfos( pickItemInfos )
|
||||
, m_view( view )
|
||||
, m_keyboardModifiers( keyboardModifiers )
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user