ENH: add error::master() static for low-level messages

- a Pstream::master with a Pstream::parRun guard in case Pstream has
  not yet been initialised, as will be the case for low-level messages
  during startup.

- propagate relativeName handling into IOstreams
This commit is contained in:
Mark Olesen
2021-11-04 11:39:39 +01:00
parent 0bd113f537
commit 794e23e083
29 changed files with 212 additions and 171 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -161,9 +161,7 @@ static void expandLeadingTilde(std::string& s)
// Compat Warning
const int version(1806);
// Single warning (on master) with guard to avoid Pstream::master()
// when Pstream has not yet been initialized
if (UPstream::parRun() ? UPstream::master() : true)
if (error::master())
{
std::cerr
<< nl