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.

<strong>Welcome</strong> <strong>to</strong> <strong>Adams</strong>/<strong>Solver</strong> <strong>Subroutines</strong><br />

C Style - Pro<strong>to</strong>type<br />

typedef void adams_c_SFOSUB(const struct s<strong>Adams</strong>Sforce* sforce, double<br />

TIME, int DFLAG, int IFLAG, double* RESULT);<br />

/*<br />

* SFORCE<br />

*/<br />

struct s<strong>Adams</strong>Sforce<br />

{<br />

int ID;<br />

int NPAR;<br />

const double* PAR;<br />

int I;<br />

int J;<br />

int ACTION_ONLY;<br />

const char* Type;<br />

};<br />

Examples<br />

For an example of this subroutine, see sfosub.f.<br />

SPLINE_READ<br />

SPLINE_READ reads x, y, [and z] data from a file <strong>to</strong> a SPLINE statement. The SPLINE_READ<br />

subroutine is optional. You use it only if you do not want <strong>to</strong> use the X and Y arguments in the SPLINE<br />

statement (C++ or FORTRAN).<br />

Use<br />

Corresponding Statement<br />

SPLINE/id<br />

, X=x1, x2, x3, x4 [, . . . , xn]<br />

, Y=y1, y2, y3, y4 [, . . . , yn]<br />

[,LINEAR_EXTRAPOLATE]<br />

or<br />

SPLINE/id<br />

, X=x1, x2, x3, x4 [, . . . , xn]<br />

, Y=z1, y11, y12, y13, y14 [, . . . ,y1n]<br />

, Y=z2, y21, y22, y23, y24 [, . . . ,y2n]<br />

, Y=z3, y31, y32, y33, , LINEAR_EXTRAPOLATE y34 [, . . . ,y3n]<br />

, Y=z4, y41, y42, y43, y44 [, . . . ,y4n]<br />

[, . . . , Y=zm, ym1, ym2, ym3, ym4,[, . . . ,ymn]]<br />

[, LINEAR_EXTRAPOLATE]<br />

or<br />

205

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

Saved successfully!

Ooh no, something went wrong!