Put additional debug switches under command-line control

This commit is contained in:
Martin Beaudoin 2014-05-28 22:32:29 -04:00
parent 705a5bc7c9
commit e95300d296
32 changed files with 115 additions and 40 deletions

View file

@ -36,9 +36,11 @@ namespace Foam
\
defineNamedTemplateTypeNameAndDebug(fvPatchTypeField, 0); \
template<> \
int fvPatchTypeField::disallowGenericFvPatchField \
debug::debugSwitch \
fvPatchTypeField::disallowGenericFvPatchField \
( \
debug::debugSwitchFromDict("disallowGenericFvPatchField", 0) \
"disallowGenericFvPatchField", \
0 \
); \
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch); \
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper); \

View file

@ -36,9 +36,11 @@ namespace Foam
\
defineNamedTemplateTypeNameAndDebug(fvsPatchTypeField, 0); \
template<> \
int fvsPatchTypeField::disallowDefaultFvsPatchField \
Foam::debug::debugSwitch \
fvsPatchTypeField::disallowDefaultFvsPatchField \
( \
debug::debugSwitchFromDict("disallowDefaultFvsPatchField", 0) \
"disallowDefaultFvsPatchField", \
0 \
); \
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \

View file

@ -34,9 +34,11 @@ const Foam::label Foam::polyTopoChange::pointFraction = 10;
const Foam::label Foam::polyTopoChange::faceFraction = 10;
const Foam::label Foam::polyTopoChange::cellFraction = 10;
int Foam::polyTopoChange::debug
Foam::debug::debugSwitch
Foam::polyTopoChange::debug
(
Foam::debug::debugSwitchFromDict("polyTopoChange", 0)
"polyTopoChange",
0
);

View file

@ -121,7 +121,7 @@ class polyTopoChange
public:
static int debug;
static debug::debugSwitch debug;
// Constructors

View file

@ -43,6 +43,7 @@ SourceFiles
#include "faPatch.H"
#include "DimensionedField.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -96,7 +97,7 @@ public:
TypeName("faPatchField");
//- Debug switch to disallow the use of
static int disallowDefaultFaPatchField;
static debug::debugSwitch disallowDefaultFaPatchField;
// Declare run-time constructor selection tables

View file

@ -36,9 +36,11 @@ namespace Foam
\
defineNamedTemplateTypeNameAndDebug(faPatchTypeField, 0); \
template<> \
int faPatchTypeField::disallowDefaultFaPatchField \
Foam::debug::debugSwitch \
faPatchTypeField::disallowDefaultFaPatchField \
( \
debug::debugSwitchFromDict("disallowDefaultFaPatchField", 0) \
"disallowDefaultFaPatchField", \
0 \
); \
defineTemplateRunTimeSelectionTable(faPatchTypeField, patch); \
defineTemplateRunTimeSelectionTable(faPatchTypeField, patchMapper); \

View file

@ -43,6 +43,7 @@ SourceFiles
#include "faPatch.H"
#include "DimensionedField.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +94,7 @@ public:
TypeName("faePatchField");
//- Debug switch to disallow the use of
static int disallowDefaultFaePatchField;
static debug::debugSwitch disallowDefaultFaePatchField;
// Declare run-time constructor selection tables

View file

@ -39,9 +39,11 @@ namespace Foam
\
defineNamedTemplateTypeNameAndDebug(faePatchTypeField, 0); \
template<> \
int faePatchTypeField::disallowDefaultFaePatchField \
Foam::debug::debugSwitch \
faePatchTypeField::disallowDefaultFaePatchField \
( \
debug::debugSwitchFromDict("disallowDefaultFaePatchField", 0) \
"disallowDefaultFaePatchField", \
0 \
); \
defineTemplateRunTimeSelectionTable(faePatchTypeField, patch); \
defineTemplateRunTimeSelectionTable(faePatchTypeField, patchMapper); \

View file

@ -35,7 +35,12 @@ Description
namespace Foam
{
int faSchemes::debug(Foam::debug::debugSwitchFromDict("faSchemes", false));
Foam::debug::debugSwitch
faSchemes::debug
(
"faSchemes",
false
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View file

@ -38,6 +38,7 @@ SourceFiles
#define faSchemes_H
#include "IOdictionary.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -90,7 +91,7 @@ private:
public:
//- Debug switch
static int debug;
static debug::debugSwitch debug;
// Constructors

View file

@ -46,6 +46,7 @@ SourceFiles
#include "fvPatch.H"
#include "DimensionedField.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -114,7 +115,7 @@ public:
TypeName("fvPatchField");
//- Debug switch to disallow the use of genericFvPatchField
static int disallowGenericFvPatchField;
static debug::debugSwitch disallowGenericFvPatchField;
// Declare run-time constructor selection tables

View file

@ -36,9 +36,11 @@ namespace Foam
\
defineNamedTemplateTypeNameAndDebug(fvPatchTypeField, 0); \
template<> \
int fvPatchTypeField::disallowGenericFvPatchField \
Foam::debug::debugSwitch \
fvPatchTypeField::disallowGenericFvPatchField \
( \
debug::debugSwitchFromDict("disallowGenericFvPatchField", 0) \
"disallowGenericFvPatchField", \
0 \
); \
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch); \
defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper); \

View file

@ -98,7 +98,7 @@ public:
TypeName("fvsPatchField");
//- Debug switch to disallow the use of
static int disallowDefaultFvsPatchField;
static debug::debugSwitch disallowDefaultFvsPatchField;
// Declare run-time constructor selection tables

View file

