mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 12:10:57 -06:00
Header and white space cleanup
This commit is contained in:
parent
7813527a33
commit
4a07398871
@ -85,10 +85,9 @@ bool RicCreateTemporaryLgrFeature::isCommandEnabled()
|
||||
void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
std::vector<RimWellPath*> wellPaths = RicExportLgrFeature::selectedWellPaths();
|
||||
if(wellPaths.size() == 0) return;
|
||||
if (wellPaths.empty()) return;
|
||||
|
||||
std::vector<RimSimWellInView*> simWells;
|
||||
QString dialogTitle = "Create Temporary LGR";
|
||||
QString dialogTitle = "Create Temporary LGR";
|
||||
|
||||
RimEclipseCase* defaultEclipseCase = nullptr;
|
||||
int defaultTimeStep = 0;
|
||||
@ -102,11 +101,11 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
|
||||
auto dialogData = RicExportLgrFeature::openDialog(dialogTitle, defaultEclipseCase, defaultTimeStep, true);
|
||||
if (dialogData)
|
||||
{
|
||||
auto eclipseCase = dialogData->caseToApply();
|
||||
auto lgrCellCounts = dialogData->lgrCellCount();
|
||||
size_t timeStep = dialogData->timeStep();
|
||||
auto splitType = dialogData->splitType();
|
||||
auto completionTypes = dialogData->completionTypes();
|
||||
auto eclipseCase = dialogData->caseToApply();
|
||||
auto lgrCellCounts = dialogData->lgrCellCount();
|
||||
size_t timeStep = dialogData->timeStep();
|
||||
auto splitType = dialogData->splitType();
|
||||
auto completionTypes = dialogData->completionTypes();
|
||||
|
||||
auto eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
RigActiveCellInfo* activeCellInfo = eclipseCaseData->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
||||
@ -115,16 +114,10 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
|
||||
bool intersectsExistingLgr = false;
|
||||
for (const auto& wellPath : wellPaths)
|
||||
{
|
||||
std::vector<LgrInfo> lgrs;
|
||||
|
||||
try
|
||||
{
|
||||
lgrs = RicExportLgrFeature::buildLgrsForWellPath(wellPath,
|
||||
eclipseCase,
|
||||
timeStep,
|
||||
lgrCellCounts,
|
||||
splitType,
|
||||
completionTypes);
|
||||
std::vector<LgrInfo> lgrs = RicExportLgrFeature::buildLgrsForWellPath(
|
||||
wellPath, eclipseCase, timeStep, lgrCellCounts, splitType, completionTypes);
|
||||
|
||||
auto mainGrid = eclipseCase->eclipseCaseData()->mainGrid();
|
||||
|
||||
@ -143,8 +136,10 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
mainGrid->calculateFaults(activeCellInfo, true);
|
||||
}
|
||||
catch (CreateLgrException e)
|
||||
catch (CreateLgrException& e)
|
||||
{
|
||||
RiaLogging::error(e.message);
|
||||
|
||||
intersectsExistingLgr = true;
|
||||
}
|
||||
}
|
||||
@ -189,7 +184,7 @@ void RicCreateTemporaryLgrFeature::setupActionLook(QAction* actionToSetup)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Todo: Guarding, caching LGR corner nodes calculations
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicCreateTemporaryLgrFeature::createLgr(LgrInfo& lgrInfo, RigMainGrid* mainGrid)
|
||||
void RicCreateTemporaryLgrFeature::createLgr(const LgrInfo& lgrInfo, RigMainGrid* mainGrid)
|
||||
{
|
||||
auto app = RiaApplication::instance();
|
||||
auto eclipseView = dynamic_cast<RimEclipseView*>(app->activeReservoirView());
|
||||
|
@ -19,10 +19,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "RigCompletionDataGridCell.h"
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
#include <cafVecIjk.h>
|
||||
#include <memory>
|
||||
#include "cafVecIjk.h"
|
||||
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
class LgrInfo;
|
||||
class RigMainGrid;
|
||||
@ -33,7 +35,6 @@ class RicExportLgrUi;
|
||||
class QFile;
|
||||
class QTextStream;
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@ -42,13 +43,13 @@ class RicCreateTemporaryLgrFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
virtual bool isCommandEnabled() override;
|
||||
virtual void onActionTriggered(bool isChecked) override;
|
||||
virtual void setupActionLook(QAction* actionToSetup) override;
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered(bool isChecked) override;
|
||||
void setupActionLook(QAction* actionToSetup) override;
|
||||
|
||||
private:
|
||||
static void createLgr(LgrInfo& lgrInfo, RigMainGrid* mainGrid);
|
||||
static void computeCachedData(RimEclipseCase* eclipseCase);
|
||||
static void createLgr(const LgrInfo& lgrInfo, RigMainGrid* mainGrid);
|
||||
static void computeCachedData(RimEclipseCase* eclipseCase);
|
||||
static void deleteAllCachedData(RimEclipseCase* eclipseCase);
|
||||
static bool containsAnyNonMainGridCells(const std::vector<RigCompletionDataGridCell>& cells);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user