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.

76<br />

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

Input Arguments<br />

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

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

npar An integer variable that indicates the number of coefficients specified.<br />

The primary purpose of npar is <strong>to</strong> provide POLY with the number of<br />

values s<strong>to</strong>red in the par array.<br />

par A double-precision array of any number of coefficients (a0,...,an).<br />

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

x0 A double-precision variable that specifies a shift in the polynomial.<br />

Output Arguments<br />

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

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

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

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

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 />

A POLY general subroutine evaluates a polynomial. The following equation defines POLY:<br />

a<br />

∑<br />

j = 0<br />

PUT_SPLINE<br />

aj( x – x0) j<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 />

PUT_SPLINE is used in conjunction with SPLINE_READ. SPLINE_READ reads in the data points for<br />

a spline from a file. PUT_SPLINE is used <strong>to</strong> s<strong>to</strong>re this data within <strong>Adams</strong>/<strong>Solver</strong>.

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

Saved successfully!

Ooh no, something went wrong!