#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 "RicExportCompletionDataSettingsUi.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimFracture.h"
@ -54,11 +52,9 @@
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings,
RimEclipseCase* caseToApply,
QTextStream* outputStreamForIntermediateResultsText)
{
RimEclipseCase* caseToApply = settings.caseToApply();
std::vector<RimFracture*> fracturesAlongWellPath;
if (wellPath->fractureCollection()->isChecked())
@ -118,6 +114,13 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
const std::vector<RimFracture*>& fractures,
QTextStream* outputStreamForIntermediateResultsText)
{
std::vector<RigCompletionData> fractureCompletions;
if (!caseToApply || !caseToApply->eclipseCaseData())
{
return fractureCompletions;
}
double cDarcyInCorrectUnit = RiaEclipseUnitTools::darcysConstant(caseToApply->eclipseCaseData()->unitsType());
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.
// std::map <eclipseCellIndex ,map< fracture, trans> >
std::map <size_t, std::map<RimFracture*, double> > eclCellIdxToTransPrFractureMap;
std::vector<RigCompletionData> fractureCompletions;
for (RimFracture* fracture : fractures)
{

View File

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

View File

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