diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index bcec64529..90039f50d 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -164,6 +164,7 @@ if(ENABLE_ECL_INPUT) src/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp src/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp + src/opm/parser/eclipse/EclipseState/Tables/Aqudims.cpp src/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp src/opm/parser/eclipse/EclipseState/Tables/DenT.cpp src/opm/parser/eclipse/EclipseState/Tables/JFunc.cpp diff --git a/opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp b/opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp index 1a8a6f457..6d912dfef 100755 --- a/opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp +++ b/opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp @@ -20,47 +20,23 @@ #ifndef AQUDIMS_HPP #define AQUDIMS_HPP +#include + /* The Aqudims class is a small utility class designed to hold on to the values from the AQUDIMS keyword. */ -#include -#include -#include -#include - namespace Opm { + + class Deck; + class Aqudims { public: - Aqudims() : - m_mxnaqn( ParserKeywords::AQUDIMS::MXNAQN::defaultValue ), - m_mxnaqc( ParserKeywords::AQUDIMS::MXNAQC::defaultValue ), - m_niftbl( ParserKeywords::AQUDIMS::NIFTBL::defaultValue ), - m_nriftb( ParserKeywords::AQUDIMS::NRIFTB::defaultValue ), - m_nanaqu( ParserKeywords::AQUDIMS::NANAQU::defaultValue ), - m_ncamax( ParserKeywords::AQUDIMS::NCAMAX::defaultValue ), - m_mxnali( ParserKeywords::AQUDIMS::MXNALI::defaultValue ), - m_mxaaql( ParserKeywords::AQUDIMS::MXAAQL::defaultValue ) - - { } + Aqudims(); - explicit Aqudims(const Deck& deck) : - Aqudims() - { - if (deck.hasKeyword("AQUDIMS")) { - const auto& record = deck.getKeyword( "AQUDIMS" , 0 ).getRecord( 0 ); - m_mxnaqn = record.getItem("MXNAQN").get(0); - m_mxnaqc = record.getItem("MXNAQC").get(0); - m_niftbl = record.getItem("NIFTBL").get(0); - m_nriftb = record.getItem("NRIFTB").get(0); - m_nanaqu = record.getItem("NANAQU").get(0); - m_ncamax = record.getItem("NCAMAX").get(0); - m_mxnali = record.getItem("MXNALI").get(0); - m_mxaaql = record.getItem("MXAAQL").get(0); - } - } + explicit Aqudims(const Deck& deck); static Aqudims serializeObject() { diff --git a/src/opm/parser/eclipse/EclipseState/Tables/Aqudims.cpp b/src/opm/parser/eclipse/EclipseState/Tables/Aqudims.cpp new file mode 100644 index 000000000..d0e8b8a91 --- /dev/null +++ b/src/opm/parser/eclipse/EclipseState/Tables/Aqudims.cpp @@ -0,0 +1,57 @@ +/* + Copyright (C) 2017 TNO + + 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 { + +Aqudims::Aqudims() : + m_mxnaqn( ParserKeywords::AQUDIMS::MXNAQN::defaultValue ), + m_mxnaqc( ParserKeywords::AQUDIMS::MXNAQC::defaultValue ), + m_niftbl( ParserKeywords::AQUDIMS::NIFTBL::defaultValue ), + m_nriftb( ParserKeywords::AQUDIMS::NRIFTB::defaultValue ), + m_nanaqu( ParserKeywords::AQUDIMS::NANAQU::defaultValue ), + m_ncamax( ParserKeywords::AQUDIMS::NCAMAX::defaultValue ), + m_mxnali( ParserKeywords::AQUDIMS::MXNALI::defaultValue ), + m_mxaaql( ParserKeywords::AQUDIMS::MXAAQL::defaultValue ) + +{ } + +Aqudims::Aqudims(const Deck& deck) : + Aqudims() +{ + if (deck.hasKeyword("AQUDIMS")) { + const auto& record = deck.getKeyword( "AQUDIMS" , 0 ).getRecord( 0 ); + m_mxnaqn = record.getItem("MXNAQN").get(0); + m_mxnaqc = record.getItem("MXNAQC").get(0); + m_niftbl = record.getItem("NIFTBL").get(0); + m_nriftb = record.getItem("NRIFTB").get(0); + m_nanaqu = record.getItem("NANAQU").get(0); + m_ncamax = record.getItem("NCAMAX").get(0); + m_mxnali = record.getItem("MXNALI").get(0); + m_mxaaql = record.getItem("MXAAQL").get(0); + } +} + +}