Merge pull request #2680 from joakim-hove/output-width
Ensure that normal keywords are not split on output
This commit is contained in:
commit
7ad1f360bd
@ -42,7 +42,7 @@ namespace Opm {
|
||||
void start_record( );
|
||||
void end_record( );
|
||||
|
||||
void start_keyword(const std::string& kw);
|
||||
void start_keyword(const std::string& kw, bool split_line);
|
||||
void end_keyword(bool add_slash);
|
||||
|
||||
void endl();
|
||||
|
@ -292,7 +292,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
void DeckKeyword::write_TITLE( DeckOutput& output ) const {
|
||||
output.start_keyword( this->name( ) );
|
||||
output.start_keyword( this->name( ), false );
|
||||
{
|
||||
const auto& record = this->getRecord(0);
|
||||
output.write_string(" ");
|
||||
@ -305,7 +305,11 @@ namespace Opm {
|
||||
if (this->name() == "TITLE")
|
||||
this->write_TITLE( output );
|
||||
else {
|
||||
output.start_keyword( this->name( ) );
|
||||
bool split_line = this->isDataKeyword();
|
||||
if (this->name() == "VFPPROD" || this->name() == "VFPINJ")
|
||||
split_line = true;
|
||||
|
||||
output.start_keyword( this->name( ), split_line );
|
||||
this->write_data( output );
|
||||
output.end_keyword( this->m_slashTerminated );
|
||||
}
|
||||
|
@ -104,11 +104,9 @@ namespace Opm {
|
||||
}
|
||||
|
||||
|
||||
void DeckOutput::start_keyword(const std::string& kw) {
|
||||
void DeckOutput::start_keyword(const std::string& kw, bool split_line_arg) {
|
||||
this->os << kw << std::endl;
|
||||
this->split_line = true;
|
||||
if (kw == "UDQ" || kw == "ACTIONX")
|
||||
this->split_line = false;
|
||||
this->split_line = split_line_arg;
|
||||
}
|
||||
|
||||
|
||||
|
@ -563,7 +563,7 @@ ABC";
|
||||
out.fmt.columns = 2;
|
||||
out.fmt.keyword_sep = "ABC";
|
||||
|
||||
out.start_keyword("KEYWORD");
|
||||
out.start_keyword("KEYWORD", true);
|
||||
out.start_record();
|
||||
out.write<int>(1);
|
||||
out.write<int>(2);
|
||||
|
Loading…
Reference in New Issue
Block a user