@ -36,9 +36,11 @@ namespace Foam
\
defineNamedTemplateTypeNameAndDebug(fvsPatchTypeField, 0); \
template<> \
int fvsPatchTypeField::disallowDefaultFvsPatchField \
Foam::debug::debugSwitch \
fvsPatchTypeField::disallowDefaultFvsPatchField \
( \
debug::debugSwitchFromDict("disallowDefaultFvsPatchField", 0) \
"disallowDefaultFvsPatchField", \
0 \
); \
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \
defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \

View file

@ -29,7 +29,12 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
int Foam::fvSchemes::debug(Foam::debug::debugSwitchFromDict("fvSchemes", false));
Foam::debug::debugSwitch
Foam::fvSchemes::debug
(
"fvSchemes",
false
);
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //

View file

@ -38,6 +38,7 @@ SourceFiles
#define fvSchemes_H
#include "IOdictionary.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -96,7 +97,7 @@ class fvSchemes
public:
//- Debug switch
static int debug;
static debug::debugSwitch debug;
// Constructors

View file

@ -28,7 +28,12 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
int Foam::cellPointWeight::debug(debug::debugSwitchFromDict("cellPointWeight", 0));
Foam::debug::debugSwitch
Foam::cellPointWeight::debug
(
"cellPointWeight",
0
);
Foam::scalar Foam::cellPointWeight::tol(SMALL);
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //

View file

@ -84,7 +84,7 @@ protected:
public:
//- Debug switch
static int debug;
static debug::debugSwitch debug;
//- Tolerance used in calculating barycentric co-ordinates
// (applied to normailised values)

View file

@ -29,7 +29,12 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
int Foam::messageStream::level(Foam::debug::debugSwitchFromDict("level", 2));
Foam::debug::debugSwitch
Foam::messageStream::level
(
"level",
2
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -48,6 +48,7 @@ SourceFiles
#include "label.H"
#include "string.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +94,7 @@ public:
// Debug switches
static int level;
static debug::debugSwitch level;
// Constructors

View file

@ -30,7 +30,13 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineRunTimeSelectionTable(Foam::functionObject, dictionary);
int Foam::functionObject::debug(Foam::debug::debugSwitchFromDict("functionObject", 0));
Foam::debug::debugSwitch
Foam::functionObject::debug
(
"functionObject",
0
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View file

@ -41,6 +41,7 @@ SourceFiles
#include "typeInfo.H"
#include "autoPtr.H"
#include "runTimeSelectionTables.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -76,7 +77,7 @@ public:
//- Runtime type information
virtual const word& type() const = 0;
static int debug;
static debug::debugSwitch debug;
// Declare run-time constructor selection tables

View file

@ -28,7 +28,12 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
int Foam::scalarRange::debug(::Foam::debug::debugSwitchFromDict("scalarRange", 0));
Foam::debug::debugSwitch
Foam::scalarRange::debug
(
"scalarRange",
0
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View file

@ -40,6 +40,7 @@ SourceFiles
#define scalarRange_H
#include "scalar.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -82,7 +83,7 @@ class scalarRange
public:
static int debug;
static debug::debugSwitch debug;
// Constructors

View file

@ -33,7 +33,12 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
int Foam::solution::debug(::Foam::debug::debugSwitchFromDict("solution", 0));
Foam::debug::debugSwitch
Foam::solution::debug
(
"solution",
0
);
// List of sub-dictionaries to rewrite
//! @cond localScope

View file

@ -36,6 +36,7 @@ SourceFiles
#define solution_H
#include "IOdictionary.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -77,7 +78,7 @@ public:
static label upgradeSolverDict(dictionary& dict, const bool verbose=true);
//- Debug switch
static int debug;
static debug::debugSwitch debug;
// Constructors

View file

@ -30,7 +30,12 @@ License
const char* const Foam::cell::typeName = "cell";
int Foam::cell::debug(debug::debugSwitchFromDict("cell", 0));
Foam::debug::debugSwitch
Foam::cell::debug
(
"cell",
0
);
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View file

@ -37,6 +37,7 @@ SourceFiles
#include "faceList.H"
#include "oppositeFace.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +67,7 @@ public:
static const char* const typeName;
//- Debug switch
static int debug;
static Foam::debug::debugSwitch debug;
// Constructors

View file

@ -39,9 +39,11 @@ namespace Foam
{
defineTypeNameAndDebug(polyPatch, 0);
int polyPatch::disallowGenericPolyPatch
debug::debugSwitch
polyPatch::disallowGenericPolyPatch
(
debug::debugSwitchFromDict("disallowGenericPolyPatch", 0)
"disallowGenericPolyPatch",
0
);
defineRunTimeSelectionTable(polyPatch, word);

View file

@ -226,7 +226,7 @@ public:
// Static data
//- Debug switch to disallow the use of genericPolyPatch
static int disallowGenericPolyPatch;
static debug::debugSwitch disallowGenericPolyPatch;
//- Relative tolerance (for geometric matching)
// Calculated as a factor of maximum edge length per face.

View file

@ -32,7 +32,14 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const char* const Foam::fileName::typeName = "fileName";
int Foam::fileName::debug(debug::debugSwitchFromDict(fileName::typeName, 0));
Foam::debug::debugSwitch
Foam::fileName::debug
(
fileName::typeName,
0
);
const Foam::fileName Foam::fileName::null;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View file

@ -45,6 +45,7 @@ SourceFiles
#define fileName_H
#include "word.H"
#include "controlSwitches.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -91,7 +92,7 @@ public:
// Static data members
static const char* const typeName;
static int debug;
static debug::debugSwitch debug;
static const fileName null;