diff --git a/src/OpenFOAM/db/functionObjects/writeLocalObjects/writeLocalObjects.H b/src/OpenFOAM/db/functionObjects/writeLocalObjects/writeLocalObjects.H index 84ebaf1c07..0ee2be8037 100644 --- a/src/OpenFOAM/db/functionObjects/writeLocalObjects/writeLocalObjects.H +++ b/src/OpenFOAM/db/functionObjects/writeLocalObjects/writeLocalObjects.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -118,7 +118,7 @@ public: writeLocalObjects ( const objectRegistry& obr, - const Switch& logRef + const Switch& logRef = logFalse ); //- Disallow default bitwise copy construction diff --git a/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C b/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C index b762bb5d75..3be50415dd 100644 --- a/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C +++ b/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,11 @@ License #include "Time.H" #include "dictionary.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +const Foam::Switch Foam::functionObjects::writeObjectsBase::logFalse(false); + + // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void Foam::functionObjects::writeObjectsBase::resetWriteObjectName diff --git a/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.H b/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.H index d84f697fc4..2082c13deb 100644 --- a/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.H +++ b/src/OpenFOAM/db/functionObjects/writeObjectsBase/writeObjectsBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,6 +96,9 @@ protected: //- Reference to the region objectRegistry const objectRegistry& writeObr_; + //- False switch to which log_ defaults + static const Switch logFalse; + //- Reference to the inheriting function object's log variable const Switch& log_; @@ -131,7 +134,7 @@ public: writeObjectsBase ( const objectRegistry& obr, - const Switch& logRef + const Switch& logRef = logFalse ); //- Disallow default bitwise copy construction diff --git a/src/combustionModels/functionObjects/Qdot/Qdot.C b/src/combustionModels/functionObjects/Qdot/Qdot.C index 78c1cb8431..803702c504 100644 --- a/src/combustionModels/functionObjects/Qdot/Qdot.C +++ b/src/combustionModels/functionObjects/Qdot/Qdot.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::functionObjects::Qdot::Qdot ) : fvMeshFunctionObject(name, runTime, dict), - writeLocalObjects(obr_, false), + writeLocalObjects(obr_), phaseName_(word::null) { read(dict); diff --git a/src/combustionModels/functionObjects/Qdot/Qdot.H b/src/combustionModels/functionObjects/Qdot/Qdot.H index 5322ae293b..6355999248 100644 --- a/src/combustionModels/functionObjects/Qdot/Qdot.H +++ b/src/combustionModels/functionObjects/Qdot/Qdot.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,8 +55,6 @@ class Qdot public fvMeshFunctionObject, public writeLocalObjects { -private: - // Private Data //- The name of the phase diff --git a/src/functionObjects/field/shearStress/shearStress.C b/src/functionObjects/field/shearStress/shearStress.C index 3eeb976aa7..24bb06df5f 100644 --- a/src/functionObjects/field/shearStress/shearStress.C +++ b/src/functionObjects/field/shearStress/shearStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,7 @@ Foam::functionObjects::shearStress::shearStress ) : fvMeshFunctionObject(name, runTime, dict), - writeLocalObjects(obr_, false), + writeLocalObjects(obr_), phaseName_(word::null) { read(dict); diff --git a/src/functionObjects/field/totalEnthalpy/totalEnthalpy.C b/src/functionObjects/field/totalEnthalpy/totalEnthalpy.C index 968def372a..982ffe25d4 100644 --- a/src/functionObjects/field/totalEnthalpy/totalEnthalpy.C +++ b/src/functionObjects/field/totalEnthalpy/totalEnthalpy.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,7 +49,7 @@ Foam::functionObjects::totalEnthalpy::totalEnthalpy ) : fvMeshFunctionObject(name, runTime, dict), - writeLocalObjects(obr_, false), + writeLocalObjects(obr_), phaseName_(word::null) { read(dict);