UtilLimitTimeStepToCheckPoint Method

Make sure timestep hits exactly checkPoint.

The lookAhead parameter defines how many time steps before checkPoint to modify in order to hit the checkPoint. If lookAhead is 1, only the last time step before checkPoint will be modified. If 2, then two time steps before checkPoint will be modified etc.

Assuming checkPoint is after currentTime (suggestedTimeStep is returned).

Definition

Namespace: DHI.Mike1D.Generic
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public static TimeSpan LimitTimeStepToCheckPoint(
	DateTime currentTime,
	TimeSpan suggestedTimeStep,
	DateTime checkPoint,
	int lookAhead
)

Parameters

currentTime  DateTime

[Missing <param name="currentTime"/> documentation for "M:DHI.Mike1D.Generic.Util.LimitTimeStepToCheckPoint(System.DateTime,System.TimeSpan,System.DateTime,System.Int32)"]

suggestedTimeStep  TimeSpan

[Missing <param name="suggestedTimeStep"/> documentation for "M:DHI.Mike1D.Generic.Util.LimitTimeStepToCheckPoint(System.DateTime,System.TimeSpan,System.DateTime,System.Int32)"]

checkPoint  DateTime

[Missing <param name="checkPoint"/> documentation for "M:DHI.Mike1D.Generic.Util.LimitTimeStepToCheckPoint(System.DateTime,System.TimeSpan,System.DateTime,System.Int32)"]

lookAhead  Int32

[Missing <param name="lookAhead"/> documentation for "M:DHI.Mike1D.Generic.Util.LimitTimeStepToCheckPoint(System.DateTime,System.TimeSpan,System.DateTime,System.Int32)"]

Return Value

TimeSpan
Time step that is sure to hit exactly checkPoint in this or one of the following time steps

See Also