02.04.2013 Views

Welcome to Adams/Solver Subroutines - Kxcad.net

Welcome to Adams/Solver Subroutines - Kxcad.net

Welcome to Adams/Solver Subroutines - Kxcad.net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

64<br />

<strong>Adams</strong>/<strong>Solver</strong><br />

Input Arguments<br />

h0 A double-precision variable that specifies the value of the function before<br />

the step (x £ x0).<br />

h1 A double-precision variable that specifies the value of the function after the<br />

step (x x1).<br />

iord An integer variable that defines the order of the derivative that HAVSIN is<br />

<strong>to</strong> return. The order is usually zero, but it can be one or two.<br />

x A double-precision variable that specifies the independent variable.<br />

x0 A double-precision variable that specifies the x value at which the haversine<br />

function begins.<br />

x1 A double-precision variable that specifies the value at which the haversine<br />

function ends.<br />

Output Arguments<br />

errflg A logical (true or false) variable that HAVSIN returns <strong>to</strong> the calling<br />

subroutine. If HAVSIN detects an error in the subroutine call<br />

statement, it sets errflg <strong>to</strong> true before it returns errflg <strong>to</strong> the calling<br />

subroutine.<br />

value A double-precision value the subroutine returns. If iord equals zero,<br />

value is the function evaluated at x. If iord equals one, value is the first<br />

derivative of F(x) with respect <strong>to</strong> the independent variable x. If iord<br />

equals two, value is the second derivative of F(x) with respect <strong>to</strong> the<br />

independent variable x. Value is:<br />

Extended Definition<br />

0<br />

1<br />

2<br />

IORD: Value:<br />

F( x)<br />

∂ F( x)<br />

--------------<br />

∂ x<br />

∂ F 2 ( x)<br />

∂ x 2<br />

----------------<br />

The HAVSIN general subroutine evaluates a haversine function. Figure 1 below illustrates the haversine

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!