Whitespace

This commit is contained in:
Magne Sjaastad 2018-10-24 13:13:45 +02:00
parent 71d9f742d9
commit 45531865ba
3 changed files with 117 additions and 131 deletions

View File

@ -35,29 +35,29 @@
#include "RimDialogData.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimWellPath.h"
#include "RimProject.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RimWellPathCompletions.h"
#include "RiuPlotMainWindow.h"
#include "RimPerforationInterval.h"
#include "RimFracture.h"
#include "RimFishbonesMultipleSubs.h"
#include "RimFracture.h"
#include "RimPerforationInterval.h"
#include <QAction>
#include <QFileInfo>
#include <QDir>
#include <QFile>
#include <QTextStream>
#include <QFileInfo>
#include <QMessageBox>
#include <QTextStream>
#include <cafPdmUiPropertyViewDialog.h>
#include <cafSelectionManager.h>
#include <cafSelectionManagerTools.h>
#include <cafVecIjk.h>
#include <cafUtils.h>
#include <cafVecIjk.h>
#include <limits>
@ -103,7 +103,8 @@ RicExportLgrUi* RicExportLgrFeature::openDialog(const QString& dialogTitle, RimE
if (defaultCase) featureUi->setCase(defaultCase);
featureUi->setTimeStep(defaultTimeStep);
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, featureUi, dialogTitle, "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
caf::PdmUiPropertyViewDialog propertyDialog(
nullptr, featureUi, dialogTitle, "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
propertyDialog.resize(QSize(600, 230));
if (propertyDialog.exec() == QDialog::Accepted && !featureUi->exportFolder().isEmpty())
@ -123,8 +124,7 @@ bool RicExportLgrFeature::openFileForExport(const QString& folderName, const QSt
if (!exportFolder.exists())
{
bool createdPath = exportFolder.mkpath(".");
if (createdPath)
RiaLogging::info("Created export folder " + folderName);
if (createdPath) RiaLogging::info("Created export folder " + folderName);
}
QString filePath = exportFolder.filePath(fileName);
@ -151,9 +151,7 @@ void RicExportLgrFeature::exportLgrs(QTextStream& stream, const std::vector<LgrI
{
RifEclipseDataTableFormatter formatter(stream);
formatter.keyword("CARFIN");
formatter.header(
{
RifEclipseOutputTableColumn("Name"),
formatter.header({RifEclipseOutputTableColumn("Name"),
RifEclipseOutputTableColumn("I1"),
RifEclipseOutputTableColumn("I2"),
RifEclipseOutputTableColumn("J1"),
@ -162,9 +160,7 @@ void RicExportLgrFeature::exportLgrs(QTextStream& stream, const std::vector<LgrI
RifEclipseOutputTableColumn("K2"),
RifEclipseOutputTableColumn("NX"),
RifEclipseOutputTableColumn("NY"),
RifEclipseOutputTableColumn("NZ")
}
);
RifEclipseOutputTableColumn("NZ")});
formatter.add(lgrInfo.name);
formatter.addOneBasedCellIndex(lgrInfo.mainGridStartCell.i());
@ -202,11 +198,7 @@ void RicExportLgrFeature::exportLgrsForWellPath(const QString& exportFolder,
try
{
lgrs = buildLgrsForWellPath(wellPath,
eclipseCase,
timeStep,
lgrCellCounts,
splitType);
lgrs = buildLgrsForWellPath(wellPath, eclipseCase, timeStep, lgrCellCounts, splitType);
// Export
QFile file;
@ -304,7 +296,8 @@ std::vector<LgrInfo> RicExportLgrFeature::buildLgrsPerMainCell(RimEclipseCase* e
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<LgrInfo> RicExportLgrFeature::buildLgrsPerCompletion(RimEclipseCase* eclipseCase,
std::vector<LgrInfo> RicExportLgrFeature::buildLgrsPerCompletion(
RimEclipseCase* eclipseCase,
const std::map<CompletionInfo, std::vector<RigCompletionDataGridCell>>& intersectingCells,
const caf::VecIjk& lgrSizesPerMainGridCell)
{
@ -356,9 +349,7 @@ LgrInfo RicExportLgrFeature::buildLgr(int lgrId,
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionDataGridCell>
RicExportLgrFeature::cellsIntersectingCompletions(RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
size_t timeStep)
RicExportLgrFeature::cellsIntersectingCompletions(RimEclipseCase* eclipseCase, const RimWellPath* wellPath, size_t timeStep)
{
std::vector<RigCompletionDataGridCell> cells;
@ -457,7 +448,8 @@ void RicExportLgrFeature::onActionTriggered(bool isChecked)
{
try
{
exportLgrsForWellPath(dialogData->exportFolder(), wellPath, eclipseCase, timeStep, lgrCellCounts, dialogData->splitType());
exportLgrsForWellPath(
dialogData->exportFolder(), wellPath, eclipseCase, timeStep, lgrCellCounts, dialogData->splitType());
}
catch (CreateLgrException e)
{
@ -467,7 +459,9 @@ void RicExportLgrFeature::onActionTriggered(bool isChecked)
if (intersectsExistingLgr)
{
QMessageBox::warning(nullptr, "LGR cells intersected", "At least one completion intersects with an LGR. No output for those completions produced");
QMessageBox::warning(nullptr,
"LGR cells intersected",
"At least one completion intersects with an LGR. No output for those completions produced");
}
}
}
@ -516,8 +510,7 @@ bool RicExportLgrFeature::containsAnyNonMainGridCells(
//--------------------------------------------------------------------------------------------------
bool RicExportLgrFeature::containsAnyNonMainGridCells(const std::vector<RigCompletionDataGridCell>& cells)
{
return std::find_if(cells.begin(), cells.end(), [](const RigCompletionDataGridCell& cell)
{
return std::find_if(cells.begin(), cells.end(), [](const RigCompletionDataGridCell& cell) {
return !cell.isMainGridCell();
}) != cells.end();
}

View File

@ -18,15 +18,16 @@
#pragma once
#include "RigCompletionDataGridCell.h"
#include "RigCompletionData.h"
#include "RigCompletionDataGridCell.h"
#include "RicExportLgrUi.h"
#include "cafCmdFeature.h"
#include <cafVecIjk.h>
#include <memory>
#include "cafVecIjk.h"
#include <limits>
#include <memory>
class RimEclipseCase;
class RimSimWellInView;

View File

@ -23,51 +23,50 @@
#include "RiaLogging.h"
#include "CompletionExportCommands/RicWellPathExportCompletionDataFeature.h"
#include "ExportCommands/RicExportLgrUi.h"
#include "ExportCommands/RicExportLgrFeature.h"
#include "ExportCommands/RicExportLgrUi.h"
#include "RifEclipseDataTableFormatter.h"
#include "RigActiveCellInfo.h"
#include "RigCaseCellResultsData.h"
#include "RigCellGeometryTools.h"
#include "RigEclipseCaseData.h"
#include "RigMainGrid.h"
#include "RigResultAccessor.h"
#include "RigResultAccessorFactory.h"
#include "RigVirtualPerforationTransmissibilities.h"
#include "RigCellGeometryTools.h"
#include "RimDialogData.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimWellPath.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
#include "RimWellLogPlotCollection.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RimWellPathCompletions.h"
#include "RimMainPlotCollection.h"
#include "RimWellLogPlotCollection.h"
#include "RiuPlotMainWindow.h"
#include <QAction>
#include <QFileInfo>
#include <QDir>
#include <QFile>
#include <QTextStream>
#include <QFileInfo>
#include <QMessageBox>
#include <QTextStream>
#include <cafPdmUiPropertyViewDialog.h>
#include <cafSelectionManager.h>
#include <cafSelectionManagerTools.h>
#include <cafVecIjk.h>
#include <cafUtils.h>
#include <cafVecIjk.h>
#include <limits>
#include <algorithm>
#include <limits>
CAF_CMD_SOURCE_INIT(RicCreateTemporaryLgrFeature, "RicCreateTemporaryLgrFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -117,11 +116,7 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
try
{
lgrs = RicExportLgrFeature::buildLgrsForWellPath(wellPath,
eclipseCase,
timeStep,
lgrCellCounts,
splitType);
lgrs = RicExportLgrFeature::buildLgrsForWellPath(wellPath, eclipseCase, timeStep, lgrCellCounts, splitType);
auto mainGrid = eclipseCase->eclipseCaseData()->mainGrid();
@ -230,16 +225,15 @@ void RicCreateTemporaryLgrFeature::createLgr(LgrInfo& lgrInfo, RigMainGrid* main
mainGrid->cellCornerVertices(mainCellIndex, vertices.data());
auto cellCounts = lgrInfo.sizesPerMainGridCell();
auto lgrCoords = RigCellGeometryTools::createHexCornerCoords(vertices,
cellCounts.i(),
cellCounts.j(),
cellCounts.k());
auto lgrCoords =
RigCellGeometryTools::createHexCornerCoords(vertices, cellCounts.i(), cellCounts.j(), cellCounts.k());
size_t subI = lgrI % lgrSizePerMainCell.i();
size_t subJ = lgrJ % lgrSizePerMainCell.j();
size_t subK = lgrK % lgrSizePerMainCell.k();
size_t subIndex = subI + subJ * lgrSizePerMainCell.i() + subK * lgrSizePerMainCell.i() * lgrSizePerMainCell.j();
size_t subIndex =
subI + subJ * lgrSizePerMainCell.i() + subK * lgrSizePerMainCell.i() * lgrSizePerMainCell.j();
for (cIdx = 0; cIdx < 8; ++cIdx)
{
@ -309,7 +303,6 @@ void RicCreateTemporaryLgrFeature::computeCachedData(RimEclipseCase* eclipseCase
cellResultsDataFracture->computeDepthRelatedResults();
}
}
}
//--------------------------------------------------------------------------------------------------
@ -335,8 +328,7 @@ std::vector<RimWellPath*> RicCreateTemporaryLgrFeature::selectedWellPaths()
//--------------------------------------------------------------------------------------------------
bool RicCreateTemporaryLgrFeature::containsAnyNonMainGridCells(const std::vector<RigCompletionDataGridCell>& cells)
{
return std::find_if(cells.begin(), cells.end(), [](const RigCompletionDataGridCell& cell)
{
return std::find_if(cells.begin(), cells.end(), [](const RigCompletionDataGridCell& cell) {
return !cell.isMainGridCell();
}) != cells.end();
}