Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
797c4a74
Commit
797c4a74
authored
Oct 26, 2010
by
mattijs
Browse files
ENH: functionObjects: force writing when used through execFlowFunctionObjects
parent
3a2822ec
Changes
7
Hide whitespace changes
Inline
Side-by-side
applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C
View file @
797c4a74
...
...
@@ -68,13 +68,13 @@ namespace Foam
functionObjectList
fol
(
runTime
,
dict
);
fol
.
start
();
fol
.
execute
(
);
fol
.
execute
(
true
);
// override outputControl - force writing
}
else
{
functionObjectList
fol
(
runTime
);
fol
.
start
();
fol
.
execute
(
);
fol
.
execute
(
true
);
// override outputControl - force writing
}
}
}
...
...
src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C
View file @
797c4a74
...
...
@@ -128,7 +128,10 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::start()
template
<
class
OutputFilter
>
bool
Foam
::
OutputFilterFunctionObject
<
OutputFilter
>::
execute
()
bool
Foam
::
OutputFilterFunctionObject
<
OutputFilter
>::
execute
(
const
bool
forceWrite
)
{
if
(
enabled_
)
{
...
...
@@ -139,7 +142,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::execute()
ptr_
->
execute
();
if
(
outputControl_
.
output
())
if
(
forceWrite
||
outputControl_
.
output
())
{
ptr_
->
write
();
}
...
...
src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H
View file @
797c4a74
...
...
@@ -183,7 +183,7 @@ public:
virtual
bool
start
();
//- Called at each ++ or += of the time-loop
virtual
bool
execute
();
virtual
bool
execute
(
const
bool
forceWrite
);
//- Called when Time::run() determines that the time-loop exits
virtual
bool
end
();
...
...
src/OpenFOAM/db/functionObjects/functionObject/functionObject.C
View file @
797c4a74
...
...
@@ -112,7 +112,7 @@ const Foam::word& Foam::functionObject::name() const
bool
Foam
::
functionObject
::
end
()
{
return
execute
();
return
execute
(
false
);
}
...
...
src/OpenFOAM/db/functionObjects/functionObject/functionObject.H
View file @
797c4a74
...
...
@@ -147,8 +147,9 @@ public:
//- Called at the start of the time-loop
virtual
bool
start
()
=
0
;
//- Called at each ++ or += of the time-loop
virtual
bool
execute
()
=
0
;
//- Called at each ++ or += of the time-loop. forceWrite overrides the
// outputControl behaviour.
virtual
bool
execute
(
const
bool
forceWrite
)
=
0
;
//- Called when Time::run() determines that the time-loop exits.
// By default it simply calls execute().
...
...
src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C
View file @
797c4a74
...
...
@@ -144,7 +144,7 @@ bool Foam::functionObjectList::start()
}
bool
Foam
::
functionObjectList
::
execute
()
bool
Foam
::
functionObjectList
::
execute
(
const
bool
forceWrite
)
{
bool
ok
=
true
;
...
...
@@ -157,7 +157,7 @@ bool Foam::functionObjectList::execute()
forAll
(
*
this
,
objectI
)
{
ok
=
operator
[](
objectI
).
execute
()
&&
ok
;
ok
=
operator
[](
objectI
).
execute
(
forceWrite
)
&&
ok
;
}
}
...
...
src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H
View file @
797c4a74
...
...
@@ -153,8 +153,10 @@ public:
//- Called at the start of the time-loop
virtual
bool
start
();
//- Called at each ++ or += of the time-loop
virtual
bool
execute
();
//- Called at each ++ or += of the time-loop. forceWrite overrides
// the usual outputControl behaviour and forces writing always
// (used in postprocessing mode)
virtual
bool
execute
(
const
bool
forceWrite
=
false
);
//- Called when Time::run() determines that the time-loop exits
virtual
bool
end
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment