mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Time and functionObject updated for end()
- added end() method to functionObject, functionObjectList & associated classes - moved outputFilters from src/sampling -> src/OpenFOAM/db/functionObjects
This commit is contained in:
@ -41,15 +41,14 @@ namespace Foam
|
||||
Foam::systemCall::systemCall
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry& obr,
|
||||
const objectRegistry&,
|
||||
const dictionary& dict,
|
||||
const bool loadFromFiles
|
||||
const bool
|
||||
)
|
||||
:
|
||||
name_(name),
|
||||
obr_(obr),
|
||||
active_(true),
|
||||
executeCalls_(),
|
||||
endCalls_(),
|
||||
writeCalls_()
|
||||
{
|
||||
read(dict);
|
||||
@ -66,8 +65,16 @@ Foam::systemCall::~systemCall()
|
||||
|
||||
void Foam::systemCall::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("executeCalls") >> executeCalls_;
|
||||
dict.lookup("writeCalls") >> writeCalls_;
|
||||
dict.readIfPresent("executeCalls", executeCalls_);
|
||||
dict.readIfPresent("endCalls", endCalls_);
|
||||
dict.readIfPresent("writeCalls", writeCalls_);
|
||||
|
||||
if (executeCalls_.empty() && endCalls_.empty() && writeCalls_.empty())
|
||||
{
|
||||
WarningIn("Foam::system::read(const dictionary&)")
|
||||
<< "no executeCalls, endCalls or writeCalls defined."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -79,6 +86,16 @@ void Foam::systemCall::execute()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::systemCall::end()
|
||||
{
|
||||
forAll(endCalls_, callI)
|
||||
{
|
||||
::system(endCalls_[callI].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::systemCall::write()
|
||||
{
|
||||
forAll(writeCalls_, callI)
|
||||
|
||||
Reference in New Issue
Block a user