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

C+===============================================================*<br />

C<br />

GSE_SET_ND<br />

This subroutine is used <strong>to</strong> specify the number of discrete internal states the in the GSE.<br />

When the GSE is initialized <strong>Adams</strong>/<strong>Solver</strong> (C++) will look for a GSE_SET_ND entry point in the GSE<br />

(if it was not explicitly specified using the ROUTINE=). If GSE_SET_ND is found, then during<br />

initialization of the GSE this subroutine will be called.<br />

Note: The value, ND, returned by GSE_SET_ND will override any value of ND that is specified<br />

in the GSE statement<br />

This user-defined subroutine is new for <strong>Adams</strong>/<strong>Solver</strong> (C++) v2006r1 and gives the GSE the ability <strong>to</strong><br />

define its own number of discrete states. That is, the number of discrete states in a GSE can be changed<br />

without changing the corresponding adams model (.amd).<br />

Calling Sequence and Structure<br />

SUBROUTINE GSE_SET_ND (ID, ND)<br />

Input Arguments<br />

ID An integer variable that gives the identifier of the GSE statement requesting<br />

information from the GSE subroutine. From the identifier, <strong>Adams</strong>/<strong>Solver</strong><br />

au<strong>to</strong>matically recognizes other information (such as the Par argument) that is<br />

associated with that GSE statement.<br />

Output Arguments<br />

ND An integer number giving the number of discrete states that this GSE maintains.<br />

Example<br />

C<br />

C+=================================================================*<br />

C<br />

SUBROUTINE GSE_SET_ND (ID, ND)<br />

C<br />

C Inputs:<br />

C<br />

INTEGER ID<br />

C<br />

C Outputs:<br />

47

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

Saved successfully!

Ooh no, something went wrong!