mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
#3568 Temp LGR. Move splitType to separate header file
This commit is contained in:
parent
202033b684
commit
080b8506cd
@ -53,7 +53,7 @@ RicfExportLgrForCompletions::RicfExportLgrForCompletions()
|
||||
RICF_InitField(&m_refinementI, "refinementI", -1, "RefinementI", "", "", "");
|
||||
RICF_InitField(&m_refinementJ, "refinementJ", -1, "RefinementJ", "", "", "");
|
||||
RICF_InitField(&m_refinementK, "refinementK", -1, "RefinementK", "", "", "");
|
||||
RICF_InitField(&m_splitType, "splitType", LgrSplitType(), "SplitType", "", "", "");
|
||||
RICF_InitField(&m_splitType, "splitType", Lgr::SplitTypeEnum(), "SplitType", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -37,7 +37,7 @@ class RicfExportLgrForCompletions : public RicfCommandObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
typedef caf::AppEnum<RicExportLgrUi::SplitType> LgrSplitType;
|
||||
// typedef caf::AppEnum<Lgr::SplitType> LgrSplitType;
|
||||
|
||||
public:
|
||||
RicfExportLgrForCompletions();
|
||||
@ -51,5 +51,5 @@ private:
|
||||
caf::PdmField<int> m_refinementI;
|
||||
caf::PdmField<int> m_refinementJ;
|
||||
caf::PdmField<int> m_refinementK;
|
||||
caf::PdmField<LgrSplitType> m_splitType;
|
||||
caf::PdmField<Lgr::SplitTypeEnum> m_splitType;
|
||||
};
|
||||
|
@ -22,6 +22,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicExportWellPathsUi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportLgrFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportLgrUi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicEclipseCellResultToFileImpl.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicLgrSplitType.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
|
@ -256,7 +256,7 @@ void RicExportLgrFeature::exportLgrsForWellPath(const QString& export
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStep,
|
||||
caf::VecIjk lgrCellCounts,
|
||||
RicExportLgrUi::SplitType splitType,
|
||||
Lgr::SplitType splitType,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
bool* intersectingOtherLgrs)
|
||||
{
|
||||
@ -288,23 +288,23 @@ std::vector<LgrInfo> RicExportLgrFeature::buildLgrsForWellPath(RimWellPath*
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStep,
|
||||
caf::VecIjk lgrCellCounts,
|
||||
RicExportLgrUi::SplitType splitType,
|
||||
Lgr::SplitType splitType,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
bool* intersectingOtherLgrs)
|
||||
{
|
||||
std::vector<LgrInfo> lgrs;
|
||||
|
||||
if (splitType == RicExportLgrUi::LGR_PER_CELL)
|
||||
if (splitType == Lgr::LGR_PER_CELL)
|
||||
{
|
||||
auto intersectingCells = cellsIntersectingCompletions(eclipseCase, wellPath, timeStep, completionTypes, intersectingOtherLgrs);
|
||||
lgrs = buildLgrsPerMainCell(eclipseCase, intersectingCells, lgrCellCounts);
|
||||
}
|
||||
else if (splitType == RicExportLgrUi::LGR_PER_COMPLETION)
|
||||
else if (splitType == Lgr::LGR_PER_COMPLETION)
|
||||
{
|
||||
auto intersectingCells = cellsIntersectingCompletions_PerCompletion(eclipseCase, wellPath, timeStep, completionTypes, intersectingOtherLgrs);
|
||||
lgrs = buildLgrsPerCompletion(eclipseCase, intersectingCells, lgrCellCounts);
|
||||
}
|
||||
else if (splitType == RicExportLgrUi::LGR_PER_WELL)
|
||||
else if (splitType == Lgr::LGR_PER_WELL)
|
||||
{
|
||||
auto intersectingCells = cellsIntersectingCompletions(eclipseCase, wellPath, timeStep, completionTypes, intersectingOtherLgrs);
|
||||
|
||||
|
@ -137,7 +137,7 @@ class RicExportLgrFeature : public caf::CmdFeature
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStep,
|
||||
caf::VecIjk lgrCellCounts,
|
||||
RicExportLgrUi::SplitType splitType,
|
||||
Lgr::SplitType splitType,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
bool* intersectingOtherLgrs);
|
||||
|
||||
@ -145,7 +145,7 @@ class RicExportLgrFeature : public caf::CmdFeature
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStep,
|
||||
caf::VecIjk lgrCellCounts,
|
||||
RicExportLgrUi::SplitType splitType,
|
||||
Lgr::SplitType splitType,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
bool* intersectingOtherLgrs);
|
||||
|
||||
|
@ -36,13 +36,13 @@ CAF_PDM_SOURCE_INIT(RicExportLgrUi, "RicExportLgrUi");
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RicExportLgrUi::LgrSplitTypeEnum::setUp()
|
||||
void Lgr::SplitTypeEnum::setUp()
|
||||
{
|
||||
addItem(RicExportLgrUi::LGR_PER_CELL, "LGR_PER_CELL", "LGR Per Cell");
|
||||
addItem(RicExportLgrUi::LGR_PER_COMPLETION, "LGR_PER_COMPLETION", "LGR Per Completion");
|
||||
addItem(RicExportLgrUi::LGR_PER_WELL, "LGR_PER_WELL", "LGR Per Well");
|
||||
addItem(Lgr::LGR_PER_CELL, "LGR_PER_CELL", "LGR Per Cell");
|
||||
addItem(Lgr::LGR_PER_COMPLETION, "LGR_PER_COMPLETION", "LGR Per Completion");
|
||||
addItem(Lgr::LGR_PER_WELL, "LGR_PER_WELL", "LGR Per Well");
|
||||
|
||||
setDefault(RicExportLgrUi::LGR_PER_COMPLETION);
|
||||
setDefault(Lgr::LGR_PER_COMPLETION);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ RicExportLgrUi::RicExportLgrUi()
|
||||
m_cellCountJ.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
m_cellCountK.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
|
||||
CAF_PDM_InitField(&m_splitType, "SplitType", LgrSplitTypeEnum(), "Split Type", "", "", "");
|
||||
CAF_PDM_InitField(&m_splitType, "SplitType", Lgr::SplitTypeEnum(), "Split Type", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -149,7 +149,7 @@ std::set<RigCompletionData::CompletionType> RicExportLgrUi::completionTypes() co
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicExportLgrUi::SplitType RicExportLgrUi::splitType() const
|
||||
Lgr::SplitType RicExportLgrUi::splitType() const
|
||||
{
|
||||
return m_splitType();
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include "RicLgrSplitType.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
@ -45,9 +47,6 @@ class RicExportLgrUi : public caf::PdmObject
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum SplitType { LGR_PER_CELL, LGR_PER_COMPLETION, LGR_PER_WELL};
|
||||
typedef caf::AppEnum<RicExportLgrUi::SplitType> LgrSplitTypeEnum;
|
||||
|
||||
RicExportLgrUi();
|
||||
|
||||
void setCase(RimEclipseCase* rimCase);
|
||||
@ -58,7 +57,7 @@ public:
|
||||
RimEclipseCase* caseToApply() const;
|
||||
int timeStep() const;
|
||||
std::set<RigCompletionData::CompletionType> completionTypes() const;
|
||||
SplitType splitType() const;
|
||||
Lgr::SplitType splitType() const;
|
||||
|
||||
void hideExportFolderField(bool hide);
|
||||
void setExportFolder(const QString& folder);
|
||||
@ -84,5 +83,5 @@ private:
|
||||
caf::PdmField<int> m_cellCountJ;
|
||||
caf::PdmField<int> m_cellCountK;
|
||||
|
||||
caf::PdmField<LgrSplitTypeEnum> m_splitType;
|
||||
caf::PdmField<Lgr::SplitTypeEnum> m_splitType;
|
||||
};
|
||||
|
37
ApplicationCode/Commands/ExportCommands/RicLgrSplitType.h
Normal file
37
ApplicationCode/Commands/ExportCommands/RicLgrSplitType.h
Normal file
@ -0,0 +1,37 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cafAppEnum.h>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
namespace Lgr
|
||||
{
|
||||
enum SplitType
|
||||
{
|
||||
LGR_PER_CELL,
|
||||
LGR_PER_COMPLETION,
|
||||
LGR_PER_WELL
|
||||
};
|
||||
|
||||
typedef caf::AppEnum<SplitType> SplitTypeEnum;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user