Get MESSAGES limits from Schedule and update every time step.

This commit is contained in:
Liu Ming
2016-10-14 10:06:35 +08:00
parent 5fc2463097
commit c7b3e2cf57
9 changed files with 305 additions and 214 deletions

View File

@@ -70,10 +70,10 @@ set (state_source
EclipseState/EclipseState.cpp
EclipseState/EclipseConfig.cpp
EclipseState/Eclipse3DProperties.cpp
EclipseState/Messages.cpp
#
EclipseState/checkDeck.cpp
#
EclipseState/Schedule/MessagesLimits.cpp
EclipseState/Schedule/OilVaporizationProperties.cpp
EclipseState/Schedule/TimeMap.cpp
EclipseState/Schedule/Schedule.cpp
@@ -172,10 +172,10 @@ Units/ConversionFactors.hpp
EclipseState/EclipseState.hpp
EclipseState/EclipseConfig.hpp
EclipseState/Eclipse3DProperties.hpp
EclipseState/Messages.hpp
#
EclipseState/checkDeck.hpp
#
EclipseState/Schedule/MessagesLimits.hpp
EclipseState/Schedule/OilVaporizationProperties.hpp
EclipseState/Schedule/TimeMap.hpp
EclipseState/Schedule/Schedule.hpp

View File

@@ -64,9 +64,7 @@ namespace Opm {
m_eclipseProperties( deck, m_tables, *m_inputGrid ),
m_eclipseConfig( deck, m_eclipseProperties, m_gridDims, *m_schedule , parseContext),
m_inputNnc( deck, m_gridDims ),
m_deckUnitSystem( deck.getActiveUnitSystem() ),
m_messages( deck)
m_deckUnitSystem( deck.getActiveUnitSystem() )
{
m_inputGrid->resetACTNUM(m_eclipseProperties.getIntGridProperty("ACTNUM").getData().data());
@@ -134,12 +132,6 @@ namespace Opm {
}
const Messages& EclipseState::getMessages() const
{
return m_messages;
}
const TableManager& EclipseState::getTableManager() const {
return m_tables;
}

View File

@@ -29,7 +29,6 @@
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#include <opm/parser/eclipse/EclipseState/Messages.hpp>
#include <opm/parser/eclipse/Parser/MessageContainer.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
@@ -54,7 +53,6 @@ namespace Opm {
class SimulationConfig;
class TableManager;
class UnitSystem;
class Messages;
class EclipseState {
public:
@@ -108,7 +106,6 @@ namespace Opm {
const MessageContainer& getMessageContainer() const;
MessageContainer& getMessageContainer();
const Messages& getMessages() const;
std::string getTitle() const;
void applyModifierDeck(const Deck& deck);
@@ -139,7 +136,6 @@ namespace Opm {
MessageContainer m_messageContainer;
Messages m_messages;
};
typedef std::shared_ptr<EclipseState> EclipseStatePtr;

View File

@@ -1,135 +0,0 @@
/*
Copyright 2016 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/>.
*/
#include <opm/parser/eclipse/Parser/ParserKeywords/M.hpp>
#include <opm/parser/eclipse/EclipseState/Messages.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
namespace Opm {
Messages::Messages(const Messages& messages, const DeckRecord& record) :
m_message_print_limit( messages.m_message_print_limit ),
m_comment_print_limit( messages.m_comment_print_limit ),
m_warning_print_limit( messages.m_warning_print_limit ),
m_problem_print_limit( messages.m_problem_print_limit ),
m_error_print_limit( messages.m_error_print_limit ),
m_bug_print_limit( messages.m_bug_print_limit ),
m_message_stop_limit( messages.m_message_stop_limit ),
m_comment_stop_limit( messages.m_comment_stop_limit ),
m_warning_stop_limit( messages.m_warning_stop_limit ),
m_problem_stop_limit( messages.m_problem_stop_limit ),
m_error_stop_limit( messages.m_error_stop_limit ),
m_bug_stop_limit( messages.m_bug_stop_limit )
{
if (!record.getItem<ParserKeywords::MESSAGES::MESSAGE_PRINT_LIMIT>().defaultApplied(0))
m_message_print_limit = record.getItem<ParserKeywords::MESSAGES::MESSAGE_PRINT_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::COMMENT_PRINT_LIMIT>().defaultApplied(0))
m_comment_print_limit = record.getItem<ParserKeywords::MESSAGES::COMMENT_PRINT_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::WARNING_PRINT_LIMIT>().defaultApplied(0))
m_warning_print_limit = record.getItem<ParserKeywords::MESSAGES::WARNING_PRINT_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::PROBLEM_PRINT_LIMIT>().defaultApplied(0))
m_problem_print_limit = record.getItem<ParserKeywords::MESSAGES::PROBLEM_PRINT_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::ERROR_PRINT_LIMIT>().defaultApplied(0))
m_error_print_limit = record.getItem<ParserKeywords::MESSAGES::ERROR_PRINT_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::BUG_PRINT_LIMIT>().defaultApplied(0))
m_bug_print_limit = record.getItem<ParserKeywords::MESSAGES::BUG_PRINT_LIMIT>().get< int >( 0 );
/*****************************************************************/
if (!record.getItem<ParserKeywords::MESSAGES::MESSAGE_STOP_LIMIT>().defaultApplied(0))
m_message_stop_limit = record.getItem<ParserKeywords::MESSAGES::MESSAGE_STOP_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::COMMENT_STOP_LIMIT>().defaultApplied(0))
m_comment_stop_limit = record.getItem<ParserKeywords::MESSAGES::COMMENT_STOP_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::WARNING_STOP_LIMIT>().defaultApplied(0))
m_warning_stop_limit = record.getItem<ParserKeywords::MESSAGES::WARNING_STOP_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::PROBLEM_STOP_LIMIT>().defaultApplied(0))
m_problem_stop_limit = record.getItem<ParserKeywords::MESSAGES::PROBLEM_STOP_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::ERROR_STOP_LIMIT>().defaultApplied(0))
m_error_stop_limit = record.getItem<ParserKeywords::MESSAGES::ERROR_STOP_LIMIT>().get< int >( 0 );
if (!record.getItem<ParserKeywords::MESSAGES::BUG_STOP_LIMIT>().defaultApplied(0))
m_bug_stop_limit = record.getItem<ParserKeywords::MESSAGES::BUG_STOP_LIMIT>().get< int >( 0 );
}
Messages::Messages(const DeckRecord& record) :
m_message_print_limit( record.getItem<ParserKeywords::MESSAGES::MESSAGE_PRINT_LIMIT>().get< int >( 0 )),
m_comment_print_limit( record.getItem<ParserKeywords::MESSAGES::COMMENT_PRINT_LIMIT>().get< int >( 0 )),
m_warning_print_limit( record.getItem<ParserKeywords::MESSAGES::WARNING_PRINT_LIMIT>().get< int >(0)),
m_problem_print_limit( record.getItem<ParserKeywords::MESSAGES::PROBLEM_PRINT_LIMIT>().get< int >(0)),
m_error_print_limit( record.getItem<ParserKeywords::MESSAGES::ERROR_PRINT_LIMIT>().get< int >(0)),
m_bug_print_limit( record.getItem<ParserKeywords::MESSAGES::BUG_PRINT_LIMIT>().get< int >(0)),
m_message_stop_limit( record.getItem<ParserKeywords::MESSAGES::MESSAGE_STOP_LIMIT>().get< int >(0)),
m_comment_stop_limit( record.getItem<ParserKeywords::MESSAGES::COMMENT_STOP_LIMIT>().get< int >(0)),
m_warning_stop_limit( record.getItem<ParserKeywords::MESSAGES::WARNING_STOP_LIMIT>().get< int >(0)),
m_problem_stop_limit( record.getItem<ParserKeywords::MESSAGES::PROBLEM_STOP_LIMIT>().get< int >(0)),
m_error_stop_limit( record.getItem<ParserKeywords::MESSAGES::ERROR_STOP_LIMIT>().get< int >(0)),
m_bug_stop_limit( record.getItem<ParserKeywords::MESSAGES::BUG_STOP_LIMIT>().get< int >(0))
{ }
Messages::Messages(const Deck& deck)
{
if (deck.hasKeyword("MESSAGES")) {
const auto& record = deck.getKeyword("MESSAGES").getRecord(0);
m_message_print_limit = record.getItem<ParserKeywords::MESSAGES::MESSAGE_PRINT_LIMIT>().get< int >(0);
m_comment_print_limit = record.getItem<ParserKeywords::MESSAGES::COMMENT_PRINT_LIMIT>().get< int >(0);
m_warning_print_limit = record.getItem<ParserKeywords::MESSAGES::WARNING_PRINT_LIMIT>().get< int >(0);
m_problem_print_limit = record.getItem<ParserKeywords::MESSAGES::PROBLEM_PRINT_LIMIT>().get< int >(0);
m_error_print_limit = record.getItem<ParserKeywords::MESSAGES::ERROR_PRINT_LIMIT>().get< int >(0);
m_bug_print_limit = record.getItem<ParserKeywords::MESSAGES::BUG_PRINT_LIMIT>().get< int >(0);
m_message_stop_limit = record.getItem<ParserKeywords::MESSAGES::MESSAGE_STOP_LIMIT>().get< int >(0);
m_comment_stop_limit = record.getItem<ParserKeywords::MESSAGES::COMMENT_STOP_LIMIT>().get< int >(0);
m_warning_stop_limit = record.getItem<ParserKeywords::MESSAGES::WARNING_STOP_LIMIT>().get< int >(0);
m_problem_stop_limit = record.getItem<ParserKeywords::MESSAGES::PROBLEM_STOP_LIMIT>().get< int >(0);
m_error_stop_limit = record.getItem<ParserKeywords::MESSAGES::ERROR_STOP_LIMIT>().get< int >(0);
m_bug_stop_limit = record.getItem<ParserKeywords::MESSAGES::BUG_STOP_LIMIT>().get< int >(0);
}
}
std::vector<int> Messages::getPrintLimit() const
{
return std::vector<int> {m_message_print_limit, m_comment_print_limit, m_warning_print_limit,
m_problem_print_limit, m_error_print_limit, m_bug_print_limit};
}
std::vector<int> Messages::getStopLimit() const
{
return std::vector<int> {m_message_stop_limit, m_comment_stop_limit, m_warning_stop_limit,
m_problem_stop_limit, m_error_stop_limit, m_bug_stop_limit};
}
}

