Commit 88f357fc authored by Andrew Heather's avatar Andrew Heather Committed by Andrew Heather
Browse files

ENH: fvOptions - added 'log' helper for verbose output

parent 7d89b72e
......@@ -58,9 +58,10 @@ Foam::fv::option::option
coeffs_(dict.optionalSubDict(modelType + "Coeffs")),
active_(dict_.lookupOrDefault<Switch>("active", true)),
fieldNames_(),
applied_()
applied_(),
log(true)
{
Info<< incrIndent << indent << "Source: " << name_ << endl << decrIndent;
Log << incrIndent << indent << "Source: " << name_ << endl << decrIndent;
}
......
......@@ -6,7 +6,8 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -102,8 +103,10 @@ public:
//- Runtime type information
TypeName("option");
//- Switch write log to Info
bool log;
// Declare run-time constructor selection table
// Declare run-time constructor selection table
declareRunTimeSelectionTable
(
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -55,6 +56,8 @@ bool Foam::fv::option::read(const dictionary& dict)
{
dict.readIfPresent("active", active_);
log = dict.getOrDefault("log", true);
coeffs_ = dict.optionalSubDict(modelType_ + "Coeffs");
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment