/* Copyright 2019 Equinor ASA. This file is part of the Open Porous Media project (OPM). OPM 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. OPM 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 for more details. You should have received a copy of the GNU General Public License along with OPM. If not, see . */ #ifndef EMODEL_HPP #define EMODEL_HPP #include #include #include #include #include #include #include class EModel { public: explicit EModel(const std::string& filename); bool hasParameter(const std::string &name) const; int getActiveReportStep() { return activeReportStep; } bool hasReportStep(int rstep); void setReportStep(int rstep); std::vector> getListOfParameters() const; std::vector getListOfReportSteps() const {return rstfile->listOfReportStepNumbers(); }; template const std::vector& getParam(const std::string& name); void resetFilter(); template void addFilter(const std::string& param1, const std::string& opperator, T num); template void addFilter(const std::string& param1, const std::string& opperator, T num1, T num2); void setDepthfwl(const std::vector& fwl); void addHCvolFilter(); int getNumberOfActiveCells(); std::tuple gridDims(){ return std::make_tuple(nI, nJ, nK); }; private: int nI, nJ, nK; int activeReportStep; size_t nActive; bool activeFilter, celVolCalculated; std::vector filteredFloatVect; std::vector filteredIntVect; std::vector PORV; std::vector CELLVOL; std::vector I, J, K; std::vector ActFilter; Opm::EclIO::EclFile initfile; std::optional grid; std::optional rstfile; std::map initParam; std::vector initParamName; std::vector initParamType; std::vector indInInitEclfile; std::map solutionParam; std::vector solutionParamName; std::vector solutionParamType; std::vector indInRstEclfile; int nEqlnum=0; std::vector FreeWaterlevel = {}; void get_cell_volumes_from_grid(); void initSolutionData(int rstep); bool hasInitParameter(const std::string &name) const; bool hasSolutionParameter(const std::string &name) const; const std::vector& getInitFloat(const std::string& name); const std::vector& getSolutionFloat(const std::string& name); template const std::vector& get_filter_param(const std::string& param1); template void updateActiveFilter(const std::vector& paramVect, const std::string& opperator, T value); template void updateActiveFilter(const std::vector& paramVect, const std::string& opperator, T value1, T value2); }; #endif