View File

@@ -1,63 +0,0 @@
/*
Copyright 2016 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 OPM_MESSAGES_HPP
#define OPM_MESSAGES_HPP
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
namespace Opm {
class Messages {
public:
/*
This constructor will create a new Messages object which is
a copy of the input argument, and then all items explicitly
set in the record are modified.
*/
Messages(const Messages& message , const DeckRecord& record);
Messages(const DeckRecord& record);
Messages(const Deck& deck);
///Get all the value from MESSAGES keyword.
std::vector<int> getPrintLimit() const;
std::vector<int> getStopLimit() const;
private:
int m_message_print_limit;
int m_comment_print_limit;
int m_warning_print_limit;
int m_problem_print_limit;
int m_error_print_limit;
int m_bug_print_limit;
int m_message_stop_limit;
int m_comment_stop_limit;
int m_warning_stop_limit;
int m_problem_stop_limit;
int m_error_stop_limit;
int m_bug_stop_limit;
};
}
#endif

View File

@@ -0,0 +1,173 @@
/*
Copyright 2016 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/>.
*/
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Parser/ParserKeywords/M.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/MessagesLimits.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
namespace Opm {
MessagesLimits::MessagesLimits(TimeMapConstPtr timemap):
m_message_print_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::MESSAGE_PRINT_LIMIT::defaultValue)),
m_comment_print_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::COMMENT_PRINT_LIMIT::defaultValue)),
m_warning_print_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::WARNING_PRINT_LIMIT::defaultValue)),
m_problem_print_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::PROBLEM_PRINT_LIMIT::defaultValue)),
m_error_print_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::ERROR_PRINT_LIMIT::defaultValue)),
m_bug_print_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::BUG_PRINT_LIMIT::defaultValue)),
m_message_stop_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::MESSAGE_STOP_LIMIT::defaultValue)),
m_comment_stop_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::COMMENT_STOP_LIMIT::defaultValue)),
m_warning_stop_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::WARNING_STOP_LIMIT::defaultValue)),
m_problem_stop_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::PROBLEM_STOP_LIMIT::defaultValue)),
m_error_stop_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::ERROR_STOP_LIMIT::defaultValue)),
m_bug_stop_limit(new DynamicState<int>(timemap, ParserKeywords::MESSAGES::BUG_STOP_LIMIT::defaultValue))
{
}
int MessagesLimits::getMessagePrintLimit(size_t timestep) const
{
return m_message_print_limit->get(timestep);
}
int MessagesLimits::getCommentPrintLimit(size_t timestep) const
{
return m_comment_print_limit->get(timestep);
}
int MessagesLimits::getWarningPrintLimit(size_t timestep) const
{
return m_warning_print_limit->get(timestep);
}
int MessagesLimits::getProblemPrintLimit(size_t timestep) const
{
return m_problem_print_limit->get(timestep);
}
int MessagesLimits::getErrorPrintLimit(size_t timestep) const
{
return m_error_print_limit->get(timestep);
}
int MessagesLimits::getBugPrintLimit(size_t timestep) const
{
return m_bug_print_limit->get(timestep);
}
void MessagesLimits::setMessagePrintLimit(size_t timestep, int value)
{
m_message_print_limit->update(timestep, value);
}
void MessagesLimits::setCommentPrintLimit(size_t timestep, int value)
{
m_comment_print_limit->update(timestep, value);
}
void MessagesLimits::setWarningPrintLimit(size_t timestep, int value)
{
m_warning_print_limit->update(timestep, value);
}
void MessagesLimits::setProblemPrintLimit(size_t timestep, int value)
{
m_problem_print_limit->update(timestep, value);
}
void MessagesLimits::setErrorPrintLimit(size_t timestep, int value)
{
m_error_print_limit->update(timestep, value);
}
void MessagesLimits::setBugPrintLimit(size_t timestep, int value)
{
m_bug_print_limit->update(timestep, value);
}
int MessagesLimits::getMessageStopLimit(size_t timestep) const
{
return m_message_stop_limit->get(timestep);
}
int MessagesLimits::getCommentStopLimit(size_t timestep) const
{
return m_comment_stop_limit->get(timestep);
}
int MessagesLimits::getWarningStopLimit(size_t timestep) const
{
return m_warning_stop_limit->get(timestep);
}
int MessagesLimits::getProblemStopLimit(size_t timestep) const
{
return m_problem_stop_limit->get(timestep);
}
int MessagesLimits::getErrorStopLimit(size_t timestep) const
{
return m_error_stop_limit->get(timestep);
}
int MessagesLimits::getBugStopLimit(size_t timestep) const
{
return m_bug_stop_limit->get(timestep);
}
void MessagesLimits::setMessageStopLimit(size_t timestep, int value)
{
m_message_stop_limit->update(timestep, value);
}
void MessagesLimits::setCommentStopLimit(size_t timestep, int value)
{
m_comment_stop_limit->update(timestep, value);
}
void MessagesLimits::setWarningStopLimit(size_t timestep, int value)
{
m_warning_stop_limit->update(timestep, value);
}
void MessagesLimits::setProblemStopLimit(size_t timestep, int value)
{
m_problem_stop_limit->update(timestep, value);
}
void MessagesLimits::setErrorStopLimit(size_t timestep, int value)
{
m_error_stop_limit->update(timestep, value);
}
void MessagesLimits::setBugStopLimit(size_t timestep, int value)
{
m_bug_stop_limit->update(timestep, value);
}
}

