2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
|
|
|
|
//
|
|
|
|
|
// 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 <vector>
|
|
|
|
|
#include "RigCell.h"
|
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
#include "cvfAssert.h"
|
|
|
|
|
#include "cvfObject.h"
|
|
|
|
|
#include "RigMainGrid.h"
|
|
|
|
|
#include "RigWellResults.h"
|
2013-02-12 11:15:36 +01:00
|
|
|
#include "RigActiveCellInfo.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class RigReservoir: public cvf::Object
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
RigReservoir();
|
|
|
|
|
~RigReservoir();
|
|
|
|
|
|
|
|
|
|
RigMainGrid* mainGrid() { return m_mainGrid.p(); }
|
|
|
|
|
const RigMainGrid* mainGrid() const { return m_mainGrid.p(); }
|
|
|
|
|
|
|
|
|
|
void allGrids(std::vector<RigGridBase*>* grids);
|
|
|
|
|
void allGrids(std::vector<const RigGridBase*>* grids) const;
|
|
|
|
|
const RigGridBase* grid(size_t index) const;
|
|
|
|
|
|
2013-02-12 11:15:36 +01:00
|
|
|
void computeCachedData();
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
void setWellResults(const cvf::Collection<RigWellResults>& data);
|
|
|
|
|
const cvf::Collection<RigWellResults>& wellResults() { return m_wellResults; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cvf::UByteArray* wellCellsInGrid(size_t gridIndex);
|
|
|
|
|
|
|
|
|
|
RigCell& cellFromWellResultCell(const RigWellResultCell& wellResultCell);
|
|
|
|
|
bool findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace, const RigWellResultCell& sourceWellCellResult, const RigWellResultCell& otherWellCellResult) const;
|
|
|
|
|
|
2013-02-12 11:15:36 +01:00
|
|
|
RigActiveCellInfo* activeCellInfo();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-02-12 11:15:36 +01:00
|
|
|
/*
|
2013-02-11 15:12:53 +01:00
|
|
|
// From RigMainGrid, can this function be moved to Octave socket server?
|
|
|
|
|
void calculateMatrixModelActiveCellInfo(std::vector<qint32>& gridNumber,
|
|
|
|
|
std::vector<qint32>& i,
|
|
|
|
|
std::vector<qint32>& j,
|
|
|
|
|
std::vector<qint32>& k,
|
|
|
|
|
std::vector<qint32>& parentGridNumber,
|
|
|
|
|
std::vector<qint32>& hostCellI,
|
|
|
|
|
std::vector<qint32>& hostCellJ,
|
|
|
|
|
std::vector<qint32>& hostCellK);
|
2013-02-12 11:15:36 +01:00
|
|
|
*/
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
private:
|
2013-02-12 11:15:36 +01:00
|
|
|
void computeFaults();
|
|
|
|
|
void computeActiveCellData();
|
2012-05-18 09:45:23 +02:00
|
|
|
void computeWellCellsPrGrid();
|
|
|
|
|
|
2013-02-12 11:15:36 +01:00
|
|
|
private:
|
|
|
|
|
RigActiveCellInfo m_activeCellInfo;
|
2012-05-18 09:45:23 +02:00
|
|
|
cvf::ref<RigMainGrid> m_mainGrid;
|
|
|
|
|
|
|
|
|
|
cvf::Collection<RigWellResults> m_wellResults;
|
|
|
|
|
cvf::Collection<cvf::UByteArray> m_wellCellsInGrid;
|
|
|
|
|
};
|