mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added abortCalculation function object, exposed Time::stopAtControls
- still needs fine-tuning (testing) to see if it reacts as anticipated under various conditions.
This commit is contained in:
@ -532,6 +532,22 @@ bool Foam::Time::end() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::Time::stopAt(const stopAtControls sa) const
|
||||||
|
{
|
||||||
|
stopAt_ = sa;
|
||||||
|
|
||||||
|
// adjust endTime
|
||||||
|
if (sa == saEndTime)
|
||||||
|
{
|
||||||
|
controlDict_.lookup("endTime") >> endTime_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
endTime_ = GREAT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Time::setTime(const Time& t)
|
void Foam::Time::setTime(const Time& t)
|
||||||
{
|
{
|
||||||
value() = t.value();
|
value() = t.value();
|
||||||
|
|||||||
@ -90,13 +90,13 @@ public:
|
|||||||
//- Stop-run control options
|
//- Stop-run control options
|
||||||
enum stopAtControls
|
enum stopAtControls
|
||||||
{
|
{
|
||||||
saEndTime,
|
saEndTime, /*!< stop when Time reaches the prescribed endTime */
|
||||||
saNoWriteNow,
|
saNoWriteNow, /*!< set endTime to stop immediately w/o writing */
|
||||||
saWriteNow,
|
saWriteNow, /*!< set endTime to stop immediately w/ writing */
|
||||||
saNextWrite
|
saNextWrite /*!< stop the next time data are written */
|
||||||
};
|
};
|
||||||
|
|
||||||
//- Suported time directory name formats
|
//- Supported time directory name formats
|
||||||
enum fmtflags
|
enum fmtflags
|
||||||
{
|
{
|
||||||
general = 0,
|
general = 0,
|
||||||
@ -111,10 +111,10 @@ protected:
|
|||||||
|
|
||||||
label startTimeIndex_;
|
label startTimeIndex_;
|
||||||
scalar startTime_;
|
scalar startTime_;
|
||||||
scalar endTime_;
|
mutable scalar endTime_;
|
||||||
|
|
||||||
static const NamedEnum<stopAtControls, 4> stopAtControlNames_;
|
static const NamedEnum<stopAtControls, 4> stopAtControlNames_;
|
||||||
stopAtControls stopAt_;
|
mutable stopAtControls stopAt_;
|
||||||
|
|
||||||
static const NamedEnum<writeControls, 5> writeControlNames_;
|
static const NamedEnum<writeControls, 5> writeControlNames_;
|
||||||
writeControls writeControl_;
|
writeControls writeControl_;
|
||||||
@ -390,6 +390,10 @@ public:
|
|||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
|
//- Adjust the current stopAtControl. Note that this value
|
||||||
|
// only persists until the next time the dictionary is read.
|
||||||
|
virtual void stopAt(const stopAtControls) const;
|
||||||
|
|
||||||
//- Reset the time and time-index to those of the given time
|
//- Reset the time and time-index to those of the given time
|
||||||
virtual void setTime(const Time&);
|
virtual void setTime(const Time&);
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
A functionObject wrapper around OutputFilter to allow them to be
|
A functionObject wrapper around OutputFilter to allow them to be
|
||||||
created via the functions list within controlDict.
|
created via the functions entry within controlDict.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
Since the timeIndex is used directly from Foam::Time, it is unaffected
|
Since the timeIndex is used directly from Foam::Time, it is unaffected
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around writeRegisteredObject to allow them to be
|
FunctionObject wrapper around writeRegisteredObject to allow them to be
|
||||||
created via the functions list within controlDict.
|
created via the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
writeRegisteredObjectFunctionObject.C
|
writeRegisteredObjectFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around fieldAverage to allow them to be created
|
FunctionObject wrapper around fieldAverage to allow them to be created
|
||||||
via the functions list within controlDict.
|
via the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fieldAverageFunctionObject.C
|
fieldAverageFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around fieldMinMax to allow them to be created via
|
FunctionObject wrapper around fieldMinMax to allow them to be created via
|
||||||
the functions list within controlDict.
|
the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fieldMinMaxFunctionObject.C
|
fieldMinMaxFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around cellSource to allow it to be
|
FunctionObject wrapper around cellSource to allow it to be
|
||||||
created via the functions list within controlDict.
|
created via the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
cellSourceFunctionObject.C
|
cellSourceFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around faceSource to allow it to be
|
FunctionObject wrapper around faceSource to allow it to be
|
||||||
created via the functions list within controlDict.
|
created via the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
faceSourceFunctionObject.C
|
faceSourceFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around streamLines to allow them to be created via
|
FunctionObject wrapper around streamLines to allow them to be created via
|
||||||
the functions list within controlDict.
|
the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
streamLineFunctionObject.C
|
streamLineFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around forceCoeffs to allow them to be created via
|
FunctionObject wrapper around forceCoeffs to allow them to be created via
|
||||||
the functions list within controlDict.
|
the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
forceCoeffsFunctionObject.C
|
forceCoeffsFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around forces to allow them to be created via the
|
FunctionObject wrapper around forces to allow them to be created via the
|
||||||
functions list within controlDict.
|
functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
forcesFunctionObject.C
|
forcesFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around systemCall to allow them to be created via
|
FunctionObject wrapper around systemCall to allow them to be created via
|
||||||
the functions list within controlDict.
|
the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
systemCallFunctionObject.C
|
systemCallFunctionObject.C
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
abortCalculation/abortCalculation.C
|
||||||
|
abortCalculation/abortCalculationFunctionObject.C
|
||||||
|
|
||||||
staticPressure/staticPressure.C
|
staticPressure/staticPressure.C
|
||||||
staticPressure/staticPressureFunctionObject.C
|
staticPressure/staticPressureFunctionObject.C
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM 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 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM 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 OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Typedef
|
||||||
|
Foam::IOabortCalculation
|
||||||
|
|
||||||
|
Description
|
||||||
|
Instance of the generic IOOutputFilter for abortCalculation.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef IOabortCalculation_H
|
||||||
|
#define IOabortCalculation_H
|
||||||
|
|
||||||
|
#include "abortCalculation.H"
|
||||||
|
#include "IOOutputFilter.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
typedef IOOutputFilter<abortCalculation> IOabortCalculation;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,159 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM 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 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM 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 OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "abortCalculation.H"
|
||||||
|
#include "dictionary.H"
|
||||||
|
#include "error.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "OSspecific.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(abortCalculation, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const char* Foam::NamedEnum<Foam::abortCalculation::actionType, 3>::names[] =
|
||||||
|
{
|
||||||
|
"noWriteNow",
|
||||||
|
"writeNow",
|
||||||
|
"nextWrite"
|
||||||
|
};
|
||||||
|
|
||||||
|
const Foam::NamedEnum<Foam::abortCalculation::actionType, 3>
|
||||||
|
Foam::abortCalculation::actionTypeNames_;
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::abortCalculation::removeFile() const
|
||||||
|
{
|
||||||
|
if (isFile(abortFile_))
|
||||||
|
{
|
||||||
|
rm(abortFile_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::abortCalculation::abortCalculation
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const objectRegistry& obr,
|
||||||
|
const dictionary& dict,
|
||||||
|
const bool loadFromFiles
|
||||||
|
)
|
||||||
|
:
|
||||||
|
name_(name),
|
||||||
|
obr_(obr),
|
||||||
|
abortFile_("$FOAM_CASE/" + name),
|
||||||
|
action_(nextWrite)
|
||||||
|
{
|
||||||
|
abortFile_.expand();
|
||||||
|
read(dict);
|
||||||
|
|
||||||
|
// remove any old files from previous runs
|
||||||
|
removeFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::abortCalculation::~abortCalculation()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::abortCalculation::read(const dictionary& dict)
|
||||||
|
{
|
||||||
|
word actionName;
|
||||||
|
|
||||||
|
if (dict.found("action"))
|
||||||
|
{
|
||||||
|
action_ = actionTypeNames_.read
|
||||||
|
(
|
||||||
|
dict.lookup("action")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
action_ = nextWrite;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.readIfPresent("fileName", abortFile_))
|
||||||
|
{
|
||||||
|
abortFile_.expand();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::abortCalculation::execute()
|
||||||
|
{
|
||||||
|
if (isFile(abortFile_))
|
||||||
|
{
|
||||||
|
switch (action_)
|
||||||
|
{
|
||||||
|
case noWriteNow :
|
||||||
|
obr_.time().stopAt(Time::saNoWriteNow);
|
||||||
|
Info<< "user requested abort - "
|
||||||
|
"stop immediately without writing data" << endl;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case writeNow :
|
||||||
|
obr_.time().stopAt(Time::saWriteNow);
|
||||||
|
Info<< "user requested abort - "
|
||||||
|
"stop immediately with writing data" << endl;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case nextWrite :
|
||||||
|
obr_.time().stopAt(Time::saNextWrite);
|
||||||
|
Info<< "user requested abort - "
|
||||||
|
"stop after next data write" << endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::abortCalculation::end()
|
||||||
|
{
|
||||||
|
removeFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::abortCalculation::write()
|
||||||
|
{
|
||||||
|
execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,168 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM 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 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM 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 OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::abortCalculation
|
||||||
|
|
||||||
|
Description
|
||||||
|
Watches for presence of the named file in the $FOAM_CASE directory
|
||||||
|
and aborts the calculation if it is present.
|
||||||
|
|
||||||
|
Currently the following action types are supported:
|
||||||
|
- noWriteNow
|
||||||
|
- writeNow
|
||||||
|
- nextWrite
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
abortCalculation.C
|
||||||
|
IOabortCalculation.H
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef abortCalculation_H
|
||||||
|
#define abortCalculation_H
|
||||||
|
|
||||||
|
#include "pointFieldFwd.H"
|
||||||
|
#include "NamedEnum.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// Forward declaration of classes
|
||||||
|
class objectRegistry;
|
||||||
|
class dictionary;
|
||||||
|
class mapPolyMesh;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class abortCalculation Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class abortCalculation
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public data
|
||||||
|
|
||||||
|
//- Enumeration defining the type of action
|
||||||
|
enum actionType
|
||||||
|
{
|
||||||
|
noWriteNow, /*!< stop immediately without writing data */
|
||||||
|
writeNow, /*!< write data and stop immediately */
|
||||||
|
nextWrite /*!< stop the next time data are written */
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Name of the abort file unless otherwise specified
|
||||||
|
word name_;
|
||||||
|
|
||||||
|
const objectRegistry& obr_;
|
||||||
|
|
||||||
|
//- The fully-qualified name of the abort file
|
||||||
|
fileName abortFile_;
|
||||||
|
|
||||||
|
//- Action type names
|
||||||
|
static const NamedEnum<actionType, 3> actionTypeNames_;
|
||||||
|
|
||||||
|
//- The type of action
|
||||||
|
actionType action_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Remove abort file.
|
||||||
|
void removeFile() const;
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
abortCalculation(const abortCalculation&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const abortCalculation&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("abort");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct for given objectRegistry and dictionary.
|
||||||
|
abortCalculation
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const objectRegistry&,
|
||||||
|
const dictionary&,
|
||||||
|
const bool loadFromFilesUnused = false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~abortCalculation();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return name of the abort file
|
||||||
|
virtual const word& name() const
|
||||||
|
{
|
||||||
|
return name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Read the dictionary settings
|
||||||
|
virtual void read(const dictionary&);
|
||||||
|
|
||||||
|
//- Execute, check existence of abort file and take action
|
||||||
|
virtual void execute();
|
||||||
|
|
||||||
|
//- Execute at the final time-loop, used for cleanup
|
||||||
|
virtual void end();
|
||||||
|
|
||||||
|
//- Execute, check existence of abort file and take action
|
||||||
|
virtual void write();
|
||||||
|
|
||||||
|
//- Update for changes of mesh - does nothing
|
||||||
|
virtual void updateMesh(const mapPolyMesh&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Update for changes of mesh - does nothing
|
||||||
|
virtual void movePoints(const pointField&)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM 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 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM 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 OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "abortCalculationFunctionObject.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineNamedTemplateTypeNameAndDebug(abortCalculationFunctionObject, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
functionObject,
|
||||||
|
abortCalculationFunctionObject,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM 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 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM 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 OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Typedef
|
||||||
|
Foam::abortCalculationFunctionObject
|
||||||
|
|
||||||
|
Description
|
||||||
|
FunctionObject wrapper around abortCalculation to allow it to be created via
|
||||||
|
the functions entry within controlDict.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
abortCalculationFunctionObject.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef abortCalculationFunctionObject_H
|
||||||
|
#define abortCalculationFunctionObject_H
|
||||||
|
|
||||||
|
#include "abortCalculation.H"
|
||||||
|
#include "OutputFilterFunctionObject.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
typedef OutputFilterFunctionObject<abortCalculation>
|
||||||
|
abortCalculationFunctionObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around dsmcFields to allow it to be created via
|
FunctionObject wrapper around dsmcFields to allow it to be created via
|
||||||
the functions list within controlDict.
|
the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
dsmcFieldsFunctionObject.C
|
dsmcFieldsFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around staticPressure to allow it to be created via
|
FunctionObject wrapper around staticPressure to allow it to be created via
|
||||||
the functions list within controlDict.
|
the functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
staticPressureFunctionObject.C
|
staticPressureFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around probes to allow them to be created via the
|
FunctionObject wrapper around probes to allow them to be created via the
|
||||||
functions list within controlDict.
|
functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
probesFunctionObject.C
|
probesFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around sets to allow them to be created via the
|
FunctionObject wrapper around sets to allow them to be created via the
|
||||||
functions list within controlDict.
|
functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sampledSetsFunctionObject.C
|
sampledSetsFunctionObject.C
|
||||||
|
|||||||
@ -27,7 +27,7 @@ Typedef
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
FunctionObject wrapper around surfaces to allow them to be created via the
|
FunctionObject wrapper around surfaces to allow them to be created via the
|
||||||
functions list within controlDict.
|
functions entry within controlDict.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sampledSurfacesFunctionObject.C
|
sampledSurfacesFunctionObject.C
|
||||||
|
|||||||
Reference in New Issue
Block a user