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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Input Arguments<br />

<strong>Welcome</strong> <strong>to</strong> <strong>Adams</strong>/<strong>Solver</strong> <strong>Subroutines</strong><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 step<br />

function begins.<br />

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

the step.<br />

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

function ends.<br />

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

step.<br />

iord An integer variable that defines the order of the derivative that STEP is <strong>to</strong><br />

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

Output Arguments<br />

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

subroutine. If STEP detects an error in the subroutine call statement, it sets<br />

errflg <strong>to</strong> true before it returns errflg <strong>to</strong> the calling subroutine.<br />

value A double-precision value the subroutine returns. The value returned<br />

depends on IORD as follows:<br />

Extended Definition<br />

Figure 1 below demonstrates the step function. For a comparison of STEP and STEP5, and the first<br />

derivatives of STEP and STEP5, see:<br />

• STEP (C++ or FORTRAN) function<br />

• STEP5 (C++ or FORTRAN) function<br />

IORD: Value:<br />

0 Value of the function.<br />

1 Partial derivative of the function with respect<br />

<strong>to</strong> x.<br />

2 Second partial derivative of the function with<br />

respect <strong>to</strong> x.<br />

F( x)<br />

∂ F<br />

-----<br />

∂ x<br />

∂ 2 F<br />

∂ x 2<br />

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

87

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

Saved successfully!

Ooh no, something went wrong!