diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index dccfb3f81..c558f11aa 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -187,6 +187,7 @@ if(ENABLE_ECL_INPUT) src/opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.cpp src/opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.cpp src/opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.cpp + src/opm/parser/eclipse/EclipseState/Tables/Tabdims.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.cpp src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParser.cpp diff --git a/opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp b/opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp index 866b097d8..d8f90eeb8 100644 --- a/opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp +++ b/opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp @@ -20,17 +20,19 @@ #ifndef TABDIMS_HPP #define TABDIMS_HPP +#include + /* The Tabdims class is a small utility class designed to hold on to the values from the TABDIMS keyword. */ -#include -#include -#include -#include - namespace Opm { + + class Deck; + class DeckKeyword; + class DeckRecord; + class Tabdims { public: @@ -39,29 +41,9 @@ namespace Opm { are ECLIPSE300 only and quite exotic. Here we only internalize the most common items. */ - Tabdims() : - m_ntsfun( ParserKeywords::TABDIMS::NTSFUN::defaultValue ), - m_ntpvt( ParserKeywords::TABDIMS::NTPVT::defaultValue ), - m_nssfun( ParserKeywords::TABDIMS::NSSFUN::defaultValue ), - m_nppvt( ParserKeywords::TABDIMS::NPPVT::defaultValue ), - m_ntfip( ParserKeywords::TABDIMS::NTFIP::defaultValue ), - m_nrpvt( ParserKeywords::TABDIMS::NRPVT::defaultValue ) - { } + Tabdims(); - - explicit Tabdims(const Deck& deck) : - Tabdims() - { - if (deck.hasKeyword("TABDIMS")) { - const auto& record = deck.getKeyword( "TABDIMS" , 0 ).getRecord( 0 ); - m_ntsfun = record.getItem("NTSFUN").get(0); - m_ntpvt = record.getItem("NTPVT").get(0); - m_nssfun = record.getItem("NSSFUN").get(0); - m_nppvt = record.getItem("NPPVT").get(0); - m_ntfip = record.getItem("NTFIP").get(0); - m_nrpvt = record.getItem("NRPVT").get(0); - } - } + explicit Tabdims(const Deck& deck); static Tabdims serializeObject() { diff --git a/src/opm/parser/eclipse/EclipseState/Grid/FieldProps.cpp b/src/opm/parser/eclipse/EclipseState/Grid/FieldProps.cpp index 7568a5271..77f699f71 100644 --- a/src/opm/parser/eclipse/EclipseState/Grid/FieldProps.cpp +++ b/src/opm/parser/eclipse/EclipseState/Grid/FieldProps.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp index 6447fd378..1ab8108b8 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/KeywordHandlers.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/src/opm/parser/eclipse/EclipseState/Tables/Tabdims.cpp b/src/opm/parser/eclipse/EclipseState/Tables/Tabdims.cpp new file mode 100644 index 000000000..8416fcc2e --- /dev/null +++ b/src/opm/parser/eclipse/EclipseState/Tables/Tabdims.cpp @@ -0,0 +1,53 @@ +/* + Copyright (C) 2015 Statoil 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 . + */ + +#include + +#include +#include +#include +#include + +namespace Opm { + +Tabdims::Tabdims() : + m_ntsfun( ParserKeywords::TABDIMS::NTSFUN::defaultValue ), + m_ntpvt( ParserKeywords::TABDIMS::NTPVT::defaultValue ), + m_nssfun( ParserKeywords::TABDIMS::NSSFUN::defaultValue ), + m_nppvt( ParserKeywords::TABDIMS::NPPVT::defaultValue ), + m_ntfip( ParserKeywords::TABDIMS::NTFIP::defaultValue ), + m_nrpvt( ParserKeywords::TABDIMS::NRPVT::defaultValue ) +{ } + + +Tabdims::Tabdims(const Deck& deck) : + Tabdims() +{ + if (deck.hasKeyword("TABDIMS")) { + const auto& record = deck.getKeyword( "TABDIMS" , 0 ).getRecord( 0 ); + m_ntsfun = record.getItem("NTSFUN").get(0); + m_ntpvt = record.getItem("NTPVT").get(0); + m_nssfun = record.getItem("NSSFUN").get(0); + m_nppvt = record.getItem("NPPVT").get(0); + m_ntfip = record.getItem("NTFIP").get(0); + m_nrpvt = record.getItem("NRPVT").get(0); + } +} + +}