2015-09-14 09:32:53 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-09-14 09:32:53 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-09-14 09:32:53 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-09-14 09:32:53 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cvfMath.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cvfObject.h"
|
2015-09-14 09:32:53 -05:00
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RigMainGrid;
|
|
|
|
class RigFemPart;
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-09-14 09:32:53 -05:00
|
|
|
//==================================================================================================
|
|
|
|
class RigCaseToCaseCellMapper : public cvf::Object
|
|
|
|
{
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
RigCaseToCaseCellMapper( RigMainGrid* masterEclGrid, RigFemPart* dependentFemPart );
|
|
|
|
RigCaseToCaseCellMapper( RigMainGrid* masterEclGrid, RigMainGrid* dependentEclGrid );
|
|
|
|
RigCaseToCaseCellMapper( RigFemPart* masterFemPart, RigMainGrid* dependentEclGrid );
|
|
|
|
RigCaseToCaseCellMapper( RigFemPart* masterFemPart, RigFemPart* dependentFemPart );
|
2015-09-15 02:15:15 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const int* masterCaseCellIndices( int dependentCaseReservoirCellIndex, int* masterCaseCellIndexCount ) const;
|
2015-09-14 09:32:53 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const RigMainGrid* masterGrid() const
|
|
|
|
{
|
|
|
|
return m_masterGrid;
|
|
|
|
}
|
|
|
|
const RigMainGrid* dependentGrid() const
|
|
|
|
{
|
|
|
|
return m_dependentGrid;
|
|
|
|
}
|
|
|
|
const RigFemPart* masterFemPart() const
|
|
|
|
{
|
|
|
|
return m_masterFemPart;
|
|
|
|
}
|
|
|
|
const RigFemPart* dependentFemPart() const
|
|
|
|
{
|
|
|
|
return m_dependentFemPart;
|
|
|
|
}
|
2015-09-15 02:15:15 -05:00
|
|
|
|
2015-09-14 09:32:53 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void addMapping( int depCaseCellIdx, int masterCaseMatchingCell );
|
|
|
|
void calculateEclToGeomCellMapping( RigMainGrid* masterEclGrid, RigFemPart* dependentFemPart, bool eclipseIsMaster );
|
2015-09-14 09:32:53 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<int> m_masterCellOrIntervalIndex;
|
|
|
|
std::vector<std::vector<int>> m_masterCellIndexSeries;
|
2015-09-15 02:15:15 -05:00
|
|
|
|
|
|
|
RigMainGrid* m_masterGrid;
|
|
|
|
RigMainGrid* m_dependentGrid;
|
|
|
|
RigFemPart* m_masterFemPart;
|
|
|
|
RigFemPart* m_dependentFemPart;
|
2015-09-14 09:32:53 -05:00
|
|
|
};
|