Files
ResInsight/ApplicationCode/ReservoirDataModel/RigEclipseCase.h
Jacob Støren 326cd79754 Result Storage: Finally things have come together, and seems to behave.
Refactored the loadProject system to make loading of statistical cases work as they should.
Got the update of references regarding grid and unionActive cells work
Introduced a bool to keep track of what cell results to store.
Introduced a clear method in ActiveCellInfo.
Renamed a bit
p4#: 21036
2013-03-21 15:31:47 +01:00

89 lines
4.3 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// 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"
#include "RigActiveCellInfo.h"
class RigReservoirCellResults;
class RigEclipseCase: public cvf::Object
{
public:
RigEclipseCase();
~RigEclipseCase();
RigMainGrid* mainGrid() { return m_mainGrid.p(); }
const RigMainGrid* mainGrid() const { return m_mainGrid.p(); }
void setMainGrid(RigMainGrid* mainGrid);
void allGrids(std::vector<RigGridBase*>* grids); // To be removed
void allGrids(std::vector<const RigGridBase*>* grids) const;// To be removed
const RigGridBase* grid(size_t index) const;
RigGridBase* grid(size_t index);
size_t gridCount() const;
RigReservoirCellResults* results(RifReaderInterface::PorosityModelResultType porosityModel);
const RigReservoirCellResults* results(RifReaderInterface::PorosityModelResultType porosityModel) const;
RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel);
const RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const;
void setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo);
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject(const RigGridBase* grid,
RifReaderInterface::PorosityModelResultType porosityModel,
size_t timeStepIndex,
size_t scalarSetIndex);
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;
void computeActiveCellBoundingBoxes();
private:
void computeActiveCellIJKBBox();
void computeWellCellsPrGrid();
void computeActiveCellsGeometryBoundingBox();
private:
cvf::ref<RigMainGrid> m_mainGrid;
cvf::ref<RigActiveCellInfo> m_activeCellInfo;
cvf::ref<RigActiveCellInfo> m_fractureActiveCellInfo;
cvf::ref<RigReservoirCellResults> m_matrixModelResults;
cvf::ref<RigReservoirCellResults> m_fractureModelResults;
cvf::Collection<RigWellResults> m_wellResults;
cvf::Collection<cvf::UByteArray> m_wellCellsInGrid; //< A bool array pr grid with one bool pr cell telling wether the cell is a well cell or not
};