Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into grid-geometry-extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenherje committed Mar 14, 2024
2 parents ae6131e + b595487 commit 7ca4bd7
Show file tree
Hide file tree
Showing 205 changed files with 2,456 additions and 651 deletions.
1 change: 1 addition & 0 deletions ApplicationExeCode/Resources/ResInsight.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@
<file>decline-curve.svg</file>
<file>regression-curve.svg</file>
<file>padlock.svg</file>
<file>warning.svg</file>
</qresource>
<qresource prefix="/Shader">
<file>fs_CellFace.glsl</file>
Expand Down
2 changes: 2 additions & 0 deletions ApplicationExeCode/Resources/warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ApplicationExeCode/RiaGrpcConsoleApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RiaGrpcConsoleApplication::RiaGrpcConsoleApplication( int& argc, char** argv )
{
m_idleTimer = new QTimer( this );
connect( m_idleTimer, SIGNAL( timeout() ), this, SLOT( doIdleProcessing() ) );
m_idleTimer->start( 0 );
m_idleTimer->start( 5 );
}

//--------------------------------------------------------------------------------------------------
Expand Down
11 changes: 5 additions & 6 deletions ApplicationLibCode/Application/RiaApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@

#include "RiaDefines.h"

#include "cafPdmField.h"
#include "cafPdmObject.h"

#include "cvfFont.h"
#include "cafPdmPointer.h"
#include "cvfObject.h"

#include <QEventLoop>
#include <QMap>
#include <QMutex>
#include <QPointer>
#include <QProcess>
Expand All @@ -35,7 +34,6 @@

#include <gsl/gsl>

#include <iostream>
#include <memory>

class QAction;
Expand Down Expand Up @@ -79,7 +77,8 @@ class UiProcess;
namespace cvf
{
class ProgramOptions;
}
class Font;
} // namespace cvf

//==================================================================================================
/// Base class for all ResInsight applications. I.e. console and GUI
Expand Down
2 changes: 2 additions & 0 deletions ApplicationLibCode/Application/RiaFontCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@

#include "RiaGuiApplication.h"

#include "cafAssert.h"
#include "cafFixedAtlasFont.h"

#include <QDesktopWidget>

#include <cmath>

//--------------------------------------------------------------------------------------------------
Expand Down
5 changes: 0 additions & 5 deletions ApplicationLibCode/Application/RiaGuiApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
#include "RiaApplication.h"
#include "RiaDefines.h"

#include "cafPdmField.h"
#include "cafPdmObject.h"

#include "cvfObject.h"

#include <QApplication>
#include <QMutex>
#include <QPointer>
Expand Down
1 change: 1 addition & 0 deletions ApplicationLibCode/Application/RiaPreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "cafPdmUiFilePathEditor.h"
#include "cafPdmUiLineEditor.h"

#include <QCoreApplication>
#include <QDate>
#include <QDir>
#include <QLocale>
Expand Down
24 changes: 15 additions & 9 deletions ApplicationLibCode/Application/Tools/RiaEclipseUnitTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,32 @@ double RiaEclipseUnitTools::darcysConstant( RiaDefines::EclipseUnitSystem unitSy

//--------------------------------------------------------------------------------------------------
/// Convert Gas to oil equivalents
/// If field unit, the Gas is in Mega ft^3 while the others are in [stb] (barrel)
/// If field unit, the Gas is in Mft^3(=1000ft^3) while the others are in [stb] (barrel)
//--------------------------------------------------------------------------------------------------
double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( RiaDefines::EclipseUnitSystem caseUnitSystem, double eclGasFlowRate )
{
/// Unused Gas to Barrel conversion :
/// we convert gas to stb as well. Based on
/// 1 [stb] = 0.15898729492800007 [m^3]
/// 1 [ft] = 0.3048 [m]
/// megaFt3ToStbFactor = 1.0 / (1.0e-6 * 0.15898729492800007 * ( 1.0 / 0.3048 )^3 )
/// double megaFt3ToStbFactor = 178107.60668;
///
/// NB Mft^3 = 1000 ft^3 - can wrongly be interpreted as M for Mega in metric units

double fieldGasToOilEquivalent = 1.0e6 / 5800; // Mega ft^3 to BOE
double metricGasToOilEquivalent = 1.0 / 1.0e3; // Sm^3 Gas to Sm^3 oe
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
{
const double fieldGasToOilEquivalent = 1000.0 / 5614.63;

double oilEquivalentGasRate = HUGE_VAL;
return fieldGasToOilEquivalent * eclGasFlowRate;
}

if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD ) oilEquivalentGasRate = fieldGasToOilEquivalent * eclGasFlowRate;
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC ) oilEquivalentGasRate = metricGasToOilEquivalent * eclGasFlowRate;
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
{
double metricGasToOilEquivalent = 1.0 / 1000.0; // Sm^3 Gas to Sm^3 oe

return metricGasToOilEquivalent * eclGasFlowRate;
}

return oilEquivalentGasRate;
return HUGE_VAL;
}

//--------------------------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ApplicationLibCode/Application/Tools/RiaStdStringTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "fast_float/include/fast_float/fast_float.h"

