MRG: Integrated Foundation code to commit 9f37c3c
This commit is contained in:
@ -76,6 +76,17 @@ void Foam::functionObjects::fieldAverage::initialize()
|
||||
{
|
||||
totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if totalTime_ has been set otherwise initialize
|
||||
forAll(totalTime_, fieldi)
|
||||
{
|
||||
if (totalTime_[fieldi] < 0)
|
||||
{
|
||||
totalTime_[fieldi] = obr_.time().deltaTValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resetFields();
|
||||
|
||||
@ -224,8 +235,10 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties()
|
||||
totalIter_.clear();
|
||||
totalIter_.setSize(faItems_.size(), 1);
|
||||
|
||||
// Initialize totalTime with negative values
|
||||
// to indicate that it has not been set
|
||||
totalTime_.clear();
|
||||
totalTime_.setSize(faItems_.size(), obr().time().deltaTValue());
|
||||
totalTime_.setSize(faItems_.size(), -1);
|
||||
|
||||
if (restartOnRestart_ || restartOnOutput_)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,11 +28,13 @@ Group
|
||||
grpUtilitiesFunctionObjects
|
||||
|
||||
Description
|
||||
This function object overrides the calculation time step. Can only be used
|
||||
with solvers with adjustTimeStep control (e.g. pimpleFoam). It makes no
|
||||
attempt to co-operate with other time step 'controllers', e.g. maxCo, other
|
||||
functionObjects. Supports 'enabled' flag but none of the other options
|
||||
'timeStart', 'timeEnd', 'writeControl' etc.
|
||||
This function object overrides the calculation time step.
|
||||
|
||||
Can only be used with solvers with adjustTimeStep control (e.g.
|
||||
pimpleFoam). It makes no attempt to co-operate with other time step
|
||||
'controllers', e.g. maxCo, other functionObjects. Supports 'enabled'
|
||||
flag but none of the other options 'timeStart', 'timeEnd', 'writeControl'
|
||||
etc.
|
||||
|
||||
Usage
|
||||
Example of function object specification to manipulate the time step:
|
||||
|
||||
Reference in New Issue
Block a user