ResInsight/ApplicationCode/ReservoirDataModel/Completions/RigEclipseToStimPlanCellTransmissibilityCalculator.h
Magne Sjaastad 59d6e89fe0 #3038 Minor refactoring
Use empty()
Use const ref
2018-08-07 07:24:39 +02:00

70 lines
2.7 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// 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 "RiaPorosityModel.h"
#include "cvfBase.h"
#include "cvfObject.h"
#include "cvfMatrix4.h"
#include <vector>
class QString;
class RimEclipseCase;
class RigFractureCell;
class RigEclipseCaseData;
class RigResultAccessor;
//==================================================================================================
///
//==================================================================================================
class RigEclipseToStimPlanCellTransmissibilityCalculator
{
public:
explicit RigEclipseToStimPlanCellTransmissibilityCalculator(RimEclipseCase* caseToApply,
cvf::Mat4d fractureTransform,
double skinFactor,
double cDarcy,
const RigFractureCell& stimPlanCell);
const std::vector<size_t>& globalIndiciesToContributingEclipseCells();
const std::vector<double>& contributingEclipseCellTransmissibilities();
private:
void calculateStimPlanCellsMatrixTransmissibility();
std::vector<size_t> getPotentiallyFracturedCellsForPolygon(const std::vector<cvf::Vec3d>& polygon) const;
static cvf::ref<RigResultAccessor>
loadResultAndCreateResultAccessor(RimEclipseCase* eclipseCase,
RiaDefines::PorosityModelType porosityModel,
const QString& uiResultName);
private:
RimEclipseCase* m_case;
double m_cDarcy;
double m_fractureSkinFactor;
cvf::Mat4d m_fractureTransform;
const RigFractureCell& m_stimPlanCell;
std::vector<size_t> m_globalIndiciesToContributingEclipseCells;
std::vector<double> m_contributingEclipseCellTransmissibilities;
};