mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Increase warning level
* Set warning level to /W3 for MSVC to catch more warnings * remove several excluded checks for clang * removed several unused variables * Hide warnings qwt * add missing parentheses in logical expressions * Remove double check on same logical expression
This commit is contained in:
@@ -124,6 +124,11 @@
|
|||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#endif // USE_UNIT_TESTS
|
#endif // USE_UNIT_TESTS
|
||||||
|
|
||||||
|
// Required to ignore warning of usused variable when defining caf::PdmMarkdownGenerator
|
||||||
|
#if defined( __clang__ )
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
RiaApplication* RiaApplication::s_riaApplication = nullptr;
|
RiaApplication* RiaApplication::s_riaApplication = nullptr;
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -539,7 +539,7 @@ std::set<QDateTime> RiaQDateTimeTools::createEvenlyDistributedDates( const std::
|
|||||||
qint64 timeDiff = std::abs( inputDates[j].toMSecsSinceEpoch() - targetTime );
|
qint64 timeDiff = std::abs( inputDates[j].toMSecsSinceEpoch() - targetTime );
|
||||||
if ( timeDiff < closestTimeDiff )
|
if ( timeDiff < closestTimeDiff )
|
||||||
{
|
{
|
||||||
closestIndex = j;
|
closestIndex = static_cast<int>( j );
|
||||||
closestTimeDiff = timeDiff;
|
closestTimeDiff = timeDiff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -278,8 +278,7 @@ bool RiaWellLogUnitTools<FloatType>::convertValues( const std::vector<FloatType>
|
|||||||
*valuesOut = convertBarToNormalizedByPP( tvdRKBs, valuesIn );
|
*valuesOut = convertBarToNormalizedByPP( tvdRKBs, valuesIn );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if ( ( stringsMatch( unitsIn, pascalUnitString() ) ||
|
else if ( stringsMatch( unitsIn, pascalUnitString() ) && stringsMatch( unitsOut, barUnitString() ) )
|
||||||
stringsMatch( unitsIn, pascalUnitString() ) && stringsMatch( unitsOut, barUnitString() ) ) )
|
|
||||||
{
|
{
|
||||||
*valuesOut = multiply( valuesIn, 1.0 / pascalPerBar() );
|
*valuesOut = multiply( valuesIn, 1.0 / pascalPerBar() );
|
||||||
return true;
|
return true;
|
||||||
|
@@ -340,8 +340,7 @@ endif()
|
|||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
target_compile_options(
|
target_compile_options(
|
||||||
ApplicationLibCode PRIVATE -Wall -Wno-unused-parameter -Wno-reorder
|
ApplicationLibCode PRIVATE -Wall -Wno-reorder -Wno-parentheses -Wno-switch
|
||||||
-Wno-parentheses -Wno-switch
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -350,22 +349,12 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|||||||
target_compile_options(
|
target_compile_options(
|
||||||
ApplicationLibCode
|
ApplicationLibCode
|
||||||
PRIVATE -Wall
|
PRIVATE -Wall
|
||||||
-Wno-unused-parameter
|
|
||||||
-Wno-reorder
|
-Wno-reorder
|
||||||
-Wno-parentheses
|
|
||||||
-Wno-switch
|
-Wno-switch
|
||||||
|
-Wno-undefined-var-template
|
||||||
-Wno-delete-abstract-non-virtual-dtor
|
-Wno-delete-abstract-non-virtual-dtor
|
||||||
-Wno-undefined-var-template
|
|
||||||
-Wno-invalid-source-encoding
|
|
||||||
-Wno-enum-compare
|
|
||||||
-Wno-call-to-pure-virtual-from-ctor-dtor
|
-Wno-call-to-pure-virtual-from-ctor-dtor
|
||||||
-Wno-unused-variable
|
|
||||||
-Wno-unused-private-field
|
|
||||||
-Wno-unused-lambda-capture
|
|
||||||
-Wno-delete-non-abstract-non-virtual-dtor
|
-Wno-delete-non-abstract-non-virtual-dtor
|
||||||
-Wno-braced-scalar-init
|
|
||||||
-Wno-tautological-constant-out-of-range-compare
|
|
||||||
-Wno-undefined-var-template
|
|
||||||
-Wno-ambiguous-reversed-operator
|
-Wno-ambiguous-reversed-operator
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@@ -388,7 +377,7 @@ if(MSVC)
|
|||||||
# set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W3 /wd4190
|
# set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W3 /wd4190
|
||||||
# /wd4100 /wd4127")
|
# /wd4100 /wd4127")
|
||||||
|
|
||||||
set(BUILD_FLAGS_FOR_MSVC "/wd4190 /wd4100 /wd4127 /wd4245 /wd4005 /wd4251")
|
set(BUILD_FLAGS_FOR_MSVC "/W3 /wd4190 /wd4100 /wd4127")
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 19.14)
|
if(CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 19.14)
|
||||||
# The following warning is generated over 800 times from a qwt header only
|
# The following warning is generated over 800 times from a qwt header only
|
||||||
|
@@ -46,7 +46,6 @@ void RicfCommandFileExecutor::ExportTypeEnum::setUp()
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RicfCommandFileExecutor::RicfCommandFileExecutor()
|
RicfCommandFileExecutor::RicfCommandFileExecutor()
|
||||||
: m_exportDataSourceAsComment( true )
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -66,5 +66,4 @@ private:
|
|||||||
|
|
||||||
std::map<ExportType, QString> m_exportPaths;
|
std::map<ExportType, QString> m_exportPaths;
|
||||||
QString m_lastProjectPath;
|
QString m_lastProjectPath;
|
||||||
bool m_exportDataSourceAsComment;
|
|
||||||
};
|
};
|
||||||
|
@@ -73,22 +73,12 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|||||||
target_compile_options(
|
target_compile_options(
|
||||||
Commands
|
Commands
|
||||||
PRIVATE -Wall
|
PRIVATE -Wall
|
||||||
-Wno-unused-parameter
|
|
||||||
-Wno-reorder
|
-Wno-reorder
|
||||||
-Wno-parentheses
|
|
||||||
-Wno-switch
|
-Wno-switch
|
||||||
|
-Wno-undefined-var-template
|
||||||
-Wno-delete-abstract-non-virtual-dtor
|
-Wno-delete-abstract-non-virtual-dtor
|
||||||
-Wno-undefined-var-template
|
|
||||||
-Wno-invalid-source-encoding
|
|
||||||
-Wno-enum-compare
|
|
||||||
-Wno-call-to-pure-virtual-from-ctor-dtor
|
-Wno-call-to-pure-virtual-from-ctor-dtor
|
||||||
-Wno-unused-variable
|
|
||||||
-Wno-unused-private-field
|
|
||||||
-Wno-unused-lambda-capture
|
|
||||||
-Wno-delete-non-abstract-non-virtual-dtor
|
-Wno-delete-non-abstract-non-virtual-dtor
|
||||||
-Wno-braced-scalar-init
|
|
||||||
-Wno-tautological-constant-out-of-range-compare
|
|
||||||
-Wno-undefined-var-template
|
|
||||||
-Wno-ambiguous-reversed-operator
|
-Wno-ambiguous-reversed-operator
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@@ -111,7 +101,7 @@ if(MSVC)
|
|||||||
# set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W3 /wd4190
|
# set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W3 /wd4190
|
||||||
# /wd4100 /wd4127")
|
# /wd4100 /wd4127")
|
||||||
|
|
||||||
set(BUILD_FLAGS_FOR_MSVC "/wd4190 /wd4100 /wd4127 /wd4245 /wd4005 /wd4573")
|
set(BUILD_FLAGS_FOR_MSVC "/W3 /wd4190 /wd4100 /wd4127")
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 19.14)
|
if(CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 19.14)
|
||||||
# The following warning is generated over 800 times from a qwt header only
|
# The following warning is generated over 800 times from a qwt header only
|
||||||
|
@@ -55,8 +55,7 @@ bool RicImportEnsembleFractureStatisticsFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicImportEnsembleFractureStatisticsFeature::onActionTriggered( bool isChecked )
|
void RicImportEnsembleFractureStatisticsFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
QString pathCacheName = "INPUT_FILES";
|
||||||
QString pathCacheName = "INPUT_FILES";
|
|
||||||
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import StimPlan Fractures", pathCacheName );
|
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import StimPlan Fractures", pathCacheName );
|
||||||
|
|
||||||
if ( groupByEnsemble == RiaEnsembleNameTools::EnsembleGroupingMode::NONE )
|
if ( groupByEnsemble == RiaEnsembleNameTools::EnsembleGroupingMode::NONE )
|
||||||
|
@@ -680,8 +680,6 @@ std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFra
|
|||||||
cvf::Vec3d startPos = wellPathCoords.front();
|
cvf::Vec3d startPos = wellPathCoords.front();
|
||||||
cvf::Vec3d endPos = wellPathCoords.back();
|
cvf::Vec3d endPos = wellPathCoords.back();
|
||||||
|
|
||||||
cvf::Vec3d wellPathTangent = endPos - startPos;
|
|
||||||
|
|
||||||
cvf::Plane fracturePlane;
|
cvf::Plane fracturePlane;
|
||||||
auto fractureTransform = fracture->transformMatrix();
|
auto fractureTransform = fracture->transformMatrix();
|
||||||
fracturePlane.setFromPointAndNormal( fractureTransform.translation(), static_cast<cvf::Vec3d>( fractureTransform.col( 2 ) ) );
|
fracturePlane.setFromPointAndNormal( fractureTransform.translation(), static_cast<cvf::Vec3d>( fractureTransform.col( 2 ) ) );
|
||||||
|
@@ -444,8 +444,6 @@ void RicMswTableFormatterTools::generateCompsegHeader( RifTextDataTableFormatter
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicMswTableFormatterTools::generateWsegvalvTable( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo )
|
void RicMswTableFormatterTools::generateWsegvalvTable( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo )
|
||||||
{
|
{
|
||||||
bool foundValve = false;
|
|
||||||
|
|
||||||
std::map<size_t, std::vector<WsegvalveData>> wsegvalveData;
|
std::map<size_t, std::vector<WsegvalveData>> wsegvalveData;
|
||||||
|
|
||||||
generateWsegvalvTableRecursively( exportInfo.mainBoreBranch(),
|
generateWsegvalvTableRecursively( exportInfo.mainBoreBranch(),
|
||||||
@@ -729,8 +727,6 @@ void RicMswTableFormatterTools::writeWelsegsSegment( RicMswSegment*
|
|||||||
std::vector<std::pair<double, double>> segments = createSubSegmentMDPairs( startMD, endMD, maxSegmentLength );
|
std::vector<std::pair<double, double>> segments = createSubSegmentMDPairs( startMD, endMD, maxSegmentLength );
|
||||||
|
|
||||||
CVF_ASSERT( branch->wellPath() );
|
CVF_ASSERT( branch->wellPath() );
|
||||||
auto wellPathGeometry = branch->wellPath()->wellPathGeometry();
|
|
||||||
CVF_ASSERT( wellPathGeometry );
|
|
||||||
|
|
||||||
double prevOutMD = branch->startMD();
|
double prevOutMD = branch->startMD();
|
||||||
double prevOutTVD = branch->startTVD();
|
double prevOutTVD = branch->startTVD();
|
||||||
@@ -851,9 +847,6 @@ void RicMswTableFormatterTools::writeValveWelsegsSegment( const RicMswSegment*
|
|||||||
|
|
||||||
std::vector<std::pair<double, double>> splitSegments = createSubSegmentMDPairs( startMD, endMD, maxSegmentLength );
|
std::vector<std::pair<double, double>> splitSegments = createSubSegmentMDPairs( startMD, endMD, maxSegmentLength );
|
||||||
|
|
||||||
auto wellPathGeometry = valve->wellPath()->wellPathGeometry();
|
|
||||||
CVF_ASSERT( wellPathGeometry );
|
|
||||||
|
|
||||||
const auto linerDiameter = valve->wellPath()->mswCompletionParameters()->linerDiameter( exportInfo.unitSystem() );
|
const auto linerDiameter = valve->wellPath()->mswCompletionParameters()->linerDiameter( exportInfo.unitSystem() );
|
||||||
const auto roughnessFactor = valve->wellPath()->mswCompletionParameters()->roughnessFactor( exportInfo.unitSystem() );
|
const auto roughnessFactor = valve->wellPath()->mswCompletionParameters()->roughnessFactor( exportInfo.unitSystem() );
|
||||||
|
|
||||||
|
@@ -761,8 +761,6 @@ void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfoForWell(
|
|||||||
auto cellIntersections = generateCellSegments( eclipseCase, wellPath );
|
auto cellIntersections = generateCellSegments( eclipseCase, wellPath );
|
||||||
double initialMD = computeIntitialMeasuredDepth( eclipseCase, wellPath, mswParameters, cellIntersections );
|
double initialMD = computeIntitialMeasuredDepth( eclipseCase, wellPath, mswParameters, cellIntersections );
|
||||||
|
|
||||||
RiaDefines::EclipseUnitSystem unitSystem = eclipseCase->eclipseCaseData()->unitsType();
|
|
||||||
|
|
||||||
bool enableSegmentSplitting = false;
|
bool enableSegmentSplitting = false;
|
||||||
generateFishbonesMswExportInfo( eclipseCase, wellPath, initialMD, cellIntersections, enableSegmentSplitting, exportInfo, branch );
|
generateFishbonesMswExportInfo( eclipseCase, wellPath, initialMD, cellIntersections, enableSegmentSplitting, exportInfo, branch );
|
||||||
}
|
}
|
||||||
@@ -777,8 +775,7 @@ bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEcl
|
|||||||
gsl::not_null<RicMswExportInfo*> exportInfo,
|
gsl::not_null<RicMswExportInfo*> exportInfo,
|
||||||
gsl::not_null<RicMswBranch*> branch )
|
gsl::not_null<RicMswBranch*> branch )
|
||||||
{
|
{
|
||||||
auto mswParameters = wellPath->mswCompletionParameters();
|
auto fractures = wellPath->fractureCollection()->activeFractures();
|
||||||
auto fractures = wellPath->fractureCollection()->activeFractures();
|
|
||||||
|
|
||||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
|
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
|
||||||
filterIntersections( cellIntersections, initialMD, wellPath->wellPathGeometry(), eclipseCase );
|
filterIntersections( cellIntersections, initialMD, wellPath->wellPathGeometry(), eclipseCase );
|
||||||
@@ -922,8 +919,6 @@ bool RicWellPathExportMswCompletionsImpl::generatePerforationsMswExportInfo( Rim
|
|||||||
std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::generateCellSegments( const RimEclipseCase* eclipseCase,
|
std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::generateCellSegments( const RimEclipseCase* eclipseCase,
|
||||||
const RimWellPath* wellPath )
|
const RimWellPath* wellPath )
|
||||||
{
|
{
|
||||||
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
|
||||||
|
|
||||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||||
CVF_ASSERT( wellPathGeometry );
|
CVF_ASSERT( wellPathGeometry );
|
||||||
|
|
||||||
@@ -1186,9 +1181,6 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions( gsl::not_null<
|
|||||||
double exportStartTVD = RicMswTableFormatterTools::tvdFromMeasuredDepth( wellPath, exportStartMD );
|
double exportStartTVD = RicMswTableFormatterTools::tvdFromMeasuredDepth( wellPath, exportStartMD );
|
||||||
double exportEndTVD = RicMswTableFormatterTools::tvdFromMeasuredDepth( wellPath, exportEndMD );
|
double exportEndTVD = RicMswTableFormatterTools::tvdFromMeasuredDepth( wellPath, exportEndMD );
|
||||||
|
|
||||||
double overlapStartTVD = RicMswTableFormatterTools::tvdFromMeasuredDepth( wellPath, overlapStart );
|
|
||||||
double overlapEndTVD = RicMswTableFormatterTools::tvdFromMeasuredDepth( wellPath, overlapEnd );
|
|
||||||
|
|
||||||
if ( segment->startMD() <= valveMD && valveMD < segment->endMD() )
|
if ( segment->startMD() <= valveMD && valveMD < segment->endMD() )
|
||||||
{
|
{
|
||||||
if ( valve->componentType() == RiaDefines::WellPathComponentType::AICD )
|
if ( valve->componentType() == RiaDefines::WellPathComponentType::AICD )
|
||||||
|
@@ -74,7 +74,6 @@ void RicCreateDepthAdjustedLasFilesFeature::onActionTriggered( bool isChecked )
|
|||||||
{
|
{
|
||||||
RimCase* selectedCase = featureUi.selectedCase();
|
RimCase* selectedCase = featureUi.selectedCase();
|
||||||
RimWellPath* sourceWell = featureUi.sourceWell();
|
RimWellPath* sourceWell = featureUi.sourceWell();
|
||||||
RimWellLogFile* sourceWellLogFile = featureUi.wellLogFile();
|
|
||||||
std::vector<RimWellPath*> destinationWells = featureUi.destinationWells().ptrReferencedObjects();
|
std::vector<RimWellPath*> destinationWells = featureUi.destinationWells().ptrReferencedObjects();
|
||||||
std::vector<QString> selectedResultProperties = featureUi.selectedResultProperties();
|
std::vector<QString> selectedResultProperties = featureUi.selectedResultProperties();
|
||||||
QString exportFolder = featureUi.exportFolder();
|
QString exportFolder = featureUi.exportFolder();
|
||||||
@@ -146,7 +145,6 @@ void RicCreateDepthAdjustedLasFilesFeature::createDepthAdjustedWellLogFileFromGe
|
|||||||
{
|
{
|
||||||
if ( sourceWell->wellLogFiles().empty() ) return;
|
if ( sourceWell->wellLogFiles().empty() ) return;
|
||||||
|
|
||||||
auto* wellLogFileData = sourceWell->wellLogFiles()[0]->wellLogFileData();
|
|
||||||
RimWellLogPlotCollection* wellLogCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
|
RimWellLogPlotCollection* wellLogCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
|
||||||
cvf::ref<RigGeoMechWellLogExtractor> sourceWellExtractor = wellLogCollection->findOrCreateExtractor( sourceWell, geoMechCase );
|
cvf::ref<RigGeoMechWellLogExtractor> sourceWellExtractor = wellLogCollection->findOrCreateExtractor( sourceWell, geoMechCase );
|
||||||
if ( sourceWellExtractor.isNull() )
|
if ( sourceWellExtractor.isNull() )
|
||||||
|
@@ -415,9 +415,8 @@ QString VdeVizDataExtractor::createModelMetaJsonString( const std::vector<std::u
|
|||||||
jsonModelMeta["meshArr"] = jsonMeshMetaList;
|
jsonModelMeta["meshArr"] = jsonMeshMetaList;
|
||||||
jsonModelMeta["labelsArr"] = jsonLabelList;
|
jsonModelMeta["labelsArr"] = jsonLabelList;
|
||||||
|
|
||||||
ResInsightInternalJson::Json jsonCodec;
|
const bool prettifyJson = true;
|
||||||
const bool prettifyJson = true;
|
QString jsonStr = ResInsightInternalJson::Json::encode( jsonModelMeta, prettifyJson );
|
||||||
QString jsonStr = ResInsightInternalJson::Json::encode( jsonModelMeta, prettifyJson );
|
|
||||||
return jsonStr;
|
return jsonStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,8 +55,7 @@ void RicAppendSummaryCurvesForObjectsFeature::onActionTriggered( bool isChecked
|
|||||||
|
|
||||||
RicAppendSummaryPlotsForObjectsFeature::isSelectionCompatibleWithPlot( sumAddressCollections, summaryMultiPlot );
|
RicAppendSummaryPlotsForObjectsFeature::isSelectionCompatibleWithPlot( sumAddressCollections, summaryMultiPlot );
|
||||||
|
|
||||||
auto selectionType = sumAddressCollections.front()->contentType();
|
auto sourcePlots = summaryMultiPlot->summaryPlots();
|
||||||
auto sourcePlots = summaryMultiPlot->summaryPlots();
|
|
||||||
|
|
||||||
std::vector<caf::PdmObjectHandle*> pdmObjects;
|
std::vector<caf::PdmObjectHandle*> pdmObjects;
|
||||||
for ( auto summaryAdrCollection : sumAddressCollections )
|
for ( auto summaryAdrCollection : sumAddressCollections )
|
||||||
|
@@ -62,8 +62,7 @@ bool RicImportEnsembleSurfaceFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicImportEnsembleSurfaceFeature::onActionTriggered( bool isChecked )
|
void RicImportEnsembleSurfaceFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RiaApplication* app = RiaApplication::instance();
|
QString pathCacheName = "ENSEMBLE_SURFACE_FILES";
|
||||||
QString pathCacheName = "ENSEMBLE_SURFACE_FILES";
|
|
||||||
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import Ensemble Surface", pathCacheName );
|
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import Ensemble Surface", pathCacheName );
|
||||||
|
|
||||||
importEnsembleSurfaceFromFiles( fileNames, groupByEnsemble );
|
importEnsembleSurfaceFromFiles( fileNames, groupByEnsemble );
|
||||||
|
@@ -58,8 +58,7 @@ bool RicImportEnsembleWellLogsFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicImportEnsembleWellLogsFeature::onActionTriggered( bool isChecked )
|
void RicImportEnsembleWellLogsFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RiaApplication* app = RiaApplication::instance();
|
QString pathCacheName = "ENSEMBLE_WELL_LOGS_FILES";
|
||||||
QString pathCacheName = "ENSEMBLE_WELL_LOGS_FILES";
|
|
||||||
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import Ensemble Well Logs", pathCacheName );
|
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import Ensemble Well Logs", pathCacheName );
|
||||||
if ( fileNames.isEmpty() ) return;
|
if ( fileNames.isEmpty() ) return;
|
||||||
|
|
||||||
|
@@ -51,8 +51,8 @@ void RicNewCustomObjectiveFunctionFeature::onActionTriggered( bool isChecked )
|
|||||||
|
|
||||||
if ( coll.size() == 1 )
|
if ( coll.size() == 1 )
|
||||||
{
|
{
|
||||||
RimCustomObjectiveFunction* newFunc = coll[0]->addObjectiveFunction();
|
RimCustomObjectiveFunction* newFunc = coll[0]->addObjectiveFunction();
|
||||||
RimCustomObjectiveFunctionWeight* newWeight = RimObjectiveFunctionTools::addWeight( newFunc );
|
RimObjectiveFunctionTools::addWeight( newFunc );
|
||||||
coll[0]->updateConnectedEditors();
|
coll[0]->updateConnectedEditors();
|
||||||
RiuPlotMainWindowTools::selectAsCurrentItem( newFunc );
|
RiuPlotMainWindowTools::selectAsCurrentItem( newFunc );
|
||||||
RiuPlotMainWindowTools::setExpanded( coll.front() );
|
RiuPlotMainWindowTools::setExpanded( coll.front() );
|
||||||
|
@@ -89,11 +89,8 @@ RicRecursiveFileSearchDialogResult RicRecursiveFileSearchDialog::runRecursiveSea
|
|||||||
dialog.m_fileFilterField->addItem( fileNameFilter );
|
dialog.m_fileFilterField->addItem( fileNameFilter );
|
||||||
dialog.m_pathFilterField->addItem( QDir::toNativeSeparators( pathFilterText ) );
|
dialog.m_pathFilterField->addItem( QDir::toNativeSeparators( pathFilterText ) );
|
||||||
|
|
||||||
for ( const auto& s : fileExtensions )
|
QString joined = fileExtensions.join( '|' );
|
||||||
{
|
dialog.m_fileExtensionsField->setText( joined );
|
||||||
QString joined = fileExtensions.join( '|' );
|
|
||||||
dialog.m_fileExtensionsField->setText( joined );
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog.m_fileFilterField->addItem( fileNameFilter );
|
dialog.m_fileFilterField->addItem( fileNameFilter );
|
||||||
|
|
||||||
@@ -413,8 +410,8 @@ void RicRecursiveFileSearchDialog::updateFileListWidget()
|
|||||||
std::vector<QStringList> groupedByEnsemble = RiaEnsembleNameTools::groupFilesByEnsemble( m_foundFiles, ensembleGroupingMode() );
|
std::vector<QStringList> groupedByEnsemble = RiaEnsembleNameTools::groupFilesByEnsemble( m_foundFiles, ensembleGroupingMode() );
|
||||||
for ( const QStringList& groupedFileNames : groupedByEnsemble )
|
for ( const QStringList& groupedFileNames : groupedByEnsemble )
|
||||||
{
|
{
|
||||||
QString ensembleName = RiaEnsembleNameTools::findSuitableEnsembleName( groupedFileNames, ensembleGroupingMode() );
|
QString ensembleName = RiaEnsembleNameTools::findSuitableEnsembleName( groupedFileNames, ensembleGroupingMode() );
|
||||||
QListWidgetItem* item = new QListWidgetItem( QDir::toNativeSeparators( ensembleName ), m_fileListWidget );
|
new QListWidgetItem( QDir::toNativeSeparators( ensembleName ), m_fileListWidget );
|
||||||
addToFileListWidget( groupedFileNames );
|
addToFileListWidget( groupedFileNames );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -66,8 +66,6 @@ bool RicReloadSummaryCaseFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked )
|
void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
|
|
||||||
|
|
||||||
std::vector<RimSummaryCase*> caseSelection = selectedSummaryCases();
|
std::vector<RimSummaryCase*> caseSelection = selectedSummaryCases();
|
||||||
for ( RimSummaryCase* summaryCase : caseSelection )
|
for ( RimSummaryCase* summaryCase : caseSelection )
|
||||||
{
|
{
|
||||||
|
@@ -87,8 +87,6 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot()
|
|||||||
|
|
||||||
const QString lastUsedSummaryPlotKey( "lastUsedSummaryPlotKey" );
|
const QString lastUsedSummaryPlotKey( "lastUsedSummaryPlotKey" );
|
||||||
|
|
||||||
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
|
|
||||||
|
|
||||||
RimSummaryPlot* defaultSelectedPlot = nullptr;
|
RimSummaryPlot* defaultSelectedPlot = nullptr;
|
||||||
{
|
{
|
||||||
QString lastUsedPlotRef = app->cacheDataObject( lastUsedSummaryPlotKey ).toString();
|
QString lastUsedPlotRef = app->cacheDataObject( lastUsedSummaryPlotKey ).toString();
|
||||||
|
@@ -107,8 +107,7 @@ std::vector<RimEnsembleCurveSet*> RicNewSummaryEnsembleCurveSetFeature::addDefau
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimSummaryPlot* RicNewSummaryEnsembleCurveSetFeature::createPlotForCurveSetsAndUpdate( std::vector<RimSummaryCaseCollection*> ensembles )
|
RimSummaryPlot* RicNewSummaryEnsembleCurveSetFeature::createPlotForCurveSetsAndUpdate( std::vector<RimSummaryCaseCollection*> ensembles )
|
||||||
{
|
{
|
||||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||||
RimProject* proj = app->project();
|
|
||||||
|
|
||||||
RiaPreferencesSummary* prefs = RiaPreferencesSummary::current();
|
RiaPreferencesSummary* prefs = RiaPreferencesSummary::current();
|
||||||
|
|
||||||
|
@@ -852,8 +852,6 @@ void RicSummaryPlotEditorUi::updateAppearanceEditor()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicSummaryPlotEditorUi::createNewPlot()
|
void RicSummaryPlotEditorUi::createNewPlot()
|
||||||
{
|
{
|
||||||
RimProject* proj = RimProject::current();
|
|
||||||
|
|
||||||
RimSummaryPlot* newSummaryPlot = nullptr;
|
RimSummaryPlot* newSummaryPlot = nullptr;
|
||||||
|
|
||||||
if ( !m_plotContainer )
|
if ( !m_plotContainer )
|
||||||
|
@@ -140,7 +140,6 @@ std::vector<RimEclipseCase*> openEclipseCasesForCellPlotting( QStringList gridFi
|
|||||||
{
|
{
|
||||||
std::vector<RimEclipseCase*> openedCases;
|
std::vector<RimEclipseCase*> openedCases;
|
||||||
|
|
||||||
RiaApplication* app = RiaApplication::instance();
|
|
||||||
RimEclipseCaseCollection* analysisModels = RimProject::current()->activeOilField()->analysisModels();
|
RimEclipseCaseCollection* analysisModels = RimProject::current()->activeOilField()->analysisModels();
|
||||||
for ( const QString& fileName : gridFileNames )
|
for ( const QString& fileName : gridFileNames )
|
||||||
{
|
{
|
||||||
|
@@ -152,7 +152,6 @@ void RicCreateMultipleWellPathLaterals::slotAppendFractures()
|
|||||||
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
||||||
if ( wellPathCollection )
|
if ( wellPathCollection )
|
||||||
{
|
{
|
||||||
int index = 0;
|
|
||||||
for ( auto measuredDepth : m_ui->locationConfig()->locations() )
|
for ( auto measuredDepth : m_ui->locationConfig()->locations() )
|
||||||
{
|
{
|
||||||
RimModeledWellPath* newModeledWellPath = dynamic_cast<RimModeledWellPath*>(
|
RimModeledWellPath* newModeledWellPath = dynamic_cast<RimModeledWellPath*>(
|
||||||
|
@@ -115,7 +115,7 @@ bool RifOpmCommonEclipseSummary::open( const QString& fileName, bool includeRest
|
|||||||
|
|
||||||
RifOpmCommonEclipseSummary::increaseEsmryFileCount();
|
RifOpmCommonEclipseSummary::increaseEsmryFileCount();
|
||||||
}
|
}
|
||||||
catch ( std::exception& e )
|
catch ( std::exception& )
|
||||||
{
|
{
|
||||||
if ( threadSafeLogger )
|
if ( threadSafeLogger )
|
||||||
{
|
{
|
||||||
|
@@ -151,7 +151,7 @@ void RifOpmGridTools::transferCoordinates( Opm::EclIO::EGrid& opmMainGrid, Opm::
|
|||||||
|
|
||||||
std::vector<cvf::Vec3d> snapToCoordinatesFromMainGrid;
|
std::vector<cvf::Vec3d> snapToCoordinatesFromMainGrid;
|
||||||
|
|
||||||
for ( size_t opmCellIndex = 0; opmCellIndex < cellCount; opmCellIndex++ )
|
for ( int opmCellIndex = 0; opmCellIndex < static_cast<int>( cellCount ); opmCellIndex++ )
|
||||||
{
|
{
|
||||||
opmGrid.getCellCorners( opmCellIndex, opmX, opmY, opmZ );
|
opmGrid.getCellCorners( opmCellIndex, opmX, opmY, opmZ );
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ void RifOpmGridTools::transferCoordinates( Opm::EclIO::EGrid& opmMainGrid, Opm::
|
|||||||
{
|
{
|
||||||
const auto& pillarCordinates = candidates[closestPillarIndex];
|
const auto& pillarCordinates = candidates[closestPillarIndex];
|
||||||
|
|
||||||
int layerCount = pillarCordinates.size() / 2;
|
int layerCount = static_cast<int>( pillarCordinates.size() / 2 );
|
||||||
int layerIndexInMainGridCell = ijkCell[2] % layerCount;
|
int layerIndexInMainGridCell = ijkCell[2] % layerCount;
|
||||||
int localNodeIndex = opmNodeIndex % 8;
|
int localNodeIndex = opmNodeIndex % 8;
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ std::map<int, std::pair<double, double>>
|
|||||||
auto mainGridCellIndex = hostCellGlobalIndices[cIdx];
|
auto mainGridCellIndex = hostCellGlobalIndices[cIdx];
|
||||||
opmMainGrid.getCellCorners( mainGridCellIndex, opmX, opmY, opmZ );
|
opmMainGrid.getCellCorners( mainGridCellIndex, opmX, opmY, opmZ );
|
||||||
|
|
||||||
auto ijkLocalGrid = opmGrid.ijk_from_global_index( cIdx );
|
auto ijkLocalGrid = opmGrid.ijk_from_global_index( static_cast<int>( cIdx ) );
|
||||||
auto layer = ijkLocalGrid[2];
|
auto layer = ijkLocalGrid[2];
|
||||||
|
|
||||||
// Four corners for top
|
// Four corners for top
|
||||||
|
@@ -21,9 +21,10 @@
|
|||||||
#include "RifCsvUserDataParser.h"
|
#include "RifCsvUserDataParser.h"
|
||||||
#include "RifRevealCsvSectionSummaryReader.h"
|
#include "RifRevealCsvSectionSummaryReader.h"
|
||||||
|
|
||||||
|
#include "RiaTextStringTools.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <Qt>
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@@ -55,7 +56,7 @@ std::pair<bool, QString> RifRevealCsvSummaryReader::parse( const QString& fileNa
|
|||||||
|
|
||||||
// Split files on strange header line (starts with ",Date").
|
// Split files on strange header line (starts with ",Date").
|
||||||
QString fileContents = in.readAll();
|
QString fileContents = in.readAll();
|
||||||
QStringList parts = fileContents.split( ",Date", QString::SkipEmptyParts );
|
QStringList parts = RiaTextStringTools::splitSkipEmptyParts( fileContents, ",Date" );
|
||||||
|
|
||||||
// Parse each section separately
|
// Parse each section separately
|
||||||
bool isFirst = true;
|
bool isFirst = true;
|
||||||
|
@@ -57,7 +57,7 @@ bool RifSeismicZGYReader::open( QString filename )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( const std::exception& err )
|
catch ( const std::exception& )
|
||||||
{
|
{
|
||||||
m_reader.reset();
|
m_reader.reset();
|
||||||
return false;
|
return false;
|
||||||
|
@@ -375,9 +375,9 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
|
|||||||
|
|
||||||
// Checks if the given vector is a possible new candidate for an axis vector and adds it to the given list
|
// Checks if the given vector is a possible new candidate for an axis vector and adds it to the given list
|
||||||
// of axesVectorCandidates. Also increases the number of occurrences of vector candidates.
|
// of axesVectorCandidates. Also increases the number of occurrences of vector candidates.
|
||||||
auto maybeInsertAxisVectorCandidate = [epsilon]( const cvf::Vec2d vector,
|
auto maybeInsertAxisVectorCandidate = []( const cvf::Vec2d vector,
|
||||||
std::map<cvf::Vec2d, double, vec2dCompare>& axesVectorCandidates,
|
std::map<cvf::Vec2d, double, vec2dCompare>& axesVectorCandidates,
|
||||||
std::map<cvf::Vec2d, unsigned, vec2dCompare>& axesVectorCandidatesNum ) -> bool
|
std::map<cvf::Vec2d, unsigned, vec2dCompare>& axesVectorCandidatesNum ) -> bool
|
||||||
{
|
{
|
||||||
double length = vector.length();
|
double length = vector.length();
|
||||||
cvf::Vec2d normalizedVector = vector.getNormalized();
|
cvf::Vec2d normalizedVector = vector.getNormalized();
|
||||||
|
@@ -239,7 +239,7 @@ void RifWellPathImporter::readAllAsciiWellData( const QString& filePath )
|
|||||||
|
|
||||||
std::string line;
|
std::string line;
|
||||||
std::getline( stream, line, '\n' );
|
std::getline( stream, line, '\n' );
|
||||||
// Skip possible comment lines (-- is used in eclipse, so Haakon H<>gst<73>l considered it smart to skip these
|
// Skip possible comment lines (-- is used in eclipse, so Haakon H<>gst<73>l considered it smart to skip these
|
||||||
// here as well) The first "-" is eaten by the stream >> x above
|
// here as well) The first "-" is eaten by the stream >> x above
|
||||||
if ( line.find( "-" ) == 0 || line.find( "#" ) == 0 )
|
if ( line.find( "-" ) == 0 || line.find( "#" ) == 0 )
|
||||||
{
|
{
|
||||||
@@ -248,8 +248,8 @@ void RifWellPathImporter::readAllAsciiWellData( const QString& filePath )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Find the first and the last position of any quotes (and do not care to match quotes)
|
// Find the first and the last position of any quotes (and do not care to match quotes)
|
||||||
size_t quoteStartIdx = line.find_first_of( "'`<EFBFBD><EFBFBD><EFBFBD>" );
|
size_t quoteStartIdx = line.find_first_of( "'`" );
|
||||||
size_t quoteEndIdx = line.find_last_of( "'`<EFBFBD><EFBFBD><EFBFBD>" );
|
size_t quoteEndIdx = line.find_last_of( "'`" );
|
||||||
|
|
||||||
std::string wellName;
|
std::string wellName;
|
||||||
bool haveAPossibleWellStart = false;
|
bool haveAPossibleWellStart = false;
|
||||||
|
@@ -61,7 +61,7 @@ private:
|
|||||||
{
|
{
|
||||||
RigFemPart* part = m_caseData->femParts()->part( pIdx );
|
RigFemPart* part = m_caseData->femParts()->part( pIdx );
|
||||||
int elmCount = part->elementCount();
|
int elmCount = part->elementCount();
|
||||||
auto frames = m_resultsData->findOrLoadScalarResult( pIdx, m_resVarAddr );
|
m_resultsData->findOrLoadScalarResult( pIdx, m_resVarAddr );
|
||||||
|
|
||||||
auto [stepIdx, frameIdx] = m_resultsData->stepListIndexToTimeStepAndDataFrameIndex( timeStepIndex );
|
auto [stepIdx, frameIdx] = m_resultsData->stepListIndexToTimeStepAndDataFrameIndex( timeStepIndex );
|
||||||
|
|
||||||
|
@@ -152,10 +152,10 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
|
|||||||
|
|
||||||
const std::vector<RigCell>& cells = eclipseCase->mainGrid()->globalCellArray();
|
const std::vector<RigCell>& cells = eclipseCase->mainGrid()->globalCellArray();
|
||||||
|
|
||||||
auto getFaceCenterAndNormal = [activeCellInfo, cells, arrowScaling, displayCordXf]( size_t globalCellIdx,
|
auto getFaceCenterAndNormal = [cells, arrowScaling, displayCordXf]( size_t globalCellIdx,
|
||||||
cvf::StructGridInterface::FaceType faceType,
|
cvf::StructGridInterface::FaceType faceType,
|
||||||
cvf::Vec3d& faceCenter,
|
cvf::Vec3d& faceCenter,
|
||||||
cvf::Vec3d& faceNormal )
|
cvf::Vec3d& faceNormal )
|
||||||
{
|
{
|
||||||
faceCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].faceCenter( faceType ) );
|
faceCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].faceCenter( faceType ) );
|
||||||
cvf::Vec3d cellCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].center() );
|
cvf::Vec3d cellCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].center() );
|
||||||
|
@@ -80,6 +80,4 @@ private:
|
|||||||
cvf::Collection<RivGridPartMgr> m_allGrids; // Main grid and all LGR's
|
cvf::Collection<RivGridPartMgr> m_allGrids; // Main grid and all LGR's
|
||||||
cvf::ref<RivElementVectorResultPartMgr> m_elementVectorResultMgr;
|
cvf::ref<RivElementVectorResultPartMgr> m_elementVectorResultMgr;
|
||||||
cvf::ref<RivReservoirFaultsPartMgr> m_faultsPartMgr;
|
cvf::ref<RivReservoirFaultsPartMgr> m_faultsPartMgr;
|
||||||
|
|
||||||
RivCellSetEnum m_cellSetType;
|
|
||||||
};
|
};
|
||||||
|
@@ -615,8 +615,8 @@ void RivReservoirViewPartMgr::computeNativeVisibility( cvf::UByteArray*
|
|||||||
size_t reservoirCellIndex = grid->reservoirCellIndex( cellIndex );
|
size_t reservoirCellIndex = grid->reservoirCellIndex( cellIndex );
|
||||||
bool isCellActive = activeCellInfo->isActive( reservoirCellIndex );
|
bool isCellActive = activeCellInfo->isActive( reservoirCellIndex );
|
||||||
|
|
||||||
if ( !invalidCellsIsVisible && cell.isInvalid() || !inactiveCellsIsVisible && !isCellActive ||
|
if ( ( !invalidCellsIsVisible && cell.isInvalid() ) || ( !inactiveCellsIsVisible && !isCellActive ) ||
|
||||||
!activeCellsIsVisible && isCellActive || ( *cellIsInWellStatuses )[cellIndex] )
|
( !activeCellsIsVisible && isCellActive ) || ( *cellIsInWellStatuses )[cellIndex] )
|
||||||
{
|
{
|
||||||
( *cellVisibility )[cellIndex] = false;
|
( *cellVisibility )[cellIndex] = false;
|
||||||
}
|
}
|
||||||
|
@@ -91,5 +91,4 @@ private:
|
|||||||
caf::PdmPointer<RimEclipseView> m_rimReservoirView;
|
caf::PdmPointer<RimEclipseView> m_rimReservoirView;
|
||||||
uint m_count;
|
uint m_count;
|
||||||
size_t m_currentT;
|
size_t m_currentT;
|
||||||
bool m_showAsVectors;
|
|
||||||
};
|
};
|
||||||
|
@@ -454,11 +454,11 @@ RigWellAllocationOverTime RimWellAllocationOverTimePlot::createWellAllocationOve
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::map<QString, const std::vector<double>*> tracerFractionCellValues =
|
std::map<QString, const std::vector<double>*> tracerFractionCellValues =
|
||||||
RimWellAllocationTools::findOrCreateRelevantTracerCellFractions( simWellData, m_flowDiagSolution, i );
|
RimWellAllocationTools::findOrCreateRelevantTracerCellFractions( simWellData, m_flowDiagSolution, static_cast<int>( i ) );
|
||||||
|
|
||||||
auto simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineForTimeStep( m_case->eclipseCaseData(),
|
auto simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineForTimeStep( m_case->eclipseCaseData(),
|
||||||
simWellData,
|
simWellData,
|
||||||
i,
|
static_cast<int>( i ),
|
||||||
branchDetection,
|
branchDetection,
|
||||||
true );
|
true );
|
||||||
|
|
||||||
|
@@ -568,9 +568,9 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
: tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE
|
: tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE
|
||||||
: cvf::Color3f::DARK_GRAY;
|
: cvf::Color3f::DARK_GRAY;
|
||||||
|
|
||||||
if ( tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count( FLOW_PHASE_OIL ) ||
|
if ( ( tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count( FLOW_PHASE_OIL ) ) ||
|
||||||
tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count( FLOW_PHASE_GAS ) ||
|
( tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count( FLOW_PHASE_GAS ) ) ||
|
||||||
tracerName == RIG_FLOW_WATER_NAME && selectedPhases.count( FLOW_PHASE_WATER ) )
|
( tracerName == RIG_FLOW_WATER_NAME && selectedPhases.count( FLOW_PHASE_WATER ) ) )
|
||||||
{
|
{
|
||||||
FlowPhase flowPhase = FLOW_PHASE_NONE;
|
FlowPhase flowPhase = FLOW_PHASE_NONE;
|
||||||
if ( tracerName == RIG_FLOW_OIL_NAME )
|
if ( tracerName == RIG_FLOW_OIL_NAME )
|
||||||
|
@@ -428,7 +428,7 @@ void RimIntersectionResultDefinition::defineUiOrdering( QString uiConfigName, ca
|
|||||||
m_geomResultDefinition->uiOrdering( uiConfigName, uiOrdering );
|
m_geomResultDefinition->uiOrdering( uiConfigName, uiOrdering );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ( eclipseCase && m_eclipseResultDefinition->hasDynamicResult() || m_eclipseResultDefinition->isTernarySaturationSelected() ) ||
|
if ( ( ( eclipseCase && ( m_eclipseResultDefinition->hasDynamicResult() || m_eclipseResultDefinition->isTernarySaturationSelected() ) ) ) ||
|
||||||
geomCase )
|
geomCase )
|
||||||
{
|
{
|
||||||
uiOrdering.add( &m_timeStep );
|
uiOrdering.add( &m_timeStep );
|
||||||
|
@@ -161,7 +161,7 @@ QString RimTools::relocateFile( const QString& originalFileName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !pathEndsDiffer && firstDiffIdx < fileNamePathElements.size() || firstDiffIdx < oldProjPathElements.size() )
|
if ( ( !pathEndsDiffer && firstDiffIdx < fileNamePathElements.size() ) || firstDiffIdx < oldProjPathElements.size() )
|
||||||
{
|
{
|
||||||
pathEndsDiffer = true;
|
pathEndsDiffer = true;
|
||||||
}
|
}
|
||||||
|
@@ -98,8 +98,7 @@ void RimSummaryCaseCollection::sortByBinnedVariation( std::vector<RigEnsemblePar
|
|||||||
// index
|
// index
|
||||||
std::stable_sort( parameterVector.begin(),
|
std::stable_sort( parameterVector.begin(),
|
||||||
parameterVector.end(),
|
parameterVector.end(),
|
||||||
[&bins]( const RigEnsembleParameter& lhs, const RigEnsembleParameter& rhs )
|
[]( const RigEnsembleParameter& lhs, const RigEnsembleParameter& rhs ) { return lhs.variationBin > rhs.variationBin; } );
|
||||||
{ return lhs.variationBin > rhs.variationBin; } );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -115,6 +115,4 @@ private:
|
|||||||
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_axisLabelFontSize;
|
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_axisLabelFontSize;
|
||||||
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_valueLabelFontSize;
|
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_valueLabelFontSize;
|
||||||
caf::PdmField<bool> m_showValueLabels;
|
caf::PdmField<bool> m_showValueLabels;
|
||||||
|
|
||||||
const int m_initialNumberOfTimeSteps = 10;
|
|
||||||
};
|
};
|
||||||
|
@@ -59,7 +59,7 @@ std::vector<double> RigDepthResultAccessor::resultValues( RigEclipseCaseData*
|
|||||||
|
|
||||||
for ( auto k : kvals )
|
for ( auto k : kvals )
|
||||||
{
|
{
|
||||||
int tmpCellIdx = grid->cellIndexFromIJK( i, j, k );
|
size_t tmpCellIdx = grid->cellIndexFromIJK( i, j, k );
|
||||||
double tmpVal = 0.0;
|
double tmpVal = 0.0;
|
||||||
|
|
||||||
if ( !activeCellInfo->isActive( tmpCellIdx ) )
|
if ( !activeCellInfo->isActive( tmpCellIdx ) )
|
||||||
@@ -91,7 +91,7 @@ std::vector<double> RigDepthResultAccessor::resultValues( RigEclipseCaseData*
|
|||||||
std::vector<int> RigDepthResultAccessor::kValues( RigEclipseCaseData* eclipseCaseData, int gridIndex )
|
std::vector<int> RigDepthResultAccessor::kValues( RigEclipseCaseData* eclipseCaseData, int gridIndex )
|
||||||
{
|
{
|
||||||
std::vector<int> kvals;
|
std::vector<int> kvals;
|
||||||
int maxK = eclipseCaseData->grid( gridIndex )->cellCountK();
|
int maxK = static_cast<int>( eclipseCaseData->grid( gridIndex )->cellCountK() );
|
||||||
|
|
||||||
for ( int i = 0; i < maxK; i++ )
|
for ( int i = 0; i < maxK; i++ )
|
||||||
{
|
{
|
||||||
@@ -115,7 +115,7 @@ std::vector<double> RigDepthResultAccessor::depthValues( RigEclipseCaseData* ecl
|
|||||||
|
|
||||||
if ( grid->ijkFromCellIndex( startCellIndex, &i, &j, &dummy ) )
|
if ( grid->ijkFromCellIndex( startCellIndex, &i, &j, &dummy ) )
|
||||||
{
|
{
|
||||||
int maxK = grid->cellCountK();
|
int maxK = static_cast<int>( grid->cellCountK() );
|
||||||
|
|
||||||
for ( int k = 0; k < maxK; k++ )
|
for ( int k = 0; k < maxK; k++ )
|
||||||
{
|
{
|
||||||
|
@@ -130,9 +130,6 @@ private:
|
|||||||
bool m_isProducer;
|
bool m_isProducer;
|
||||||
bool m_useTotalWellPhaseRateOnly;
|
bool m_useTotalWellPhaseRateOnly;
|
||||||
|
|
||||||
cvf::UByteArray* m_cellVisibilities = nullptr;
|
|
||||||
RigMainGrid* m_mainGrid = nullptr;
|
|
||||||
|
|
||||||
struct BranchFlow
|
struct BranchFlow
|
||||||
{
|
{
|
||||||
std::vector<double> depthValuesFromTop;
|
std::vector<double> depthValuesFromTop;
|
||||||
|
@@ -271,8 +271,7 @@ private:
|
|||||||
double m_rkbDiff;
|
double m_rkbDiff;
|
||||||
bool m_exportTvdrkb;
|
bool m_exportTvdrkb;
|
||||||
|
|
||||||
RiaDefines::DepthUnitType m_depthUnit;
|
std::vector<double> m_depthValues;
|
||||||
std::vector<double> m_depthValues;
|
|
||||||
|
|
||||||
std::vector<SingleChannelData> m_logCurveData;
|
std::vector<SingleChannelData> m_logCurveData;
|
||||||
double m_minimumCurveValue;
|
double m_minimumCurveValue;
|
||||||
|
@@ -47,7 +47,7 @@ void RigTexturedSection::setWhatToUpdate( WhatToUpdateEnum updateInfo, int index
|
|||||||
if ( index < 0 )
|
if ( index < 0 )
|
||||||
{
|
{
|
||||||
start = 0;
|
start = 0;
|
||||||
stop = m_sectionParts.size();
|
stop = static_cast<int>( m_sectionParts.size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( int i = start; i < stop; i++ )
|
for ( int i = start; i < stop; i++ )
|
||||||
@@ -94,7 +94,7 @@ bool RigTexturedSection::isValid() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
int RigTexturedSection::partsCount() const
|
int RigTexturedSection::partsCount() const
|
||||||
{
|
{
|
||||||
return m_sectionParts.size();
|
return static_cast<int>( m_sectionParts.size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -31,10 +31,10 @@
|
|||||||
|
|
||||||
struct RigWellPathFormation
|
struct RigWellPathFormation
|
||||||
{
|
{
|
||||||
double mdTop;
|
double mdTop{ 0.0 };
|
||||||
double mdBase;
|
double mdBase{ 0.0 };
|
||||||
double tvdTop;
|
double tvdTop{ 0.0 };
|
||||||
double tvdBase;
|
double tvdBase{ 0.0 };
|
||||||
QString formationName;
|
QString formationName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -86,7 +86,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::multiset<BarEntry> m_sortedBarEntries;
|
std::multiset<BarEntry> m_sortedBarEntries;
|
||||||
Qt::Orientation m_orientation;
|
|
||||||
std::map<QString, QColor> m_legendColors;
|
std::map<QString, QColor> m_legendColors;
|
||||||
bool m_isSortingByMaxValueInGroups;
|
bool m_isSortingByMaxValueInGroups;
|
||||||
int m_labelPointSize;
|
int m_labelPointSize;
|
||||||
|
@@ -384,7 +384,7 @@ bool RiuCellAndNncPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eve
|
|||||||
if ( intersectionHit )
|
if ( intersectionHit )
|
||||||
selItem = new RiuGeoMechSelectionItem( associatedGridView,
|
selItem = new RiuGeoMechSelectionItem( associatedGridView,
|
||||||
geomResDef,
|
geomResDef,
|
||||||
timestepIndex,
|
static_cast<int>( timestepIndex ),
|
||||||
dataFrameIndex,
|
dataFrameIndex,
|
||||||
gridIndex,
|
gridIndex,
|
||||||
gridLocalCellIndex,
|
gridLocalCellIndex,
|
||||||
@@ -395,7 +395,7 @@ bool RiuCellAndNncPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eve
|
|||||||
else
|
else
|
||||||
selItem = new RiuGeoMechSelectionItem( associatedGridView,
|
selItem = new RiuGeoMechSelectionItem( associatedGridView,
|
||||||
geomResDef,
|
geomResDef,
|
||||||
timestepIndex,
|
static_cast<int>( timestepIndex ),
|
||||||
dataFrameIndex,
|
dataFrameIndex,
|
||||||
gridIndex,
|
gridIndex,
|
||||||
gridLocalCellIndex,
|
gridLocalCellIndex,
|
||||||
|
@@ -158,7 +158,11 @@ void RiuFemTimeHistoryResultAccessor::computeTimeHistoryData()
|
|||||||
const int frameCount = femPartResultsColl->frameCount( stepIdx );
|
const int frameCount = femPartResultsColl->frameCount( stepIdx );
|
||||||
for ( int frameIdx = 0; frameIdx < frameCount; frameIdx++ )
|
for ( int frameIdx = 0; frameIdx < frameCount; frameIdx++ )
|
||||||
{
|
{
|
||||||
RiuGeoMechXfTensorResultAccessor stressXfAccessor( femPartResultsColl, *m_femResultAddress, m_gridIndex, stepIdx, frameIdx );
|
RiuGeoMechXfTensorResultAccessor stressXfAccessor( femPartResultsColl,
|
||||||
|
*m_femResultAddress,
|
||||||
|
static_cast<int>( m_gridIndex ),
|
||||||
|
stepIdx,
|
||||||
|
frameIdx );
|
||||||
float scalarValue = stressXfAccessor.calculateElmNodeValue( m_intersectionTriangle, closestElmNodeResIndex );
|
float scalarValue = stressXfAccessor.calculateElmNodeValue( m_intersectionTriangle, closestElmNodeResIndex );
|
||||||
m_timeHistoryValues.push_back( scalarValue );
|
m_timeHistoryValues.push_back( scalarValue );
|
||||||
}
|
}
|
||||||
|
@@ -72,7 +72,7 @@ std::list<QMdiSubWindow*> RiuMdiArea::subWindowListSortedByPosition()
|
|||||||
// Sort of list so we first sort by window position but retain activation order
|
// Sort of list so we first sort by window position but retain activation order
|
||||||
// for windows with the same position
|
// for windows with the same position
|
||||||
windowList.sort(
|
windowList.sort(
|
||||||
[this]( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
|
[]( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
|
||||||
{
|
{
|
||||||
if ( lhs->frameGeometry().topLeft().rx() == rhs->frameGeometry().topLeft().rx() )
|
if ( lhs->frameGeometry().topLeft().rx() == rhs->frameGeometry().topLeft().rx() )
|
||||||
{
|
{
|
||||||
@@ -95,7 +95,7 @@ std::list<QMdiSubWindow*> RiuMdiArea::subWindowListSortedByVerticalPosition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
windowList.sort(
|
windowList.sort(
|
||||||
[this]( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
|
[]( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
|
||||||
{
|
{
|
||||||
if ( lhs->frameGeometry().topLeft().ry() == rhs->frameGeometry().topLeft().ry() )
|
if ( lhs->frameGeometry().topLeft().ry() == rhs->frameGeometry().topLeft().ry() )
|
||||||
{
|
{
|
||||||
|
@@ -447,14 +447,15 @@ void RiuSelectionChangedHandler::addDepthCurveFromSelectionItem( const RiuSelect
|
|||||||
|
|
||||||
std::vector<double> resultValues = RigDepthResultAccessor::resultValues( casedata,
|
std::vector<double> resultValues = RigDepthResultAccessor::resultValues( casedata,
|
||||||
eclResDef,
|
eclResDef,
|
||||||
eclipseSelectionItem->m_gridIndex,
|
static_cast<int>( eclipseSelectionItem->m_gridIndex ),
|
||||||
eclipseSelectionItem->m_gridLocalCellIndex,
|
eclipseSelectionItem->m_gridLocalCellIndex,
|
||||||
currentTimeStep );
|
currentTimeStep );
|
||||||
|
|
||||||
std::vector<int> kValues = RigDepthResultAccessor::kValues( casedata, eclipseSelectionItem->m_gridIndex );
|
std::vector<int> kValues = RigDepthResultAccessor::kValues( casedata, static_cast<int>( eclipseSelectionItem->m_gridIndex ) );
|
||||||
|
|
||||||
std::vector<double> depthValues =
|
std::vector<double> depthValues = RigDepthResultAccessor::depthValues( casedata,
|
||||||
RigDepthResultAccessor::depthValues( casedata, eclipseSelectionItem->m_gridLocalCellIndex, eclipseSelectionItem->m_gridIndex );
|
static_cast<int>( eclipseSelectionItem->m_gridLocalCellIndex ),
|
||||||
|
static_cast<int>( eclipseSelectionItem->m_gridIndex ) );
|
||||||
|
|
||||||
CVF_ASSERT( kValues.size() == resultValues.size() );
|
CVF_ASSERT( kValues.size() == resultValues.size() );
|
||||||
|
|
||||||
|
@@ -95,67 +95,67 @@ SummaryIdentifierAndField::~SummaryIdentifierAndField()
|
|||||||
RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
|
RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
|
||||||
: m_identifierFieldsMap( {
|
: m_identifierFieldsMap( {
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_FIELD,
|
{ RifEclipseSummaryAddress::SUMMARY_FIELD,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_AQUIFER,
|
{ RifEclipseSummaryAddress::SUMMARY_AQUIFER,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_NETWORK,
|
{ RifEclipseSummaryAddress::SUMMARY_NETWORK,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_MISC,
|
{ RifEclipseSummaryAddress::SUMMARY_MISC,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_REGION,
|
{ RifEclipseSummaryAddress::SUMMARY_REGION,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_NUMBER ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_NUMBER ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION,
|
{ RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_2_REGION ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_2_REGION ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_GROUP,
|
{ RifEclipseSummaryAddress::SUMMARY_GROUP,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_GROUP_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_GROUP_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_WELL,
|
{ RifEclipseSummaryAddress::SUMMARY_WELL,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION,
|
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR,
|
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_LGR,
|
{ RifEclipseSummaryAddress::SUMMARY_WELL_LGR,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT,
|
{ RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_BLOCK,
|
{ RifEclipseSummaryAddress::SUMMARY_BLOCK,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR,
|
{ RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
{ RifEclipseSummaryAddress::SUMMARY_IMPORTED,
|
{ RifEclipseSummaryAddress::SUMMARY_IMPORTED,
|
||||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) },
|
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } } },
|
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||||
|
|
||||||
} )
|
} )
|
||||||
, m_showIndividualEnsembleCases( true )
|
, m_showIndividualEnsembleCases( true )
|
||||||
|
@@ -437,7 +437,10 @@ endif()
|
|||||||
add_subdirectory(ThirdParty/qwt)
|
add_subdirectory(ThirdParty/qwt)
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
target_compile_options(qwt PRIVATE -Wno-deprecated-copy)
|
target_compile_options(
|
||||||
|
qwt PRIVATE -Wno-deprecated-copy -Wno-deprecated-enum-float-conversion
|
||||||
|
-Wno-deprecated-enum-enum-conversion
|
||||||
|
)
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
target_compile_options(qwt PRIVATE /wd4996 /wd4005)
|
target_compile_options(qwt PRIVATE /wd4996 /wd4005)
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
@@ -22,6 +22,12 @@ add_executable(
|
|||||||
cafPdmScriptingBasicTest.cpp
|
cafPdmScriptingBasicTest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
target_compile_options(
|
||||||
|
cafPdmScripting_UnitTests PRIVATE -Wno-delete-abstract-non-virtual-dtor
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${PROJECT_NAME} cafPdmScripting ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
${PROJECT_NAME} cafPdmScripting ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||||
)
|
)
|
||||||
|
@@ -37,6 +37,14 @@ set(PROJECT_FILES
|
|||||||
# add the executable
|
# add the executable
|
||||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
|
||||||
|
target_compile_options(
|
||||||
|
cafPdmCore_UnitTests PRIVATE -Wno-ambiguous-reversed-operator
|
||||||
|
-Wno-invalid-source-encoding
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
source_group("" FILES ${PROJECT_FILES})
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|
||||||
if(Qt5Core_FOUND)
|
if(Qt5Core_FOUND)
|
||||||
|
@@ -26,6 +26,13 @@ set(PROJECT_FILES cafPdmBasicTest.cpp cafProjectDataModel_UnitTests.cpp
|
|||||||
# add the executable
|
# add the executable
|
||||||
add_executable(${PROJECT_NAME} ${PROJECT_FILES} gtest/gtest-all.cpp)
|
add_executable(${PROJECT_NAME} ${PROJECT_FILES} gtest/gtest-all.cpp)
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
target_compile_options(
|
||||||
|
cafProjectDataModel_UnitTests PRIVATE -Wno-ambiguous-reversed-operator
|
||||||
|
-Wno-invalid-source-encoding
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${PROJECT_NAME} cafProjectDataModel ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
${PROJECT_NAME} cafProjectDataModel ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
||||||
)
|
)
|
||||||
|
@@ -30,7 +30,9 @@ public:
|
|||||||
caf::PdmField<std::vector<cvf::Vec3d>> m_vecArrayField;
|
caf::PdmField<std::vector<cvf::Vec3d>> m_vecArrayField;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute );
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||||
|
QString uiConfigName,
|
||||||
|
caf::PdmUiEditorAttribute* attribute ) override;
|
||||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||||
};
|
};
|
||||||
|
@@ -45,6 +45,5 @@ template<> Vector2<double> const Vector2<double>::UNDEFINED(UNDEFINED_DOUBLE, UN
|
|||||||
template<> Vector2<float> const Vector2<float>::UNDEFINED(UNDEFINED_FLOAT, UNDEFINED_FLOAT);
|
template<> Vector2<float> const Vector2<float>::UNDEFINED(UNDEFINED_FLOAT, UNDEFINED_FLOAT);
|
||||||
template<> Vector2<int> const Vector2<int>::UNDEFINED(UNDEFINED_INT, UNDEFINED_INT);
|
template<> Vector2<int> const Vector2<int>::UNDEFINED(UNDEFINED_INT, UNDEFINED_INT);
|
||||||
|
|
||||||
|
|
||||||
} // namespace cvf
|
} // namespace cvf
|
||||||
|
|
||||||
|
@@ -113,21 +113,6 @@ TEST(ObjectTest, AddRefAndRelease)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
#if CVF_ENABLE_TIGHT_ASSERTS == 1
|
|
||||||
TEST(ObjectDeathTest, AddRefAndReleaseBehaviorOnNullPointer)
|
|
||||||
{
|
|
||||||
Object* obj = NULL;
|
|
||||||
|
|
||||||
EXPECT_DEATH(obj->addRef(), "Assertion");
|
|
||||||
EXPECT_DEATH(obj->refCount(), "Assertion");
|
|
||||||
|
|
||||||
// Release is OK on NULL pointer
|
|
||||||
EXPECT_EQ(0, obj->release());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -606,18 +606,10 @@ TEST(StringTest, Number)
|
|||||||
EXPECT_STREQ("1.234", s1.toAscii().ptr());
|
EXPECT_STREQ("1.234", s1.toAscii().ptr());
|
||||||
EXPECT_STREQ("-123000", s2.toAscii().ptr());
|
EXPECT_STREQ("-123000", s2.toAscii().ptr());
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
EXPECT_STREQ("5.4e+013", s3.toAscii().ptr());
|
|
||||||
#else
|
|
||||||
EXPECT_STREQ("5.4e+13", s3.toAscii().ptr());
|
EXPECT_STREQ("5.4e+13", s3.toAscii().ptr());
|
||||||
#endif
|
|
||||||
|
|
||||||
String s4 = String::number(-1.2375e5f, 'e', 2);
|
String s4 = String::number(-1.2375e5f, 'e', 2);
|
||||||
#ifdef WIN32
|
|
||||||
EXPECT_STREQ("-1.24e+005", s4.toAscii().ptr());
|
|
||||||
#else
|
|
||||||
EXPECT_STREQ("-1.24e+05", s4.toAscii().ptr());
|
EXPECT_STREQ("-1.24e+05", s4.toAscii().ptr());
|
||||||
#endif
|
|
||||||
|
|
||||||
String s5 = String::number(-1.2375e5f, 'f', 2);
|
String s5 = String::number(-1.2375e5f, 'f', 2);
|
||||||
EXPECT_STREQ("-123750.00", s5.toAscii().ptr());
|
EXPECT_STREQ("-123750.00", s5.toAscii().ptr());
|
||||||
@@ -633,19 +625,11 @@ TEST(StringTest, Number)
|
|||||||
EXPECT_STREQ("1.234", s11.toAscii().ptr());
|
EXPECT_STREQ("1.234", s11.toAscii().ptr());
|
||||||
EXPECT_STREQ("-123000", s12.toAscii().ptr());
|
EXPECT_STREQ("-123000", s12.toAscii().ptr());
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
EXPECT_STREQ("5.4e+013", s13.toAscii().ptr());
|
|
||||||
#else
|
|
||||||
EXPECT_STREQ("5.4e+13", s13.toAscii().ptr());
|
EXPECT_STREQ("5.4e+13", s13.toAscii().ptr());
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
String s14 = String::number(-1.2375e5, 'e', 2);
|
String s14 = String::number(-1.2375e5, 'e', 2);
|
||||||
#ifdef WIN32
|
|
||||||
EXPECT_STREQ("-1.24e+005", s14.toAscii().ptr());
|
|
||||||
#else
|
|
||||||
EXPECT_STREQ("-1.24e+05", s14.toAscii().ptr());
|
EXPECT_STREQ("-1.24e+05", s14.toAscii().ptr());
|
||||||
#endif
|
|
||||||
|
|
||||||
String s15 = String::number(-1.2375e5, 'f', 2);
|
String s15 = String::number(-1.2375e5, 'f', 2);
|
||||||
EXPECT_STREQ("-123750.00", s15.toAscii().ptr());
|
EXPECT_STREQ("-123750.00", s15.toAscii().ptr());
|
||||||
@@ -975,11 +959,7 @@ TEST(StringTest, StringBuilding)
|
|||||||
s11 += String(dfps);
|
s11 += String(dfps);
|
||||||
s11 += " (fps)";
|
s11 += " (fps)";
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
EXPECT_STREQ("Framerate: 1.23457e+014 (fps)", s11.toAscii().ptr());
|
|
||||||
#else
|
|
||||||
EXPECT_STREQ("Framerate: 1.23457e+14 (fps)", s11.toAscii().ptr());
|
EXPECT_STREQ("Framerate: 1.23457e+14 (fps)", s11.toAscii().ptr());
|
||||||
#endif
|
|
||||||
|
|
||||||
String s13 = "Framerate: " + String::number(dfps, 'f', 1) + " (fps)";
|
String s13 = "Framerate: " + String::number(dfps, 'f', 1) + " (fps)";
|
||||||
EXPECT_STREQ("Framerate: 123456789012345.6 (fps)", s13.toAscii().ptr());
|
EXPECT_STREQ("Framerate: 123456789012345.6 (fps)", s13.toAscii().ptr());
|
||||||
|
Reference in New Issue
Block a user