Split the various controlSwitches derived classes under different filenames. Adjust the #include directives accordingly
This commit is contained in:
parent
e95300d296
commit
b21d148a4f
41 changed files with 543 additions and 204 deletions
|
@ -63,7 +63,7 @@ SourceFiles
|
|||
#include "ZoneIDs.H"
|
||||
#include "intersection.H"
|
||||
#include "Pair.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ SourceFiles
|
|||
#include "coupledFaPatch.H"
|
||||
#include "cyclicLduInterface.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ SourceFiles
|
|||
|
||||
#include "faPatch.H"
|
||||
#include "DimensionedField.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ SourceFiles
|
|||
|
||||
#include "faPatch.H"
|
||||
#include "DimensionedField.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ SourceFiles
|
|||
#define faSchemes_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ License
|
|||
#include "processorFvsPatchFields.H"
|
||||
#include "inletOutletFvPatchFields.H"
|
||||
#include "fvc.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ SourceFiles
|
|||
|
||||
#include "fvPatch.H"
|
||||
#include "DimensionedField.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ SourceFiles
|
|||
#define fvSchemes_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ SourceFiles
|
|||
#include "boolList.H"
|
||||
#include "labelList.H"
|
||||
#include "primitiveFieldsFwd.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ Author
|
|||
#include "point.H"
|
||||
#include "className.H"
|
||||
#include "linePointRef.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ SourceFiles
|
|||
#include "scalar.H"
|
||||
#include "fileName.H"
|
||||
#include "InfoProxy.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "infoSwitch.H"
|
||||
|
||||
#include "debug.H"
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ SourceFiles
|
|||
#include "HashTable.H"
|
||||
#include "string.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "optimisationSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ SourceFiles
|
|||
|
||||
#include "label.H"
|
||||
#include "string.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ SourceFiles
|
|||
#include "typeInfo.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ SourceFiles
|
|||
#include "IOobject.H"
|
||||
#include "typeInfo.H"
|
||||
#include "OSspecific.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "optimisationSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ SourceFiles
|
|||
#define scalarRange_H
|
||||
|
||||
#include "scalar.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ Description
|
|||
|
||||
#include "word.H"
|
||||
#include "debug.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ SourceFiles
|
|||
#include "dictionary.H"
|
||||
#include "fileName.H"
|
||||
#include "cpuTime.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "infoSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
101
src/foam/global/controlSwitches/constantsSwitch.H
Normal file
101
src/foam/global/controlSwitches/constantsSwitch.H
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::infoSwitch
|
||||
|
||||
Author
|
||||
Martin Beaudoin, Hydro-Quebec, 2014. All rights reserved
|
||||
|
||||
Description
|
||||
Handling of runtime controlSwitches.
|
||||
Specialization of controlSwitches class for dimensionedConstant switches
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef constantsSwitch_H
|
||||
#define constantsSwitch_H
|
||||
|
||||
#include "controlSwitches.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace debug
|
||||
{
|
||||
|
||||
// Typedefs
|
||||
// Hashtables to static class attributes addresses holding the
|
||||
// runtime dimensionedConstants values
|
||||
typedef std::map<std::string, std::list<controlSwitches<Foam::scalar> *> > ListConstantsControlSwitches;
|
||||
|
||||
extern ListConstantsControlSwitches* constantsSwitchValues_;
|
||||
|
||||
|
||||
class constantsSwitch
|
||||
: public controlSwitches<Foam::scalar>
|
||||
{
|
||||
public:
|
||||
constantsSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const Foam::scalar& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<Foam::scalar>
|
||||
(
|
||||
switchName,
|
||||
debug::constantsFromDict(switchName.c_str(), switchValue),
|
||||
debug::DIMENSIONEDCONSTANTS,
|
||||
&constantsSwitchValues_
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~constantsSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const Foam::scalar& rhs)
|
||||
{
|
||||
controlSwitches<Foam::scalar>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace debug
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -74,21 +74,6 @@ namespace debug
|
|||
// Forward declaration of classes
|
||||
template<class T> class controlSwitches;
|
||||
|
||||
// Typedefs
|
||||
// Hashtables to static class attributes addresses holding the
|
||||
// runtime debug/info/optimisation/tolerances values
|
||||
typedef std::map<std::string, std::list<controlSwitches<int> *> > ListDebugControlSwitches;
|
||||
typedef std::map<std::string, std::list<controlSwitches<int> *> > ListInfoControlSwitches;
|
||||
typedef std::map<std::string, std::list<controlSwitches<int> *> > ListOptimisationControlSwitches;
|
||||
typedef std::map<std::string, std::list<controlSwitches<Foam::scalar> *> > ListTolerancesControlSwitches;
|
||||
typedef std::map<std::string, std::list<controlSwitches<Foam::scalar> *> > ListConstantsControlSwitches;
|
||||
|
||||
extern ListDebugControlSwitches* debugSwitchValues_;
|
||||
extern ListInfoControlSwitches* infoSwitchValues_;
|
||||
extern ListOptimisationControlSwitches* optimisationSwitchValues_;
|
||||
extern ListTolerancesControlSwitches* tolerancesSwitchValues_;
|
||||
extern ListConstantsControlSwitches* constantsSwitchValues_;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class controlSwitches Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -178,161 +163,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// Utility classes
|
||||
class debugSwitch
|
||||
: public controlSwitches<int>
|
||||
{
|
||||
public:
|
||||
debugSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const int& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<int>
|
||||
(
|
||||
switchName,
|
||||
debug::debugSwitchFromDict(switchName.c_str(), switchValue),
|
||||
debug::DEBUGSWITCHES,
|
||||
&debugSwitchValues_
|
||||
)
|
||||
{}
|
||||
|
||||
virtual ~debugSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const int& rhs)
|
||||
{
|
||||
controlSwitches<int>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
class infoSwitch
|
||||
: public controlSwitches<int>
|
||||
{
|
||||
public:
|
||||
infoSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const int& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<int>
|
||||
(
|
||||
switchName,
|
||||
debug::infoSwitchFromDict(switchName.c_str(), switchValue),
|
||||
debug::INFOSWITCHES,
|
||||
&infoSwitchValues_
|
||||
)
|
||||
{}
|
||||
|
||||
virtual ~infoSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const int& rhs)
|
||||
{
|
||||
controlSwitches<int>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
class optimisationSwitch
|
||||
: public controlSwitches<int>
|
||||
{
|
||||
public:
|
||||
optimisationSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const int& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<int>
|
||||
(
|
||||
switchName,
|
||||
debug::optimisationSwitchFromDict(switchName.c_str(), switchValue),
|
||||
debug::OPTIMISATIONSWITCHES,
|
||||
&optimisationSwitchValues_
|
||||
)
|
||||
{}
|
||||
|
||||
virtual ~optimisationSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const int& rhs)
|
||||
{
|
||||
controlSwitches<int>::operator=(rhs);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
class tolerancesSwitch
|
||||
: public controlSwitches<Foam::scalar>
|
||||
{
|
||||
public:
|
||||
tolerancesSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const Foam::scalar& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<Foam::scalar>
|
||||
(
|
||||
switchName,
|
||||
debug::tolerancesFromDict(switchName.c_str(), switchValue),
|
||||
debug::TOLERANCES,
|
||||
&tolerancesSwitchValues_
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~tolerancesSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const Foam::scalar& rhs)
|
||||
{
|
||||
controlSwitches<Foam::scalar>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
class constantsSwitch
|
||||
: public controlSwitches<Foam::scalar>
|
||||
{
|
||||
public:
|
||||
constantsSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const Foam::scalar& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<Foam::scalar>
|
||||
(
|
||||
switchName,
|
||||
debug::constantsFromDict(switchName.c_str(), switchValue),
|
||||
debug::DIMENSIONEDCONSTANTS,
|
||||
&constantsSwitchValues_
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~constantsSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const Foam::scalar& rhs)
|
||||
{
|
||||
controlSwitches<Foam::scalar>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
101
src/foam/global/controlSwitches/debugSwitch.H
Normal file
101
src/foam/global/controlSwitches/debugSwitch.H
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::debugSwitch
|
||||
|
||||
Author
|
||||
Martin Beaudoin, Hydro-Quebec, 2014. All rights reserved
|
||||
|
||||
Description
|
||||
Handling of runtime controlSwitches.
|
||||
Specialization of controlSwitches class for debug switches
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef debugSwitch_H
|
||||
#define debugSwitch_H
|
||||
|
||||
#include "controlSwitches.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace debug
|
||||
{
|
||||
|
||||
// Typedefs
|
||||
// Hashtable to static class attributes addresses holding the
|
||||
// runtime debug switch values
|
||||
typedef std::map<std::string, std::list<controlSwitches<int> *> > ListDebugControlSwitches;
|
||||
|
||||
extern ListDebugControlSwitches* debugSwitchValues_;
|
||||
|
||||
class debugSwitch
|
||||
: public controlSwitches<int>
|
||||
{
|
||||
public:
|
||||
debugSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const int& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<int>
|
||||
(
|
||||
switchName,
|
||||
debug::debugSwitchFromDict(switchName.c_str(), switchValue),
|
||||
debug::DEBUGSWITCHES,
|
||||
&debugSwitchValues_
|
||||
)
|
||||
{}
|
||||
|
||||
virtual ~debugSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const int& rhs)
|
||||
{
|
||||
controlSwitches<int>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace debug
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
98
src/foam/global/controlSwitches/infoSwitch.H
Normal file
98
src/foam/global/controlSwitches/infoSwitch.H
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::infoSwitch
|
||||
|
||||
Author
|
||||
Martin Beaudoin, Hydro-Quebec, 2014. All rights reserved
|
||||
|
||||
Description
|
||||
Handling of runtime controlSwitches.
|
||||
Specialization of controlSwitches class for info switches
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef infoSwitch_H
|
||||
#define infoSwitch_H
|
||||
|
||||
#include "controlSwitches.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace debug
|
||||
{
|
||||
// Typedefs
|
||||
// Hashtable to static class attributes addresses holding the
|
||||
// runtime info switch values
|
||||
typedef std::map<std::string, std::list<controlSwitches<int> *> > ListInfoControlSwitches;
|
||||
|
||||
extern ListInfoControlSwitches* infoSwitchValues_;
|
||||
|
||||
class infoSwitch
|
||||
: public controlSwitches<int>
|
||||
{
|
||||
public:
|
||||
infoSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const int& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<int>
|
||||
(
|
||||
switchName,
|
||||
debug::infoSwitchFromDict(switchName.c_str(), switchValue),
|
||||
debug::INFOSWITCHES,
|
||||
&infoSwitchValues_
|
||||
)
|
||||
{}
|
||||
|
||||
virtual ~infoSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const int& rhs)
|
||||
{
|
||||
controlSwitches<int>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace debug
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
101
src/foam/global/controlSwitches/optimisationSwitch.H
Normal file
101
src/foam/global/controlSwitches/optimisationSwitch.H
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::infoSwitch
|
||||
|
||||
Author
|
||||
Martin Beaudoin, Hydro-Quebec, 2014. All rights reserved
|
||||
|
||||
Description
|
||||
Handling of runtime controlSwitches.
|
||||
Specialization of controlSwitches class for optimisation switches
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef optimisationSwitch_H
|
||||
#define optimisationSwitch_H
|
||||
|
||||
#include "controlSwitches.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace debug
|
||||
{
|
||||
|
||||
// Typedefs
|
||||
// Hashtable to static class attributes addresses holding the
|
||||
// runtime optimisation switch values
|
||||
typedef std::map<std::string, std::list<controlSwitches<int> *> > ListOptimisationControlSwitches;
|
||||
extern ListOptimisationControlSwitches* optimisationSwitchValues_;
|
||||
|
||||
|
||||
class optimisationSwitch
|
||||
: public controlSwitches<int>
|
||||
{
|
||||
public:
|
||||
optimisationSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const int& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<int>
|
||||
(
|
||||
switchName,
|
||||
debug::optimisationSwitchFromDict(switchName.c_str(), switchValue),
|
||||
debug::OPTIMISATIONSWITCHES,
|
||||
&optimisationSwitchValues_
|
||||
)
|
||||
{}
|
||||
|
||||
virtual ~optimisationSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const int& rhs)
|
||||
{
|
||||
controlSwitches<int>::operator=(rhs);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace debug
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
100
src/foam/global/controlSwitches/tolerancesSwitch.H
Normal file
100
src/foam/global/controlSwitches/tolerancesSwitch.H
Normal file
|
@ -0,0 +1,100 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::infoSwitch
|
||||
|
||||
Author
|
||||
Martin Beaudoin, Hydro-Quebec, 2014. All rights reserved
|
||||
|
||||
Description
|
||||
Handling of runtime controlSwitches.
|
||||
Specialization of controlSwitches class for tolerances switches
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef tolerancesSwitch_H
|
||||
#define tolerancesSwitch_H
|
||||
|
||||
#include "controlSwitches.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace debug
|
||||
{
|
||||
|
||||
// Typedefs
|
||||
// Hashtable to static class attributes addresses holding the
|
||||
// runtime tolerances switch values
|
||||
typedef std::map<std::string, std::list<controlSwitches<Foam::scalar> *> > ListTolerancesControlSwitches;
|
||||
|
||||
extern ListTolerancesControlSwitches* tolerancesSwitchValues_;
|
||||
|
||||
class tolerancesSwitch
|
||||
: public controlSwitches<Foam::scalar>
|
||||
{
|
||||
public:
|
||||
tolerancesSwitch
|
||||
(
|
||||
const std::string& switchName,
|
||||
const Foam::scalar& switchValue
|
||||
)
|
||||
:
|
||||
controlSwitches<Foam::scalar>
|
||||
(
|
||||
switchName,
|
||||
debug::tolerancesFromDict(switchName.c_str(), switchValue),
|
||||
debug::TOLERANCES,
|
||||
&tolerancesSwitchValues_
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~tolerancesSwitch()
|
||||
{
|
||||
}
|
||||
|
||||
// Assignement operator
|
||||
void operator=(const Foam::scalar& rhs)
|
||||
{
|
||||
controlSwitches<Foam::scalar>::operator=(rhs);
|
||||
}
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace debug
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -32,7 +32,11 @@ Description
|
|||
#include "OSspecific.H"
|
||||
#include "dimensionedConstants.H"
|
||||
#include "SortableList.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
#include "infoSwitch.H"
|
||||
#include "optimisationSwitch.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
#include "constantsSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ SourceFiles
|
|||
#include "intersection.H"
|
||||
#include "point2D.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
#include "optimisationSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ SourceFiles
|
|||
#include "FieldFields.H"
|
||||
#include "faceList.H"
|
||||
#include "intersection.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ SourceFiles
|
|||
#include "HashSet.H"
|
||||
#include "BlockLduInterfaceFieldPtrsList.H"
|
||||
#include "Map.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "optimisationSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ SourceFiles
|
|||
#define solution_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ SourceFiles
|
|||
|
||||
#include "faceList.H"
|
||||
#include "oppositeFace.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ SourceFiles
|
|||
#include "Switch.H"
|
||||
#include "processorTopology.H"
|
||||
#include "labelPair.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@ SourceFiles
|
|||
#include "primitivePatch.H"
|
||||
#include "typeInfo.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ SourceFiles
|
|||
#include "point.H"
|
||||
#include "intersection.H"
|
||||
#include "HashSet.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "optimisationSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ SourceFiles
|
|||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "EdgeMap.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ SourceFiles
|
|||
|
||||
#include "scalar.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ SourceFiles
|
|||
#define fileName_H
|
||||
|
||||
#include "word.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "debugSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ SourceFiles
|
|||
|
||||
#include "amgPolicy.H"
|
||||
#include "lduMatrix.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ SourceFiles
|
|||
#include "fvPatchMapper.H"
|
||||
#include "scalarList.H"
|
||||
#include "className.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ Description
|
|||
#define radiationConstants_H
|
||||
|
||||
#include "dimensionedScalar.H"
|
||||
#include "constantsSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ SourceFiles
|
|||
#include "word.H"
|
||||
#include "scalar.H"
|
||||
#include "debug.H"
|
||||
#include "controlSwitches.H"
|
||||
#include "constantsSwitch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ SourceFiles
|
|||
#define specieThermo_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
#include "controlSwitches.H"
|
||||
#include "optimisationSwitch.H"
|
||||
#include "tolerancesSwitch.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
|
Reference in a new issue