ResInsight/ApplicationCode/ReservoirDataModel/Completions/RigVirtualPerforationTransmissibilities.h
Magne Sjaastad 4117e266ed #3686 Completion Export : Use map based on size_t instead of RigCompletionDataGridCell
Using RigCompletionDataGridCell as key in a map causes cells with identical local IJK to be treated as same global cell. Use reservoir grid cell index (size_t) as key to be able to handle cells correctly.
2018-11-14 11:40:23 +01:00

76 lines
3.0 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 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 "RigCompletionData.h"
#include "cvfBase.h"
#include "cvfObject.h"
#include <map>
#include <vector>
class RigCompletionData;
class RigCompletionDataGridCell;
class RigSimWellData;
class RimWellPath;
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
class CompletionDataFrame
{
public:
CompletionDataFrame();
void setCompletionData(const std::vector<RigCompletionData>& completions);
const std::map<size_t, std::vector<RigCompletionData>>& multipleCompletionsPerEclipseCell() const;
private:
std::map<size_t, std::vector<RigCompletionData>> m_multipleCompletionsPerEclipseCell;
};
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
class RigVirtualPerforationTransmissibilities : public cvf::Object
{
public:
RigVirtualPerforationTransmissibilities();
~RigVirtualPerforationTransmissibilities() override;
void setCompletionDataForWellPath(const RimWellPath* wellPath,
const std::vector<std::vector<RigCompletionData>>& completionsPerTimeStep);
const std::map<size_t, std::vector<RigCompletionData>>& multipleCompletionsPerEclipseCell(const RimWellPath* wellPath,
size_t timeStepIndex) const;
void setCompletionDataForSimWell(const RigSimWellData* simWellData,
const std::vector<std::vector<RigCompletionData>>& completionsPerTimeStep);
const std::vector<RigCompletionData>& completionsForSimWell(const RigSimWellData* simWellData, size_t timeStepIndex) const;
void computeMinMax(double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
private:
std::map<const RimWellPath*, std::vector<CompletionDataFrame>> m_mapFromWellToCompletionData;
std::map<const RigSimWellData*, std::vector<std::vector<RigCompletionData>>> m_mapFromSimWellToCompletionData;
};