ENH: Adding virtual function timeSet() to function objects:

probes, sampledSets and sampledSurfaces
This commit is contained in:
Sergio Ferraris
2013-06-07 11:19:24 +01:00
parent 6f40272339
commit c3a2dd3188
6 changed files with 28 additions and 1 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -293,6 +293,12 @@ void Foam::probes::end()
}
void Foam::probes::timeSet()
{
// Do nothing - only valid on write
}
void Foam::probes::write()
{
if (size() && prepare())

View File

@ -243,6 +243,9 @@ public:
//- Execute at the final time-loop, currently does nothing
virtual void end();
//- Called when time was set at the end of the Time::operator++
virtual void timeSet();
//- Sample and write
virtual void write();

View File

@ -188,6 +188,12 @@ void Foam::sampledSets::end()
}
void Foam::sampledSets::timeSet()
{
// Do nothing - only valid on write
}
void Foam::sampledSets::write()
{
if (size())

View File

@ -288,6 +288,9 @@ public:
//- Execute at the final time-loop, currently does nothing
virtual void end();
//- Called when time was set at the end of the Time::operator++
virtual void timeSet();
//- Sample and write
virtual void write();

View File

@ -143,6 +143,12 @@ void Foam::sampledSurfaces::end()
}
void Foam::sampledSurfaces::timeSet()
{
// Do nothing - only valid on write
}
void Foam::sampledSurfaces::write()
{
if (size())

View File

@ -221,6 +221,9 @@ public:
//- Execute at the final time-loop, currently does nothing
virtual void end();
//- Called when time was set at the end of the Time::operator++
virtual void timeSet();
//- Sample and write
virtual void write();