///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include #include "RigCell.h" #include "cvfVector3.h" #include "cvfAssert.h" #include "cvfObject.h" #include "RigMainGrid.h" #include "RigSingleWellResultsData.h" #include "RigActiveCellInfo.h" class RigCaseCellResultsData; class RigCaseData: public cvf::Object { public: RigCaseData(); ~RigCaseData(); RigMainGrid* mainGrid() { return m_mainGrid.p(); } const RigMainGrid* mainGrid() const { return m_mainGrid.p(); } void setMainGrid(RigMainGrid* mainGrid); void allGrids(std::vector* grids); // To be removed void allGrids(std::vector* grids) const;// To be removed const RigGridBase* grid(size_t index) const; RigGridBase* grid(size_t index); size_t gridCount() const; RigCaseCellResultsData* results(RifReaderInterface::PorosityModelResultType porosityModel); const RigCaseCellResultsData* 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 dataAccessObject(const RigGridBase* grid, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStepIndex, size_t scalarSetIndex); void setWellResults(const cvf::Collection& data); const cvf::Collection& wellResults() { return m_wellResults; } cvf::UByteArray* wellCellsInGrid(size_t gridIndex); cvf::UIntArray* gridCellToWellIndex(size_t gridIndex); RigCell& cellFromWellResultCell(const RigWellResultPoint& wellResultCell); bool findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace, const RigWellResultPoint& sourceWellCellResult, const RigWellResultPoint& otherWellCellResult) const; void computeActiveCellBoundingBoxes(); private: void computeActiveCellIJKBBox(); void computeWellCellsPrGrid(); void computeActiveCellsGeometryBoundingBox(); private: cvf::ref m_mainGrid; cvf::ref m_activeCellInfo; cvf::ref m_fractureActiveCellInfo; cvf::ref m_matrixModelResults; cvf::ref m_fractureModelResults; cvf::Collection m_wellResults; //< A WellResults object for each well in the reservoir cvf::Collection m_wellCellsInGrid; //< A bool array pr grid with one bool pr cell telling wether the cell is a well cell or not cvf::Collection m_gridCellToWellIndex; //< Array pr grid with index to well pr cell telling which well a cell is in };