#include <cctype>
#include <charconv>
#include <regex>
#include <sstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "cafUtils.h"

#include <QAction>
#include <QApplication>
#include <QDebug>
#include <QDir>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include "cafPdmUiCheckBoxEditor.h"
#include "cafPdmUiFilePathEditor.h"
#include "cafPdmUiOrdering.h"
#include "cafPdmUiTreeSelectionEditor.h"

CAF_PDM_SOURCE_INIT( RicCreateDepthAdjustedLasFilesUi, "RicCreateDepthAdjustedLasFilesUi" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "cafPdmUiFilePathEditor.h"
#include "cafPdmUiGroup.h"
#include "cafPdmUiLineEditor.h"
#include "cafPdmUiOrdering.h"
#include "cafPdmUiTreeSelectionEditor.h"

#include <QDir>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "cafPdmUiCheckBoxEditor.h"
#include "cafPdmUiFilePathEditor.h"
#include "cafPdmUiOrdering.h"

#include <cmath>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "RimProject.h"

#include "cafPdmUiFilePathEditor.h"
#include "cafPdmUiOrdering.h"

CAF_PDM_SOURCE_INIT( RicExportWellPathsUi, "RicExportWellPathsUi" );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "RiaPreferences.h"

#include "cafPdmUiFilePathEditor.h"
#include "cafPdmUiOrdering.h"

#include <QDir>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "RicHoloLensServerSettings.h"

#include "cafPdmSettings.h"
#include "cafPdmUiOrdering.h"

#include "cvfAssert.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "RimProject.h"

#include "cafPdmUiFilePathEditor.h"
#include "cafPdmUiOrdering.h"

CAF_PDM_SOURCE_INIT( RicHoloLensExportToFolderUi, "RicHoloLensExportToFolderUi" );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,25 @@
#include "RicMeasurementPickEventHandler.h"

#include "RiaApplication.h"
#include "RiuViewer.h"
#include "RiuViewerCommands.h"

#include "Rim3dView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimMeasurement.h"
#include "RimProject.h"

#include "cafDisplayCoordTransform.h"
#include "cafSelectionManager.h"
#include "RiuViewer.h"
#include "RiuViewerCommands.h"

#include "RivPartPriority.h"

#include "cafDisplayCoordTransform.h"
#include "cafSelectionManager.h"

#include "cvfPart.h"

#include <QApplication>

#include <vector>

//--------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "cafPdmObjectHandle.h"

#include <QAction>
#include <QApplication>
#include <QClipboard>
#include <QString>

Expand Down
18 changes: 14 additions & 4 deletions ApplicationLibCode/Commands/PolygonCommands/CMakeLists_files.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFileFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicCreatePolygonFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicImportPolygonFileFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicReloadPolygonFileFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicDuplicatePolygonFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicExportPolygonCsvFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicExportPolygonPolFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicSimplifyPolygonFeature.h
)

set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFileFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreatePolygonFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicImportPolygonFileFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicReloadPolygonFileFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicDuplicatePolygonFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicExportPolygonCsvFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicExportPolygonPolFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSimplifyPolygonFeature.cpp
)

list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,45 @@
//
/////////////////////////////////////////////////////////////////////////////////

#include "RicNewPolygonFeature.h"
#include "RicCreatePolygonFeature.h"

#include "RiaApplication.h"

#include "Polygons/RimPolygon.h"
#include "Polygons/RimPolygonCollection.h"
#include "Polygons/RimPolygonTools.h"
#include "Rim3dView.h"
#include "RimOilField.h"
#include "RimProject.h"

#include "RiuPlotMainWindowTools.h"
#include "Riu3DMainWindowTools.h"

#include <QAction>

CAF_CMD_SOURCE_INIT( RicNewPolygonFeature, "RicNewPolygonFeature" );
CAF_CMD_SOURCE_INIT( RicCreatePolygonFeature, "RicCreatePolygonFeature" );

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewPolygonFeature::onActionTriggered( bool isChecked )
void RicCreatePolygonFeature::onActionTriggered( bool isChecked )
{
auto proj = RimProject::current();
auto polygonCollection = proj->activeOilField()->polygonCollection();

auto newPolygon = polygonCollection->appendUserDefinedPolygon();
polygonCollection->uiCapability()->updateAllRequiredEditors();

RiuPlotMainWindowTools::setExpanded( newPolygon );
RiuPlotMainWindowTools::selectAsCurrentItem( newPolygon );
Riu3DMainWindowTools::setExpanded( newPolygon );

auto activeView = RiaApplication::instance()->activeReservoirView();
RimPolygonTools::activate3dEditOfPolygonInView( newPolygon, activeView );
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewPolygonFeature::setupActionLook( QAction* actionToSetup )
void RicCreatePolygonFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "New Polygon" );
actionToSetup->setText( "Create Polygon" );
actionToSetup->setIcon( QIcon( ":/PolylinesFromFile16x16.png" ) );
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//==================================================================================================
///
//==================================================================================================
class RicNewPolygonFeature : public caf::CmdFeature
class RicCreatePolygonFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;

Expand Down
Loading

0 comments on commit 7ca4bd7

Please sign in to comment.