#3038 : Fracture - Simplify interface

This commit is contained in:
Magne Sjaastad 2018-08-03 10:30:44 +02:00
parent 5bbc0ee89f
commit d22f89f4d7
3 changed files with 11 additions and 10 deletions

View File

@ -20,8 +20,6 @@
#include "RiaLogging.h" #include "RiaLogging.h"
#include "RicExportCompletionDataSettingsUi.h"
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimFracture.h" #include "RimFracture.h"
@ -54,11 +52,9 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(RimWellPath* wellPath, std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings, RimEclipseCase* caseToApply,
QTextStream* outputStreamForIntermediateResultsText) QTextStream* outputStreamForIntermediateResultsText)
{ {
RimEclipseCase* caseToApply = settings.caseToApply();
std::vector<RimFracture*> fracturesAlongWellPath; std::vector<RimFracture*> fracturesAlongWellPath;
if (wellPath->fractureCollection()->isChecked()) if (wellPath->fractureCollection()->isChecked())
@ -118,6 +114,13 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
const std::vector<RimFracture*>& fractures, const std::vector<RimFracture*>& fractures,
QTextStream* outputStreamForIntermediateResultsText) QTextStream* outputStreamForIntermediateResultsText)
{ {
std::vector<RigCompletionData> fractureCompletions;
if (!caseToApply || !caseToApply->eclipseCaseData())
{
return fractureCompletions;
}
double cDarcyInCorrectUnit = RiaEclipseUnitTools::darcysConstant(caseToApply->eclipseCaseData()->unitsType()); double cDarcyInCorrectUnit = RiaEclipseUnitTools::darcysConstant(caseToApply->eclipseCaseData()->unitsType());
const RigMainGrid* mainGrid = caseToApply->eclipseCaseData()->mainGrid(); const RigMainGrid* mainGrid = caseToApply->eclipseCaseData()->mainGrid();
@ -125,7 +128,6 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
// to the well from each fracture intersecting the cell and sum these transmissibilities at the end. // to the well from each fracture intersecting the cell and sum these transmissibilities at the end.
// std::map <eclipseCellIndex ,map< fracture, trans> > // std::map <eclipseCellIndex ,map< fracture, trans> >
std::map <size_t, std::map<RimFracture*, double> > eclCellIdxToTransPrFractureMap; std::map <size_t, std::map<RimFracture*, double> > eclCellIdxToTransPrFractureMap;
std::vector<RigCompletionData> fractureCompletions;
for (RimFracture* fracture : fractures) for (RimFracture* fracture : fractures)
{ {

View File

@ -24,7 +24,6 @@
#include <vector> #include <vector>
class RimWellPath; class RimWellPath;
class RicExportCompletionDataSettingsUi;
class QTextStream; class QTextStream;
class RigWellPath; class RigWellPath;
@ -39,7 +38,7 @@ class RicExportFractureCompletionsImpl
{ {
public: public:
static std::vector<RigCompletionData> generateCompdatValuesForWellPath(RimWellPath* wellPath, static std::vector<RigCompletionData> generateCompdatValuesForWellPath(RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings, RimEclipseCase* caseToApply,
QTextStream* outputStreamForIntermediateResultsText); QTextStream* outputStreamForIntermediateResultsText);
static std::vector<RigCompletionData> generateCompdatValuesForSimWell(RimEclipseCase* eclipseCase, static std::vector<RigCompletionData> generateCompdatValuesForSimWell(RimEclipseCase* eclipseCase,

View File

@ -165,7 +165,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
{ {
std::vector<RigCompletionData> fractureCompletionData = std::vector<RigCompletionData> fractureCompletionData =
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(
wellPath, exportSettings, fractureTransmissibilityExportInformationStream.get()); wellPath, exportSettings.caseToApply(), fractureTransmissibilityExportInformationStream.get());
appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, fractureCompletionData); appendCompletionData(&completionsPerEclipseCellAllCompletionTypes, fractureCompletionData);
appendCompletionData(&completionsPerEclipseCellFracture, fractureCompletionData); appendCompletionData(&completionsPerEclipseCellFracture, fractureCompletionData);
@ -336,7 +336,7 @@ std::vector<RigCompletionData>
{ {
std::vector<RigCompletionData> completionData = std::vector<RigCompletionData> completionData =
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(wellPath, exportSettings, nullptr); RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(wellPath, eclipseCase, nullptr);
std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell)); std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell));
} }