mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects/jobControl/abortCalculation: Rename abortCalculation -> abort
functionObjects are now in the functionObjects namespace so "abort" no longer causes a name-clash.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
abortCalculation/abortCalculation.C
|
abort/abort.C
|
||||||
abortCalculation/abortCalculationFunctionObject.C
|
abort/abortFunctionObject.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libjobControl
|
LIB = $(FOAM_LIBBIN)/libjobControl
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,24 +22,24 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Typedef
|
Typedef
|
||||||
Foam::IOabortCalculation
|
Foam::IOabort
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Instance of the generic IOOutputFilter for abortCalculation.
|
Instance of the generic IOOutputFilter for abort.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef IOabortCalculation_H
|
#ifndef IOabort_H
|
||||||
#define IOabortCalculation_H
|
#define IOabort_H
|
||||||
|
|
||||||
#include "abortCalculation.H"
|
#include "abort.H"
|
||||||
#include "IOOutputFilter.H"
|
#include "IOOutputFilter.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef IOOutputFilter<abortCalculation> IOabortCalculation;
|
typedef IOOutputFilter<abort> IOabort;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "abortCalculation.H"
|
#include "abort.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "error.H"
|
#include "error.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
@ -36,14 +36,14 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
namespace functionObjects
|
namespace functionObjects
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(abortCalculation, 0);
|
defineTypeNameAndDebug(abort, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
const char* Foam::NamedEnum
|
const char* Foam::NamedEnum
|
||||||
<
|
<
|
||||||
Foam::functionObjects::abortCalculation::actionType,
|
Foam::functionObjects::abort::actionType,
|
||||||
3
|
3
|
||||||
>::names[] =
|
>::names[] =
|
||||||
{
|
{
|
||||||
@ -54,14 +54,14 @@ const char* Foam::NamedEnum
|
|||||||
|
|
||||||
const Foam::NamedEnum
|
const Foam::NamedEnum
|
||||||
<
|
<
|
||||||
Foam::functionObjects::abortCalculation::actionType,
|
Foam::functionObjects::abort::actionType,
|
||||||
3
|
3
|
||||||
> Foam::functionObjects::abortCalculation::actionTypeNames_;
|
> Foam::functionObjects::abort::actionTypeNames_;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::functionObjects::abortCalculation::removeFile() const
|
void Foam::functionObjects::abort::removeFile() const
|
||||||
{
|
{
|
||||||
bool hasAbort = isFile(abortFile_);
|
bool hasAbort = isFile(abortFile_);
|
||||||
reduce(hasAbort, orOp<bool>());
|
reduce(hasAbort, orOp<bool>());
|
||||||
@ -76,7 +76,7 @@ void Foam::functionObjects::abortCalculation::removeFile() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::functionObjects::abortCalculation::abortCalculation
|
Foam::functionObjects::abort::abort
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const objectRegistry& obr,
|
const objectRegistry& obr,
|
||||||
@ -97,7 +97,7 @@ Foam::functionObjects::abortCalculation::abortCalculation
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::abortCalculation::viable
|
bool Foam::functionObjects::abort::viable
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const objectRegistry& obr,
|
const objectRegistry& obr,
|
||||||
@ -112,13 +112,13 @@ bool Foam::functionObjects::abortCalculation::viable
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::functionObjects::abortCalculation::~abortCalculation()
|
Foam::functionObjects::abort::~abort()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::functionObjects::abortCalculation::read(const dictionary& dict)
|
void Foam::functionObjects::abort::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
if (dict.found("action"))
|
if (dict.found("action"))
|
||||||
{
|
{
|
||||||
@ -136,7 +136,7 @@ void Foam::functionObjects::abortCalculation::read(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::abortCalculation::execute()
|
void Foam::functionObjects::abort::execute()
|
||||||
{
|
{
|
||||||
bool hasAbort = isFile(abortFile_);
|
bool hasAbort = isFile(abortFile_);
|
||||||
reduce(hasAbort, orOp<bool>());
|
reduce(hasAbort, orOp<bool>());
|
||||||
@ -185,17 +185,17 @@ void Foam::functionObjects::abortCalculation::execute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::abortCalculation::end()
|
void Foam::functionObjects::abort::end()
|
||||||
{
|
{
|
||||||
removeFile();
|
removeFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::abortCalculation::timeSet()
|
void Foam::functionObjects::abort::timeSet()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::abortCalculation::write()
|
void Foam::functionObjects::abort::write()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::functionObjects::abortCalculation
|
Foam::functionObjects::abort
|
||||||
|
|
||||||
Group
|
Group
|
||||||
grpJobControlFunctionObjects
|
grpJobControlFunctionObjects
|
||||||
@ -37,13 +37,13 @@ Description
|
|||||||
- nextWrite
|
- nextWrite
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
abortCalculation.C
|
abort.C
|
||||||
IOabortCalculation.H
|
IOabort.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef abortCalculation_H
|
#ifndef abort_H
|
||||||
#define abortCalculation_H
|
#define abort_H
|
||||||
|
|
||||||
#include "NamedEnum.H"
|
#include "NamedEnum.H"
|
||||||
|
|
||||||
@ -62,10 +62,10 @@ namespace functionObjects
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class abortCalculation Declaration
|
Class abort Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class abortCalculation
|
class abort
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -104,10 +104,10 @@ private:
|
|||||||
void removeFile() const;
|
void removeFile() const;
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
abortCalculation(const abortCalculation&);
|
abort(const abort&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const abortCalculation&);
|
void operator=(const abort&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -119,7 +119,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct for given objectRegistry and dictionary.
|
//- Construct for given objectRegistry and dictionary.
|
||||||
abortCalculation
|
abort
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const objectRegistry&,
|
const objectRegistry&,
|
||||||
@ -139,7 +139,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~abortCalculation();
|
virtual ~abort();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,18 +23,18 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "abortCalculationFunctionObject.H"
|
#include "abortFunctionObject.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineNamedTemplateTypeNameAndDebug(abortCalculationFunctionObject, 0);
|
defineNamedTemplateTypeNameAndDebug(abortFunctionObject, 0);
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
addToRunTimeSelectionTable
|
||||||
(
|
(
|
||||||
functionObject,
|
functionObject,
|
||||||
abortCalculationFunctionObject,
|
abortFunctionObject,
|
||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -22,29 +22,29 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Typedef
|
Typedef
|
||||||
Foam::abortCalculationFunctionObject
|
Foam::abortFunctionObject
|
||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around abortCalculation to allow it to be created via
|
FunctionObject wrapper around abort to allow it to be created via
|
||||||
the functions entry within controlDict.
|
the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
abortCalculationFunctionObject.C
|
abortFunctionObject.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef abortCalculationFunctionObject_H
|
#ifndef abortFunctionObject_H
|
||||||
#define abortCalculationFunctionObject_H
|
#define abortFunctionObject_H
|
||||||
|
|
||||||
#include "abortCalculation.H"
|
#include "abort.H"
|
||||||
#include "OutputFilterFunctionObject.H"
|
#include "OutputFilterFunctionObject.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef OutputFilterFunctionObject<functionObjects::abortCalculation>
|
typedef OutputFilterFunctionObject<functionObjects::abort>
|
||||||
abortCalculationFunctionObject;
|
abortFunctionObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
Reference in New Issue
Block a user