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.

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

C Assign values for the X, Y, and Z first derivatives<br />

C<br />

VALUES(1) = ...<br />

VALUES(2) = ...<br />

VALUES(3) = ...<br />

C<br />

C - Compute and assign the curve second derivatives -<br />

C<br />

ELSE<br />

C<br />

C Your algorithm<br />

C<br />

...<br />

C<br />

C Assign values for the X, Y, and Z second derivatives<br />

C<br />

VALUES(1) = ...<br />

VALUES(2) = ...<br />

VALUES(3) = ...<br />

C<br />

ENDIF<br />

C<br />

RETURN<br />

END<br />

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

typedef void adams_c_CURSUB(const struct s<strong>Adams</strong>Curve* crv, double<br />

ALPHA, int IORD, int IFLAG, double* VALUES );<br />

/*<br />

* CURVE<br />

*/<br />

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

{<br />

int ID;<br />

int NPAR;<br />

const double* PAR;<br />

int CLOSED;<br />

int ORDER;<br />

double MINPAR;<br />

double MAXPAR;<br />

};<br />

Examples<br />

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

DIFSUB<br />

155

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

Saved successfully!

Ooh no, something went wrong!