View File

@@ -0,0 +1,83 @@
/*
Copyright 2016 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 OPM_MESSAGES_HPP
#define OPM_MESSAGES_HPP
namespace Opm {
template<typename> class DynamicState;
class TimeMap;
class MessagesLimits {
public:
/*
This constructor will create a new Messages object which is
a copy of the input argument, and then all items explicitly
set in the record are modified.
*/
MessagesLimits(std::shared_ptr<const TimeMap> timemap);
///Get all the value from MESSAGES keyword.
int getMessagePrintLimit(size_t timestep) const;
int getCommentPrintLimit(size_t timestep) const;
int getWarningPrintLimit(size_t timestep) const;
int getProblemPrintLimit(size_t timestep) const;
int getErrorPrintLimit(size_t timestep) const;
int getBugPrintLimit(size_t timestep) const;
void setMessagePrintLimit(size_t timestep, int value);
void setCommentPrintLimit(size_t timestep, int value);
void setWarningPrintLimit(size_t timestep, int value);
void setProblemPrintLimit(size_t timestep, int value);
void setErrorPrintLimit(size_t timestep, int value);
void setBugPrintLimit(size_t timestep, int value);
int getMessageStopLimit(size_t timestep) const;
int getCommentStopLimit(size_t timestep) const;
int getWarningStopLimit(size_t timestep) const;
int getProblemStopLimit(size_t timestep) const;
int getErrorStopLimit(size_t timestep) const;
int getBugStopLimit(size_t timestep) const;
void setMessageStopLimit(size_t timestep, int value);
void setCommentStopLimit(size_t timestep, int value);
void setWarningStopLimit(size_t timestep, int value);
void setProblemStopLimit(size_t timestep, int value);
void setErrorStopLimit(size_t timestep, int value);
void setBugStopLimit(size_t timestep, int value);
private:
std::shared_ptr<DynamicState<int>> m_message_print_limit;
std::shared_ptr<DynamicState<int>> m_comment_print_limit;
std::shared_ptr<DynamicState<int>> m_warning_print_limit;
std::shared_ptr<DynamicState<int>> m_problem_print_limit;
std::shared_ptr<DynamicState<int>> m_error_print_limit;
std::shared_ptr<DynamicState<int>> m_bug_print_limit;
std::shared_ptr<DynamicState<int>> m_message_stop_limit;
std::shared_ptr<DynamicState<int>> m_comment_stop_limit;
std::shared_ptr<DynamicState<int>> m_warning_stop_limit;
std::shared_ptr<DynamicState<int>> m_problem_stop_limit;
std::shared_ptr<DynamicState<int>> m_error_stop_limit;
std::shared_ptr<DynamicState<int>> m_bug_stop_limit;
};
}
#endif

View File

@@ -67,7 +67,8 @@ namespace Opm {
std::shared_ptr<const EclipseGrid> grid,
const Deck& deck ) :
m_timeMap( std::make_shared< TimeMap>( deck )),
m_grid( grid )
m_grid( grid ),
m_messagesLimits(m_timeMap)
{
m_tuning.reset(new Tuning(m_timeMap));
m_events.reset(new Events(m_timeMap));
@@ -215,6 +216,9 @@ namespace Opm {
else if (keyword.name() == "WECON")
handleWECON(keyword, currentStep);
else if (keyword.name() == "MESSAGES")
handleMESSAGES(keyword, currentStep);
else if (geoModifiers.find( keyword.name() ) != geoModifiers.end()) {
bool supported = geoModifiers.at( keyword.name() );
if (supported) {
@@ -1134,6 +1138,39 @@ namespace Opm {
}
void Schedule::handleMESSAGES( const DeckKeyword& keyword, size_t currentStep) {
const auto& record = keyword.getRecord(0);
int msgPrint = record.getItem("MESSAGE_PRINT_LIMIT").get< int >(0);
int msgStop = record.getItem("MESSAGE_STOP_LIMIT").get< int >(0);
m_messagesLimits.setMessagePrintLimit(currentStep, msgPrint);
m_messagesLimits.setMessageStopLimit(currentStep, msgStop);
int commentPrint = record.getItem("COMMENT_PRINT_LIMIT").get< int >(0);
int commentStop = record.getItem("COMMENT_STOP_LIMIT").get< int >(0);
m_messagesLimits.setCommentPrintLimit(currentStep, commentPrint);
m_messagesLimits.setCommentStopLimit(currentStep, commentStop);
int warnPrint = record.getItem("WARNING_PRINT_LIMIT").get< int >(0);
int warnStop = record.getItem("WARNING_STOP_LIMIT").get< int >(0);
m_messagesLimits.setWarningPrintLimit(currentStep, warnPrint);
m_messagesLimits.setWarningStopLimit(currentStep, warnStop);
int probPrint = record.getItem("PROBLEM_PRINT_LIMIT").get< int >(0);
int probStop = record.getItem("PROBLEM_STOP_LIMIT").get< int >(0);
m_messagesLimits.setWarningPrintLimit(currentStep, probPrint);
m_messagesLimits.setWarningStopLimit(currentStep, probStop);
int errPrint = record.getItem("ERROR_PRINT_LIMIT").get< int >(0);
int errStop = record.getItem("ERROR_STOP_LIMIT").get< int >(0);
m_messagesLimits.setErrorPrintLimit(currentStep, errPrint);
m_messagesLimits.setErrorStopLimit(currentStep, errStop);
int bugPrint = record.getItem("BUG_PRINT_LIMIT").get< int >(0);
int bugStop = record.getItem("BUG_STOP_LIMIT").get< int >(0);
m_messagesLimits.setBugPrintLimit(currentStep, bugPrint);
m_messagesLimits.setBugStopLimit(currentStep, bugStop);
}
void Schedule::handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep) {
const auto wells = this->getWells( currentStep );
auto completions = Completion::fromCOMPDAT( keyword, wells );
@@ -1522,6 +1559,9 @@ namespace Opm {
return m_modifierDeck->iget( timeStep );
}
const MessagesLimits& Schedule::getMessagesLimits() const {
return m_messagesLimits;
}
const MessageContainer& Schedule::getMessageContainer() const {
return m_messages;

View File

@@ -26,6 +26,7 @@
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/MessagesLimits.hpp>
#include <opm/parser/eclipse/Parser/MessageContainer.hpp>
namespace Opm
@@ -48,6 +49,7 @@ namespace Opm
class Tuning;
class UnitSystem;
class Well;
class MessagesLimits;
class Schedule {
public:
@@ -83,6 +85,7 @@ namespace Opm
const Group* getGroup(const std::string& groupName) const;
std::vector< const Group* > getGroups() const;
std::shared_ptr< Tuning > getTuning() const;
const MessagesLimits& getMessagesLimits() const;
const Events& getEvents() const;
bool hasOilVaporizationProperties();
@@ -101,6 +104,7 @@ namespace Opm
std::shared_ptr<Events> m_events;
std::shared_ptr<DynamicVector<std::shared_ptr<Deck> > > m_modifierDeck;
std::shared_ptr< Tuning > m_tuning;
MessagesLimits m_messagesLimits;
MessageContainer m_messages;
@@ -141,6 +145,7 @@ namespace Opm
void handleDRVDT( const DeckKeyword& keyword, size_t currentStep);
void handleVAPPARS( const DeckKeyword& keyword, size_t currentStep);
void handleWECON( const DeckKeyword& keyword, size_t currentStep);
void handleMESSAGES(const DeckKeyword& keyword, size_t currentStep);
void checkUnhandledKeywords( const SCHEDULESection& ) const;