Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
andy committed Oct 2, 2013
2 parents 189276b + 9d90c8d commit 9240f8b
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -180,7 +180,9 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::execute
template<class OutputFilter>
bool Foam::OutputFilterFunctionObject<OutputFilter>::end()
{
if (active())
// note: use enabled_ here instead of active() since end should be called
// even if out of time bounds
if (enabled_)
{
if (!storeFilter_)
{
Expand Down Expand Up @@ -251,15 +253,15 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::adjustTimeStep()
scalar nSteps = timeToNextWrite/deltaT - SMALL;

// function objects modify deltaT inside nStepsToStartTimeChange range
// NOTE: Potential problem if two function objects dump inside the same
//interval
// note: Potential problem if two function objects dump inside the same
// interval
if (nSteps < nStepsToStartTimeChange_)
{
label nStepsToNextWrite = label(nSteps) + 1;

scalar newDeltaT = timeToNextWrite/nStepsToNextWrite;

//Adjust time step
// adjust time step
if (newDeltaT < deltaT)
{
deltaT = max(newDeltaT, 0.2*deltaT);
Expand Down

0 comments on commit 9240f8b

Please sign in to comment.