SHF

SHF evaluates a simple harmonic function.

Use

Called By

Any user-written subroutine

Prerequisite

None

Calling Sequence

CALL SHF (x, x0, a, w, phi, b, iord, value, errflg)

Input Arguments

 
x
A double-precision variable that specifies the independent variable.
x0
A double-precision variable that specifies a shift in the independent variable.
a
A double-precision variable that specifies the amplitude of the harmonic function.
w
A double-precision variable that specifies the frequency of the sine function. The variable must be in radians per unit of the independent variable.
phi
A double-precision variable that specifies a phase shift in the sine function. The variable phi must be in radians.
b
A double-precision variable that specifies the average value of displacement.
iord
An integer variable that defines the order of the derivative that SHF is to return. The order is usually zero, but it can be one or two.

Output Arguments

 
errflg
A logical (true or false) variable that SHF returns to the calling subroutine. If SHF detects an error in the subroutine call statement, it sets errflg to true before it returns errflg to the calling subroutine.
value
A double-precision value the subroutine returns. The value returned depends on IORD as follows

Extended Definition

The following equation defines SHF: