make the messages relates to history to print file.

This commit is contained in:
Liu Ming
2016-06-08 13:46:34 +02:00
parent 6c7af4afc1
commit c843c714de
3 changed files with 11 additions and 3 deletions

View File

@@ -156,12 +156,15 @@ namespace Opm {
bool Well::setStatus(size_t timeStep, WellCommon::StatusEnum status) {
if ((WellCommon::StatusEnum::OPEN == status) && getCompletions(timeStep)->allCompletionsShut()) {
std::cerr << "ERROR when handling keyword for well "<< name() << ": Cannot open a well where all completions are shut" << std::endl;
m_messages.note("ERROR when handling keyword for well " + name() + ": Cannot open a well where all completions are shut");
return false;
} else
return m_status->update( timeStep , status );
}
const MessageContainer& Well::getMessageContainer() const {
return m_messages;
}
bool Well::isProducer(size_t timeStep) const {
return m_isProducer->get(timeStep);
}