///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2011- Statoil ASA // Copyright (C) 2013- Ceetron Solutions AS // Copyright (C) 2011-2012 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 "RiaPorosityModel.h" #include "RimReservoirGridEnsembleBase.h" #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cvfObject.h" class RigActiveCellInfo; class RigMainGrid; class RimCaseCollection; class RimEclipseCase; class RimEclipseStatisticsCase; //================================================================================================== // // // //================================================================================================== class RimIdenticalGridCaseGroup : public caf::PdmObject, public RimReservoirGridEnsembleBase { CAF_PDM_HEADER_INIT; public: RimIdenticalGridCaseGroup(); ~RimIdenticalGridCaseGroup() override; caf::PdmField name; caf::PdmField groupId; caf::PdmChildField caseCollection; void addCase( RimEclipseCase* reservoir ); void removeCase( RimEclipseCase* reservoir ); bool contains( RimEclipseCase* reservoir ) const; RimEclipseStatisticsCase* createAndAppendEmptyStatisticsCase(); RimEclipseCase* mainCase() override; RimCaseCollection* statisticsCaseCollection() const override; void loadMainCaseAndActiveCellInfo(); RigMainGrid* mainGrid() override; std::vector sourceCases() const override; RigActiveCellInfo* unionOfActiveCells( RiaDefines::PorosityModelType porosityType ) override; void computeUnionOfActiveCells() override; GridModeType gridMode() const override; QString ensembleName() const override; static bool isStatisticsCaseCollection( RimCaseCollection* rimCaseCollection ); protected: caf::PdmFieldHandle* userDescriptionField() override; private: void updateMainGridAndActiveCellsForStatisticsCases(); void clearStatisticsResults(); void clearActiveCellUnions(); private: caf::PdmChildField m_statisticsCaseCollection; RigMainGrid* m_mainGrid; cvf::ref m_unionOfMatrixActiveCells; cvf::ref m_unionOfFractureActiveCells; };