Added trivial class Tabdims
This commit is contained in:
@@ -192,6 +192,7 @@ EclipseState/Grid/FaultCollection.hpp
|
||||
EclipseState/SimulationConfig/SimulationConfig.hpp
|
||||
EclipseState/SimulationConfig/ThresholdPressure.hpp
|
||||
#
|
||||
EclipseState/Tables/Tabdims.hpp
|
||||
EclipseState/Tables/PlyadsTable.hpp
|
||||
EclipseState/Tables/PvtoOuterTable.hpp
|
||||
EclipseState/Tables/RocktabTable.hpp
|
||||
|
||||
72
opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp
Normal file
72
opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TABDIMS_HPP
|
||||
#define TABDIMS_HPP
|
||||
|
||||
/*
|
||||
The Tabdims class is a small utility class designed to hold on to
|
||||
the values from the TABDIMS keyword.
|
||||
*/
|
||||
|
||||
|
||||
namespace Opm {
|
||||
class Tabdims {
|
||||
public:
|
||||
Tabdims(size_t ntsfun, size_t ntpvt, size_t nssfun , size_t nppvt, size_t ntfip , size_t nrpvt) :
|
||||
m_ntsfun( ntsfun ),
|
||||
m_ntpvt( ntpvt ),
|
||||
m_nssfun( nssfun ),
|
||||
m_nppvt( nppvt ),
|
||||
m_ntfip( ntfip ),
|
||||
m_nrpvt( nrpvt ) {}
|
||||
|
||||
|
||||
size_t getNumSatTables() const {
|
||||
return m_ntsfun;
|
||||
}
|
||||
|
||||
size_t getNumPVTTables() const {
|
||||
return m_ntpvt;
|
||||
}
|
||||
|
||||
size_t getNumSatNodes() const {
|
||||
return m_nssfun;
|
||||
}
|
||||
|
||||
size_t getNumPressureNodes() const {
|
||||
return m_nppvt;
|
||||
}
|
||||
|
||||
size_t getNumFIPRegions() const {
|
||||
return m_ntfip;
|
||||
}
|
||||
|
||||
size_t getNumRSNodes() const {
|
||||
return m_nrpvt;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
size_t m_ntsfun,m_ntpvt,m_nssfun,m_nppvt,m_ntfip,m_nrpvt;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,7 @@
|
||||
add_executable(runTableTests TableTests.cpp)
|
||||
target_link_libraries(runTableTests Parser ${Boost_LIBRARIES})
|
||||
add_test(NAME runTableTests WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${TEST_MEMCHECK_TOOL} ${EXECUTABLE_OUTPUT_PATH}/runTableTests )
|
||||
|
||||
add_executable(runTabdimsTests TabdimsTests.cpp)
|
||||
target_link_libraries(runTabdimsTests Parser ${Boost_LIBRARIES})
|
||||
add_test(NAME runTabdimsTests WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${TEST_MEMCHECK_TOOL} ${EXECUTABLE_OUTPUT_PATH}/runTabdimsTests )
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#define BOOST_TEST_MODULE TABDIMS_TESTS
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TEST_CREATE) {
|
||||
Opm::Tabdims tabdims(1,2,3,4,5,6);
|
||||
}
|
||||
Reference in New Issue
Block a user