11.01.2013 Views

NX Nastran DMAP Programmer's Guide - Kxcad.net

NX Nastran DMAP Programmer's Guide - Kxcad.net

NX Nastran DMAP Programmer's Guide - 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.

1.5 Instructions<br />

Instructions<br />

A <strong>DMAP</strong> instruction can be classified as either a module or a statement. A module is<br />

similar to a "macro" function and, in general, processes data blocks as input and/or<br />

output. A module may also have parameters as input and/or output. A statement is<br />

any instruction that is not a module and that does not operate on data blocks.<br />

Modules<br />

A module instruction has the following form: the name of the module followed by a<br />

comma [,] and a list of input data block names separated by commas, a slash [/], a list<br />

of output data block names separated by commas, a slash, and a list of parameter<br />

(variable names or constants) separated by slashes:<br />

module_name ,input_data_block_list /<br />

output_data_block_list /<br />

parameter_list $<br />

The dollar sign [$] is required to terminate the module instruction. The modules are<br />

described in “Detailed Descriptions of <strong>DMAP</strong> Modules and Statements” on<br />

page 766. Most modules have a prescribed number of inputs, outputs, and<br />

parameters, which are defined in the Module Property List (MPL). The MPL is an<br />

internal <strong>NX</strong> <strong>Nastran</strong> table that prescribes the exact format of all modules--the number<br />

of input and output data block lists and the number, type, and default of the<br />

parameters in the parameter list. The MPL can be listed by specifying DIAG 31 in the<br />

Executive Control Section. The position of the data block and parameter names is<br />

critical to the proper execution of the module.<br />

Below is an example using the MPYAD module, which performs the following matrix<br />

operation:<br />

or<br />

[D] = SIGNAB*[A][B] + SIGNC*[C]<br />

[D] = SIGNAB*[A] T [B] + SIGNC*[C]<br />

where [A], [B], [C] and [D] represent matrices, and SIGNAB and SIGNC represent the<br />

sign to be applied to the product and additive matrices, respectively.<br />

The format of the MPYAD module is:<br />

MPYAD , A , B , C / D / T / SIGNAB / SIGNC / PREC / FORM $<br />

17

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

Saved successfully!

Ooh no, something went wrong!