Files
opm-common/python/cxx/sunbeam_state.cpp
Steinar Foss c208a59597 Sunbeam will be compiled with setuptools.
setup.py moved to python/python.

moved python tests to python/python.

added __init__.py under python/tests.

added 'test_' before all python test names.

test_ prefix added to tests.

setup.py and python tests moved back to python base.

setuptools executes from root python.

python: tests run from root python w/ setup.py.

python tests: temp reduced to test_deck only.

python setup.py: manually linked opmcommon.

setup.py: linked ecl.

setup.py linked boost_filesystem.

setup.py: linked boost_regex.

python all tests run.

removec usr/local from setup.py ext_module.

cmake make copies entire python dir to build.

setup.py can execute from build.

setup.py executes from build/python.

python tests run under setup.py.

setup.py library_dirs and include-dirs set by cmake command.

removed cmake files from sunbeam.

sunbeam: added code for install.

setup.py: removed 'import ecl'.

python/src -> python->src_sunbeam.

setup.py: discontinued use of glob, all files listed instead.

build-opm_module.sh: added prefix_path to opm.

build-opm-module.sh: changed spell error for EXTRA_MODULE_FLAGS[opm-common].

setup.py: infer include directories from cmake target

CMakeLists.txt: under python: align install statement.

CMakeLists build python: removed find_package.

src_sunbeam -> cxx.

setup.py: test_suite as string.

setup.py: tests_suite -> test_suite.

setup.py: added exception if 'build_ext' not used.

temporarily moved files to python/sunbeam.
2019-08-09 10:40:33 +02:00

41 lines
1.2 KiB
C++

#include "sunbeam_state.hpp"
SunbeamState::SunbeamState(bool file_input, const std::string& deck_input, const Opm::ParseContext& context, const Opm::Parser& parser)
: deck(file_input
? parser.parseFile(deck_input, context, guard)
: parser.parseString(deck_input, context, guard)),
ecl_state(deck, context, guard),
schedule(deck, ecl_state, context, guard),
summary_config(deck, schedule, ecl_state.getTableManager(), context, guard)
{
guard.clear();
}
SunbeamState::SunbeamState(bool file_input, const std::string& deck_input) :
SunbeamState(file_input, deck_input, Opm::ParseContext(), Opm::Parser())
{}
SunbeamState::SunbeamState(bool file_input, const std::string& deck_input, const Opm::ParseContext& context) :
SunbeamState(file_input, deck_input, context, Opm::Parser())
{}
const Opm::EclipseState& SunbeamState::getEclipseState() const {
return this->ecl_state;
}
const Opm::Deck& SunbeamState::getDeck() const {
return this->deck;
}
const Opm::Schedule SunbeamState::getSchedule() const {
return this->schedule;
}
const Opm::SummaryConfig SunbeamState::getSummmaryConfig() const {
return this->summary_config;
}