Made changes to comply w/ removal of MessageContainer.

This commit is contained in:
Steinar Foss 2018-03-26 12:13:55 +02:00
parent 6f18f7115f
commit a931901374
2 changed files with 0 additions and 116 deletions

View File

@ -108,7 +108,6 @@ namespace Opm
namespace detail
{
boost::filesystem::path simulationCaseName( const std::string& casename );
int64_t convertMessageType(const Message::type& mtype);
}
@ -145,7 +144,6 @@ namespace Opm
asImpl().readDeckInput();
asImpl().setupOutput();
asImpl().setupLogging();
asImpl().extractMessages();
asImpl().setupGridAndProps();
asImpl().runDiagnostics();
asImpl().setupState();
@ -741,44 +739,6 @@ namespace Opm
}
// Extract messages from parser.
// Writes to:
// OpmLog singleton.
void extractMessages()
{
if ( !output_cout_ )
{
return;
}
auto extractMessage = [](const Message& msg) {
auto log_type = detail::convertMessageType(msg.mtype);
const auto& location = msg.location;
if (location) {
OpmLog::addTaggedMessage(log_type, "Parser message", Log::fileMessage(location.filename, location.lineno, msg.message));
} else {
OpmLog::addTaggedMessage(log_type, "Parser message", msg.message);
}
};
// Extract messages from Deck.
for(const auto& msg : deck_->getMessageContainer()) {
extractMessage(msg);
}
// Extract messages from EclipseState.
for (const auto& msg : eclipse_state_->getMessageContainer()) {
extractMessage(msg);
}
}
// Run diagnostics.
// Writes to:
// OpmLog singleton.
@ -1004,31 +964,6 @@ namespace Opm
}
int64_t convertMessageType(const Message::type& mtype)
{
switch (mtype) {
case Message::type::Debug:
return Log::MessageType::Debug;
case Message::type::Info:
return Log::MessageType::Info;
case Message::type::Warning:
return Log::MessageType::Warning;
case Message::type::Error:
return Log::MessageType::Error;
case Message::type::Problem:
return Log::MessageType::Problem;
case Message::type::Bug:
return Log::MessageType::Bug;
case Message::type::Note:
return Log::MessageType::Note;
}
throw std::logic_error("Invalid messages type!\n");
}
} // namespace detail

View File

@ -106,7 +106,6 @@ namespace Opm
setupOutput();
setupLogging();
printPRTHeader();
extractMessages();
runDiagnostics();
setupOutputWriter();
setupLinearSolver();
@ -465,36 +464,6 @@ namespace Opm
const Schedule& schedule() const
{ return ebosSimulator_->vanguard().schedule(); }
// Extract messages from parser.
// Writes to:
// OpmLog singleton.
void extractMessages()
{
if ( !output_cout_ )
{
return;
}
auto extractMessage = [this](const Message& msg) {
auto log_type = this->convertMessageType(msg.mtype);
const auto& location = msg.location;
if (location) {
OpmLog::addMessage(log_type, Log::fileMessage(location.filename, location.lineno, msg.message));
} else {
OpmLog::addMessage(log_type, msg.message);
}
};
// Extract messages from Deck.
for(const auto& msg : deck().getMessageContainer()) {
extractMessage(msg);
}
// Extract messages from EclipseState.
for (const auto& msg : eclState().getMessageContainer()) {
extractMessage(msg);
}
}
// Run diagnostics.
// Writes to:
@ -639,26 +608,6 @@ namespace Opm
return pages * page_size;
}
int64_t convertMessageType(const Message::type& mtype)
{
switch (mtype) {
case Message::type::Debug:
return Log::MessageType::Debug;
case Message::type::Info:
return Log::MessageType::Info;
case Message::type::Warning:
return Log::MessageType::Warning;
case Message::type::Error:
return Log::MessageType::Error;
case Message::type::Problem:
return Log::MessageType::Problem;
case Message::type::Bug:
return Log::MessageType::Bug;
case Message::type::Note:
return Log::MessageType::Note;
}
throw std::logic_error("Invalid messages type!\n");
}
Grid& grid()
{ return ebosSimulator_->vanguard().grid(); }