OPM-205: Reduced severity of output GRID file not supported from throw to warning

This commit is contained in:
chflo
2015-05-29 12:04:39 +02:00
parent 4854547606
commit 3acd325c39
2 changed files with 1 additions and 16 deletions

View File

@@ -227,7 +227,7 @@ namespace Opm {
auto rec = gridfilekeyword->getRecord(0);
auto item1 = rec->getItem(0);
if ((item1->hasValue(0)) && (item1->getInt(0) != 0)) {
throw std::runtime_error("IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported") ;
std::cerr << "IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported" << std::endl;
}
if (rec->size() > 1) {
auto item2 = rec->getItem(1);

View File

@@ -54,14 +54,6 @@ const std::string& deckStr = "RUNSPEC\n"
"\n"
"/\n";
const std::string& deckStr2 = "RUNSPEC\n"
"\n"
"DIMENS\n"
"10 10 10 /\n"
"GRID\n"
"GRIDFILE\n"
" 1 1 /\n"
"\n";
const std::string& deckStr3 = "RUNSPEC\n"
"UNIFIN\n"
@@ -361,13 +353,6 @@ BOOST_AUTO_TEST_CASE(IOConfigTest) {
/*If no FMTOUT keyword is specified, verify FMTOUT false (default is unformatted) */
BOOST_CHECK_EQUAL(false, ioConfigPtr->getFMTOUT());
/*Throw exception if write GRID file is specified*/
DeckPtr deck2 = createDeck(deckStr2);
IOConfigPtr ioConfigPtr2;
BOOST_CHECK_NO_THROW(ioConfigPtr2 = std::make_shared<IOConfig>());
std::shared_ptr<const GRIDSection> gridSection2 = std::make_shared<const GRIDSection>(deck2);
BOOST_CHECK_THROW(ioConfigPtr2->handleGridSection(gridSection2), std::runtime_error);
/*If NOGGF keyword is present, no EGRID file is written*/
DeckPtr deck3 = createDeck(deckStr3);
IOConfigPtr ioConfigPtr3;