mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Make sure output() doesn't always write to stderr
This commit is contained in:
parent
7e1abc439b
commit
24c84e394c
2 changed files with 4 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ void output(const std::string& message, std::ostream& out, int indent)
|
|||
while (i_start < length) {
|
||||
if (length - i_start < line_len) {
|
||||
// Remainder of message will fit on line
|
||||
std::cerr << message.substr(i_start) << '\n';
|
||||
out << message.substr(i_start) << '\n';
|
||||
break;
|
||||
|
||||
} else {
|
||||
|
|
@ -42,7 +42,7 @@ void output(const std::string& message, std::ostream& out, int indent)
|
|||
auto pos = s.find_last_of(' ');
|
||||
|
||||
// Write up to last space, or whole line if no space is present
|
||||
std::cerr << s.substr(0, pos) << '\n' << std::setw(indent) << " ";
|
||||
out << s.substr(0, pos) << '\n' << std::setw(indent) << " ";
|
||||
|
||||
// Advance starting position
|
||||
i_start += (pos == std::string::npos) ? line_len : pos + 1;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void title()
|
|||
" ############### %%%%%%%%%%%%%%%%\n" <<
|
||||
" ############ %%%%%%%%%%%%%%%\n" <<
|
||||
" ######## %%%%%%%%%%%%%%\n" <<
|
||||
" %%%%%%%%%%%\n";
|
||||
" %%%%%%%%%%%\n\n";
|
||||
|
||||
// Write version information
|
||||
std::cout <<
|
||||
|
|
@ -88,7 +88,7 @@ void title()
|
|||
|
||||
#ifdef _OPENMP
|
||||
// Write number of OpenMP threads
|
||||
std::cout << " OpenMC Threads | " << omp_get_max_threads() << '\n';
|
||||
std::cout << " OpenMP Threads | " << omp_get_max_threads() << '\n';
|
||||
#endif
|
||||
std::cout << '\n';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue