mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: change return type of Time::stopAt to report if the setting changed
This commit is contained in:
@ -552,8 +552,9 @@ bool Foam::Time::end() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::Time::stopAt(const stopAtControls sa) const
|
bool Foam::Time::stopAt(const stopAtControls sa) const
|
||||||
{
|
{
|
||||||
|
const bool changed = (stopAt_ != sa);
|
||||||
stopAt_ = sa;
|
stopAt_ = sa;
|
||||||
|
|
||||||
// adjust endTime
|
// adjust endTime
|
||||||
@ -565,6 +566,7 @@ void Foam::Time::stopAt(const stopAtControls sa) const
|
|||||||
{
|
{
|
||||||
endTime_ = GREAT;
|
endTime_ = GREAT;
|
||||||
}
|
}
|
||||||
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -406,7 +406,8 @@ public:
|
|||||||
|
|
||||||
//- Adjust the current stopAtControl. Note that this value
|
//- Adjust the current stopAtControl. Note that this value
|
||||||
// only persists until the next time the dictionary is read.
|
// only persists until the next time the dictionary is read.
|
||||||
virtual void stopAt(const stopAtControls) const;
|
// Return true if the stopAtControl changed.
|
||||||
|
virtual bool stopAt(const stopAtControls) const;
|
||||||
|
|
||||||
//- Reset the time and time-index to those of the given time
|
//- Reset the time and time-index to those of the given time
|
||||||
virtual void setTime(const Time&);
|
virtual void setTime(const Time&);
|
||||||
|
|||||||
Reference in New Issue
Block a user