© 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved. This software and related documentation are proprietary to Siemens Product Lifecycle Management Software Inc.
NASTRAN is a registered trademark of the National Aeronautics and Space Administration. NX Nastran is an enhanced proprietary version developed and maintained by Siemens Product Lifecycle Management Software Inc.
MSC is a registered trademark of MSC.Software Corporation. MSC.Nastran and MSC.Patran are trademarks of MSC.Software Corporation.
All other trademarks are the property of their respective owners.
TAUCS Copyright and License
TAUCS Version 2.0, November 29, 2001. Copyright (c) 2001, 2002, 2003 by Sivan Toledo, Tel-Aviv University, [email protected]. All Rights Reserved.
TAUCS License:
Your use or distribution of TAUCS or any derivative code implies that you agree to this License. THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
Permission is hereby granted to use or copy this program, provided that the Copyright, this License, and the Availability of the original version is retained on all copies. User documentation of any code that uses this code or any derivative code must cite the Copyright, this License, the Availability note, and "Used by permission." If this code or any derivative code is accessible from within MATLAB, then typing "help taucs" must cite the Copyright, and "type taucs" must also cite this License and the Availability note. Permission to modify the code and to distribute modified code is granted, provided the Copyright, this License, and the Availability note are retained, and a notice that the code was modified is included. This software is provided to you free of charge. Availability (TAUCS)
As of version 2.1, we distribute the code in 4 formats: zip and tarred-gzipped (tgz), with or without binaries for external libraries. The bundled external libraries should allow you to build the test programs on Linux, Windows, and MacOS X without installing additional software. We recommend that you download the full distributions, and then perhaps replace the bundled libraries by higher performance ones (e.g., with a BLAS library that is specifically optimized for your machine). If you want to conserve bandwidth and you want to install the required libraries yourself, download the lean distributions. The zip and tgz files are identical, except that on Linux, Unix, and MacOS, unpacking the tgz file ensures that the configure script is marked as executable (unpack with tar zxvpf), otherwise you will have to change its permissions manually.
Proprietary & Restricted Rights Notice . . . 2 Direct Matrix Abstraction . . . 1-1
Introduction to DMAP . . . 1-2 The NX Nastran DMAP Language . . . 1-2 Parameters . . . 1-3 Data Blocks . . . 1-10 Instructions . . . 1-12 Output from a Previous Module Rule . . . 1-30 Automatic Deletion of Scratch Data Blocks . . . 1-30 Preface Modules and SOLution 100 . . . 1-31 Processing User Errors . . . 1-32 SubDMAPs DBMGR, DBSTORE, and DBFETCH . . . 1-32 WHERE and CONVERT Clauses . . . 1-34
Overview of Data Blocks . . . 2-1
Introduction . . . 2-1 Matrix Data Blocks . . . 2-1 Table Data Blocks . . . 2-2
Data Block Descriptions A-E . . . 3-1
AXIC . . . 3-2 AXIC68 . . . 3-14 BGPDT . . . 3-26 BGPDT68 . . . 3-28 CASECC . . . 3-29 CDDATA . . . 3-49 CLAMA . . . 3-53 CONTAB . . . 3-54 CONTACT . . . 3-55 CSTM . . . 3-60 CSTM68 . . . 3-62 DBCOPT . . . 3-69 DESCYC . . . 3-71 DESTAB . . . 3-72 DISTL . . . 3-73 DIT . . . 3-74 DSCMCOL . . . 3-78 DVPTAB . . . 3-90 DYNAMIC . . . 3-92 EDOM . . . 3-106 EDT . . . 3-133 EGPSF . . . 3-161 EGPSTR . . . 3-166
ELDCT . . . 3-169 EPT . . . 3-171 EPT705 . . . 3-207 EQEXIN . . . 3-242 ERROR . . . 3-244 EST . . . 3-245
Data Block Descriptions F-M . . . 4-1
FOL . . . 4-1 GEOM1 . . . 4-2 GEOM2 . . . 4-15 GEOM3 . . . 4-64 GEOM4 . . . 4-80 GEOM168 . . . 4-106 GEOM4705 . . . 4-119 GPDT . . . 4-144 GPDT68 . . . 4-145 GPL . . . 4-146 HIS . . . 4-147 KDICT . . . 4-148 LAMA . . . 4-150 MPT . . . 4-152
Data Block Descriptions O-V . . . 5-1
OBC . . . 5-1 OBG . . . 5-3 OBJTAB . . . 5-7 OCCORF . . . 5-8 OCPSDF . . . 5-9 OEE . . . 5-10 OEF . . . 5-16 OEFMC . . . 5-84 OES . . . 5-87 OESMC . . . 5-279 OGF . . . 5-281 OGK . . . 5-286 OGS . . . 5-288 OMECON . . . 5-295 OMEOSC . . . 5-297 OMKEC . . . 5-299 OMKEO . . . 5-302 OMSEC . . . 5-304 OMSEO . . . 5-306 OPG . . . 5-308 OPTPRM . . . 5-313 OQG . . . 5-314 OQGMC . . . 5-320 OSDISP2 . . . 5-322 OSHT . . . 5-323 OSPDS . . . 5-325 OSTRMC . . . 5-327 OUG . . . 5-330 OUGGC . . . 5-342
OUGMC . . . 5-344 OUGPC . . . 5-349 OUGRC . . . 5-351 R1MAP . . . 5-354 R1TAB . . . 5-355 RESP3 . . . 5-363 RESP12 . . . 5-366 SEMAP . . . 5-369 SET . . . 5-373 SETMC . . . 5-374 SIL . . . 5-375 TOL . . . 5-376 VIEWTB . . . 5-376 Glossaries . . . 6-1
Data Block Glossary . . . 6-1 Parameter Glossary . . . 6-55
NASTRAN Data Definition Language (NDDL) . . . 7-1
NDDL Summary . . . 7-1 Detailed Description of NDDL Statements . . . 7-2
Overview of DMAP Modules and Statements . . . 8-1
DMAP Module and Statement List . . . 8-1 DMAP Module and Statement Description Summary . . . 8-5
Descriptions of DMAP Modules and Statements . . . 9-1
ACMG . . . 9-2 ADAPT . . . 9-3 ADD . . . 9-6 ADD5 . . . 9-8 ADDVM . . . 9-10 ADG . . . 9-10 ADR . . . 9-12 AELOOP . . . 9-13 AEMODEL . . . 9-15 AMG . . . 9-15 AMP . . . 9-17 APD . . . 9-18 APPEND . . . 9-20 ASDR . . . 9-23 ASG . . . 9-25 AXMDRV . . . 9-26 AXMPR1 . . . 9-27 AXMPR2 . . . 9-28 BCDR . . . 9-29 BDRYINFO . . . 9-30 BGCASO . . . 9-32 BGP . . . 9-33 BMG . . . 9-34 BNDSPC . . . 9-35 BOLTFOR . . . 9-36
BOLTSF . . . 9-37 CASE . . . 9-38 CEAD . . . 9-43 CHKCOME . . . 9-45 CHKCOMG . . . 9-46 CHKCVG . . . 9-47 CMPZPR . . . 9-48 CNTGLUE . . . 9-49 CNTITER . . . 9-49 COMBOUT . . . 9-52 COPY . . . 9-52 CURV . . . 9-53 CURVPLOT . . . 9-55 CYCLIC1 . . . 9-56 CYCLIC2 . . . 9-58 CYCLIC3 . . . 9-59 CYCLIC4 . . . 9-61 DBC . . . 9-63 DBDELETE . . . 9-70 DBDICT . . . 9-71 DBEQUIV . . . 9-83 SubDMAP DBFETCH . . . 9-85 SubDMAP DBMGR . . . 9-86 DBSTATUS . . . 9-89 SubDMAP DBSTORE . . . 9-90 DBVIEW . . . 9-92 DCMP . . . 9-93 DDR2 . . . 9-96 DDR2N . . . 9-99 DDRMM . . . 9-102 DECOMP . . . 9-104 DELETE . . . 9-108 DIAGONAL . . . 9-109 DISDCMP . . . 9-111 DISFBS . . . 9-112 DISOFPM . . . 9-113 DISOFPS . . . 9-114 DISOPT . . . 9-115 DISUTIL . . . 9-117 DIVERG . . . 9-120 DMIIN . . . 9-121 DOM6 . . . 9-122 DOM9 . . . 9-124 DOM10 . . . 9-126 DOM11 . . . 9-129 DOM12 . . . 9-131 DOPFS . . . 9-135 DOPR1 . . . 9-137 DOPR2 . . . 9-139 DOPR3 . . . 9-141 DOPR4 . . . 9-144 DOPR5 . . . 9-145 DOPR6 . . . 9-146 DOPRAN . . . 9-148
DPD . . . 9-148 DRMH1 . . . 9-151 DRMH2 . . . 9-152 DRMH3 . . . 9-153 DRMS1 . . . 9-154 DSABO . . . 9-156 DSAD . . . 9-158 DSADJ . . . 9-163 DSAE . . . 9-165 DSAF . . . 9-166 DSAH . . . 9-168 DSAJ . . . 9-170 DSAL . . . 9-171 DSAM . . . 9-173 DSAN . . . 9-174 DSAP . . . 9-175 DSAPRT . . . 9-176 DSAR . . . 9-177 DSARLP . . . 9-179 DSARME . . . 9-180 DSARMG . . . 9-181 DSARSN . . . 9-181 DSAW . . . 9-183 DSDVRG . . . 9-183 DSFLTE . . . 9-184 DSFLTF . . . 9-185 DSMA . . . 9-186 DSPRM . . . 9-187 DSTA . . . 9-189 DSTAP2 . . . 9-191 DSVG1 . . . 9-192 DSVG1P . . . 9-193 DSVG2 . . . 9-195 DSVG3 . . . 9-196 DSVGP4 . . . 9-197 DSVGP5 . . . 9-198 DTIIN . . . 9-199 DUMMOD1 . . . 9-200 DUMMOD2 . . . 9-200 DUMMOD3 . . . 9-201 DUMMOD4 . . . 9-202 DVIEWP . . . 9-203 DYNREDU . . . 9-204 EFFMAS . . . 9-205 ELFDR . . . 9-206 ELTPRT . . . 9-207 EMA . . . 9-210 EMAKFR . . . 9-211 EMC . . . 9-212 EMG . . . 9-213 EMR . . . 9-218 EQUIVX . . . 9-219 ESTINDX . . . 9-220 EXTSEIDS . . . 9-221
FA1 . . . 9-221 FA2 . . . 9-223 FBS . . . 9-224 FILE . . . 9-226 FOCOASET . . . 9-227 FOCODS . . . 9-228 FOCOEL . . . 9-228 FOCOST . . . 9-230 FOELCF . . . 9-231 FOELCS . . . 9-232 FOELCCS . . . 9-233 FONOTR . . . 9-234 FORTIO . . . 9-235 FRLG . . . 9-236 FRLGEN . . . 9-238 FRQDRV . . . 9-239 FRRD1 . . . 9-239 FRRD2 . . . 9-242 FRRDRU . . . 9-243 GENTRAN . . . 9-245 GETCOL . . . 9-246 GETMKL . . . 9-247 GI . . . 9-247 GKAM . . . 9-248 GKAMW . . . 9-250 GLFONOTR . . . 9-253 GMERGE . . . 9-253 GNFM . . . 9-254 GP0 . . . 9-255 GP1 . . . 9-257 GP1EX . . . 9-259 GP1LM . . . 9-259 GP2 . . . 9-260 GP3 . . . 9-261 GP4 . . . 9-262 GP5 . . . 9-265 GP6 . . . 9-266 GPARTN . . . 9-267 GPFDR . . . 9-268 GPFTOTL . . . 9-271 GPFXPND . . . 9-272 GPJAC . . . 9-272 GPSP . . . 9-273 GPSTR1 . . . 9-275 GPSTR2 . . . 9-276 GPWG . . . 9-277 GUST . . . 9-278 IFP . . . 9-280 IFP1 . . . 9-283 IFP3 . . . 9-284 IFP4 . . . 9-286 IFP5 . . . 9-288 IFP6 . . . 9-289 IFP7 . . . 9-290
IFP8 . . . 9-291 IFP9 . . . 9-292 IFPINDX . . . 9-293 IFT . . . 9-294 INPUTT2 . . . 9-294 INPUTT4 . . . 9-296 INTERR . . . 9-298 ISHELL . . . 9-299 LAMX . . . 9-301 LANCZOS . . . 9-305 LCGEN . . . 9-307 LMATPRT . . . 9-308 LRFORCE . . . 9-309 MACOFP . . . 9-310 MAKAEFA . . . 9-311 MAKAEFS . . . 9-312 MAKAEMON . . . 9-313 MAKCOMP . . . 9-314 MAKENEW . . . 9-314 MAKEOLD . . . 9-316 MAKETR . . . 9-318 MAKMON . . . 9-319 MATGEN . . . 9-320 MATGPR . . . 9-332 MATINIT . . . 9-336 MATMOD . . . 9-337 MATPCH . . . 9-385 MATPRN . . . 9-387 MATPRT . . . 9-388 MATREDU . . . 9-388 MCE1 . . . 9-390 MCE2 . . . 9-390 MDATA . . . 9-391 MDCASE . . . 9-392 MERGE . . . 9-395 MERGEOFP . . . 9-399 MESSAGE . . . 9-400 MGEN . . . 9-400 MKCNTRL . . . 9-401 MKCSTMA . . . 9-402 MKSPLINE . . . 9-403 MODACC . . . 9-403 MODEPF . . . 9-405 MODEPOUT . . . 9-408 MODEPT . . . 9-410 MODGDN . . . 9-410 MODGM2 . . . 9-411 MODGM4 . . . 9-412 MODTRK . . . 9-414 MODTRL . . . 9-415 MODUSET . . . 9-417 MONVEC . . . 9-419 MPP . . . 9-419 MPYAD . . . 9-421
MRGCOMP . . . 9-426 MRGMON . . . 9-427 MSGHAN . . . 9-427 MSGSTRES . . . 9-428 MTRXIN . . . 9-428 NASSETS . . . 9-433 NLCOMB . . . 9-434 NLITER . . . 9-435 NLTRD . . . 9-441 NLTRD2 . . . 9-444 NORM . . . 9-448 NXNADAMS . . . 9-450 NXNMATLB . . . 9-451 NXNRFI . . . 9-452 OFP . . . 9-454 OPTGP0 . . . 9-456 ORTHOG . . . 9-457 OUTPRT . . . 9-458 OUTPUT2 . . . 9-462 OUTPUT4 . . . 9-470 PARAM . . . 9-476 PARAML . . . 9-478 PARTN . . . 9-496 PCOMB . . . 9-500 PCOPY . . . 9-501 PLOT . . . 9-502 PLTHBDY . . . 9-504 PLTSET . . . 9-504 PRESOL . . . 9-506 PROJVER . . . 9-507 PRTMSG . . . 9-508 PRTPARM . . . 9-508 PURGEX . . . 9-510 PVT . . . 9-510 RANDOM . . . 9-511 RBMG3 . . . 9-515 RBMG4 . . . 9-516 READ . . . 9-517 RESTART . . . 9-524 RMAXMIN . . . 9-525 RMG2 . . . 9-527 ROTCDA . . . 9-528 ROTCZG . . . 9-530 ROTUTL . . . 9-531 RSPEC . . . 9-532 SCALAR . . . 9-533 SDP . . . 9-534 SDR1 . . . 9-536 SDR2 . . . 9-538 SDR3 . . . 9-543 SDRCOMP . . . 9-544 SDREE . . . 9-545 SDRHT . . . 9-546 SDRNL . . . 9-547
SDRP . . . 9-549 SDRX . . . 9-551 SDRXD . . . 9-553 SDSA . . . 9-554 SDSB . . . 9-555 SDSC . . . 9-556 SECONVRT . . . 9-557 SEDR . . . 9-558 SEDRDR . . . 9-560 SELA . . . 9-562 SEMA . . . 9-563 SEP1 . . . 9-565 SEP1X . . . 9-566 SEP2 . . . 9-568 SEP2CT . . . 9-570 SEP2DR . . . 9-570 SEP2X . . . 9-574 SEP3 . . . 9-575 SEP4 . . . 9-576 SEPDIS . . . 9-578 SEPLOT . . . 9-578 SEPR1 . . . 9-580 SEQP . . . 9-581 SETMON . . . 9-586 SHPCAS . . . 9-586 SMA3 . . . 9-587 SMPYAD . . . 9-588 SOLVE . . . 9-589 SOLVIT . . . 9-591 SSG1 . . . 9-597 SSG2 . . . 9-599 SSG3 . . . 9-600 SSG4 . . . 9-602 STATICS . . . 9-603 STDCON . . . 9-605 STRSORT . . . 9-606 TA1 . . . 9-607 TABEDIT . . . 9-610 TABPRT . . . 9-614 TABPT . . . 9-622 TAFF . . . 9-623 TAHT . . . 9-624 TASNP1 . . . 9-625 TASNP2 . . . 9-625 TIMETEST . . . 9-627 TOLAPP . . . 9-631 TRD1 . . . 9-633 TRD2 . . . 9-635 TRLG . . . 9-637 TRNSP . . . 9-640 TYPE . . . 9-640 UEIGL . . . 9-643 UGVADD . . . 9-645 UMERGE . . . 9-646
UMERGE1 . . . 9-648 UPARTN . . . 9-650 UREDUC . . . 9-652 VDR . . . 9-653 VDRE . . . 9-655 VDRMC . . . 9-656 VDRPC . . . 9-658 VEC . . . 9-659 VECPLOT . . . 9-662 VIEW . . . 9-666 VIEWP . . . 9-667 WEIGHT . . . 9-669 XSELOADS . . . 9-669 XSORT . . . 9-670 XYPLOT . . . 9-671 XYTRAN . . . 9-672
1
Direct Matrix Abstraction
• Introduction to DMAP
• The NX Nastran DMAP Language • Parameters
• Data Blocks • Instructions
• “Output from a Previous Module” Rule • Automatic Deletion of Scratch Data Blocks • Preface Modules and SOLution 100
• Processing of User Errors
• SubDMAPs DBMGR, DBSTORE, and DBFETCH
1.1
Introduction to DMAP
NX Nastran Direct Matrix Abstraction Program (DMAP) is a high-level language with its own compiler and grammatical rules. This section provides a summary description of the NX Nastran DMAP language, rules, and syntax.
A DMAP program consists of a series of functional blocks called “modules,” each of which has a unique name and a specific function. Modules are executed sequentially; branching and looping operations are performed by DMAP control statements. Modules communicate through the NX Nastran Executive System (NES) via logical collections of data called “data blocks” and “parameters.”
Data blocks come in two distinct forms: “matrices” that obey the rules of matrix algebra, and “tables” that represent a convenient collection of data items. Data blocks are given arbitrary names (Siemens PLM Software recommends mnemonic names) and have header and trailer information defining their characteristics.
Parameters are scalar items used for specifying control, operation, or system characteristics. Modules can use “input parameters,” “output parameters,” or both. Input parameters affect the internal operation of the modules. Output parameters are used to control DMAP logic and/or to pass scalar information to subsequent modules.
Data blocks and parameters can be written onto either scratch or permanent physical files. When the normal NX Nastran execution completes, data blocks and parameters written to scratch files are erased, and those written to the permanent physical file are available for future use. The NX Nastran Data Definition Language (NDDL) designates whether a data block is scratch or permanent. A detailed description of the NDDL statements can be found in“NASTRAN Data Definition Language (NDDL)”.
NX Nastran provides a variety of prewritten solution sequences. These solution sequences consist of a series of DMAP statements. You can use DMAP to modify these prewritten solution sequences or to write your own solution sequences. The compilation, linkage, and execution of a DMAP program is specified by executive control statements in the input file. The creation of and access to databases is specified by file management statements also contained in the input file. File management statements are described in the “File Management Statements” in the NX Nastran Quick Reference Guide .
1.2
The NX Nastran DMAP Language
The basic components, or objects, of the DMAP language are:
Parameters Scalar quantities used to control the flow of DMAP execution and
to communicate options and/or values to modules or functions.
Data Blocks Tables or matrices represented by a symbolic name.
Instructions Statements or modules that process parameters and/or data
blocks as input and/or output.
The basic syntax of the DMAP language is:
• A physical entry consists of information in columns 1 through 72. Columns 73 through 80 can be used for comments, but these columns do not appear in the printed listing and are not stored on the database.
• For the specification of modules or statements, a parent entry continues to a subsequent entry if it terminates in a comma [ , ] or a slash [ / ], or if it is missing a right parenthesis [ ) ]. • The dollar sign [ $ ] ends any DMAP instruction and causes all subsequent data to be treated as commentary. Siemens PLM Software recommends following the convention of terminating all DMAP instructions with a dollar sign.
• DMAP symbolic names are used to identify variable parameters, data blocks, DBVIEW view-names, subDMAPs, or LABEL statements. A symbolic name is composed of
alphanumeric characters and is 1 to 8 characters in length. The following characters are allowed: A through Z, and 0 through 9. The first character must be a character from A through Z.
1.3
Parameters
Parameters can be either constants, variables, or expressions and can represent one of several types:
Type Description Example(s)
Integer Whole number 10 or -4
Real Decimal number that is a whole number and a decimal
point, with an optional decimal fraction.
27000. or 2.7E5 or 2.7D5
Complex A pair of real numbers representing the real and imaginary parts of a complex quantity
(1.1,2.3) or (1.D0,3.5D1)
Logical Represents either TRUE or FALSE TRUE or FALSE
Character A string of 1 to 80 characters ’GEORGE’
Also, the real and complex types are either single or double precision. The following table indicates the storage units required as a function of data type. One storage unit is the basic word size on a computer. Typically, a word is 32 bits long on a short-word computer and 64 bits on a long-word computer.
Type Number of words
Integer 1
Real single precision 1
Real double precision 2
Complex single precision 2
Type Number of words
Logical 1
Character 1 to 20
The type of a parameter must be declared in at least one of three ways:
Constant Inherent in its specification or construction
Explicit On a TYPE statement for variable parameters
Implicit In a module’s parameter list for variable parameters
Constant Parameters
A constant represents a fixed value and is a number (integer, real, or complex), logical, or character string.
Integer Constants
An integer constant is a whole number with no decimal point. Its form is:
snn
where:
s = a sign, plus (+) or minus (-)
nn = a string of digits (0 through 9)
s is optional if the sign is positive (+). A minus sign must be used to indicate a negative integer constant. The absolute value of an integer constant cannot be greater than 231− 1 = 214748367.
Real Constants
A real constant is a whole number with a decimal point that can be followed by a decimal fraction and/or a decimal exponent. The complete form is:
snn.ddEsee For single precision
snn.ddDsee For double precision
where:
s = A sign, plus (+) or minus (-)
nn, dd, ee
E or D = That snn.dd is multiplied by ee raised to the power of 10. E indicates single precision, and D indicates double precision.
s is optional if the sign is positive (+). A minus sign (-) indicates a negative real constant or negative exponent. D is required to specify double precision. E is optional if no exponent is required and the constant is single precision. However, if either E or D is specified, an integer must follow, even if the exponent is 0.
Only the leftmost 14 digits in nn.dd are used by NX Nastran. Leading zeros are ignored in counting the leftmost 14 digits.
Complex Constants
A complex constant is a pair of real constants separated by a comma and enclosed in parentheses. The first real constant represents the real part of the complex number, and the second real constant represents the imaginary part.
Logical Constants
A logical constant is specified as TRUE or FALSE. Character Constants
A character constant is a string of 1 through 80 characters that can have embedded blanks. A character constant must also be enclosed by right hand single quotation marks.
Variable Parameters
A variable parameter is represented by a symbolic name, and its value can change during the DMAP execution. The name of a variable parameter does not have to be unique with respect to symbolic names for modules, data blocks, subDMAPs, or LABELs. The name of a variable parameter cannot be NOT, AND, XOR, OR, or EQV.
Variable parameters can have their attributes (type, authorization, and default) set explicitly with a TYPE DMAP statement or implicitly by a module. (Variable parameters that are saved on the database must also be designated as NDDL parameters in the TYPE DMAP statement.) Variable parameters that are not specified with a TYPE DMAP statement use the attributes from the DMAP instruction where the parameter first appears.
Value of a Variable Parameter
During a DMAP execution or when restarting a DMAP from the database, the value of a variable parameter is determined by the first applicable value on the following sequential list:
1. Value from the most recently executed assignment DMAP statement or the most recently executed save function (S,N prefix. See“DMAP Modules and Statements”).
2. Value from the PARAM Bulk Data entry, if the parameter NAME has the Y authorization. 3. Value saved on the database, if the parameter NAME is listed with an NDDL TYPE DMAP
4. Value from the NAME=v, if present in a non-NDDL parameter TYPE instruction. This value is determined at DMAP compile time from the TYPE instruction (regardless of its location in DMAP) that contains the statement.
5. Default value from the NDDL, if the NDDL keyword is specified on the TYPE DMAP statement. Parameters listed in the NDDL always have a default value of zero, blank, or FALSE, unless a value is explicitly given in the PARAM NDDL statement.
6. Default value from the first occurrence of either a non-NDDL TYPE DMAP statement or a module with a MPL default value. Non-NDDL TYPE DMAP statements have a default value of zero, blank, or FALSE for real or integer, character, or logical parameters.
7. Default value is zero, blank, or FALSE for real or integer, character, or logical parameters. Determining the current value of a variable parameter is summarized in the following table.
NDDL TYPEd Not TYPEd
Last executed assignment statement or module save (S,N,). The qualifier values for NDDL parameters cannot change.
Bulk Data PARAM entry override, if the parameter is type Y and has not been previously reassigned in an assignment (=) statement (unless the PVT module has been executed to reset the Bulk Data and Case Control PARAM entries).
Value on the data base name=vfrom its first occurrence in a TYPE statement
NDDL default value TYPE statement default
MPL default of parameter first occurrence
Predefined Variable Parameters
The program predefines the value of some variable parameters. It is not necessary to type these parameters with a TYPE DMAP statement, nor is it possible to change their type. Siemens PLM Software does not recommend changing these parameter values. The predefined variable parameters are:
NAME VALUE TYPE
ALWAYS -1 Integer
NEVER +1 Integer
TRUE TRUE Logical
FALSE FALSE Logical
NOGO 0 Integer
Initial values for variable parameters can be specified using the PARAM Bulk Data entry or the PARAM Case Control command.
Parameter values from the Bulk Data Section are brought into the DMAP sequence via the IFP module. Parameter values from case control are brought into the DMAP sequence via the PVT module. The PVT module reads the case control PARAM commands and resolves parameter values specified in both the Case Control and Bulk Data Sections.
Recommended Parameter Type Specification
Follow these recommendations to produce a more readable DMAP sequence where all Y parameters and parameters with non-MPL defaults are specified on TYPE statements.
• If the parameter’s value is to be specified in the Case Control or Bulk Data Section, type the parameter near the top of the DMAP sequence, as shown below.
TYPE PARM,,type,Y,param_name $
• If the parameter’s default value is defined on the NDDL PARAM statement and you want to use the NDDL default value, type the parameter near the top of the DMAP sequence, as shown below.
TYPE PARM,NDDL,type,Y,param_name $
• If the desired default value differs from the MPL default, specify the parameter and the default value on a TYPE statement, as shown below.
TYPE PARM,,type,Y,param_name=default_value $
• Specify in module instructions, as needed, "/param_name/" or "/S,N,param_name/”. • Do not use the following obsolete parameter prefix specifications in module instructions:
/V,Y,param_name/ /S,Y,param_name/ /V,N,param_name/ /C,Y,param_name/ /C,N,param_name/
For example, Siemens PLM Software recommends the following sequence for setting the TYPE of ALPHA: TYPE PARM,,CS,Y,ALPHA=(1.,1.) $ TYPE PARM,,CS,N,ALPHAX $ . . . ALPHAX=ALPHA $
IF( FLAG ) ALPHAX=CMPLX(BETA,GAMMA) $ .
. .
ADD A,B/C/ALPHAX $
Siemens PLM Software does not recommend the following:
IF( FLAG ) PARAMR //’COMPLEX’//BETA/GAMMA/S,Y,ALPHA $ .
. .
ADD A,B/C/V,Y,ALPHA=(1.,1.) $
Expressions and Operators
An expression represents a single value and consists of one or more constant and/or variable parameters separated by operators. Expressions are classified as arithmetic, relational, logical, or character. Arithmetic expressions produce numerical values; relational and logical expressions produce logical values. An expression can contain intrinsic functions. An expression is specified: • In the right-hand side of an assignment (=) statement
• As arguments for intrinsic functions
• As logical expressions in control statements: DO WHILE, IF, IF-THEN, ELSE IF-THEN • As logical expressions in the WHERE clause of
DBVIEW, DBEQUIV, and DBDELETE statements Arithmetic Operators
The allowable arithmetic operations are shown in the table below in the order of execution precedence. Parentheses are used to change the order of precedence. Operations within parentheses are performed first, with the usual order of precedence being maintained within the parentheses.
Operator Operation Sample expressions Interpreted as
–,+ Negative or Positive
immediately preceded by exponentiation
X–Y X(–Y)
** Exponentiation –X**Y –(X**Y)
–,+ Negative or Positive –X – Y (–X) – Y
*, / Multiplication or Division X*Y+Z (X*Y)+Z
+,– Addition or Subtraction X+Y X+Y
In general, mixed mode expressions are not supported. For example, to compute A = B*C, where A and B are complex, but C is real, it is necessary to convert C to a complex number: A = B*CMPLX (C), where CMPLX is described under “Intrinsic Functions” in this section. Character Operator
The only character operation is concatenation. Its form is shown below.
Operator Operation Sample expressions
Relational Operators
Relational operators are used to compare two expressions. The result of the comparison is a logical TRUE or FALSE. When arithmetic and relational operators are combined in one expression, the arithmetic operations are performed first. The table below shows the allowable relational operators.
Operator Relation tested Expression
= Equality X=Y
<>,>< Inequality X<>Y, X><Y
< Less than X<Y
> Greater than X>Y
≤ Less than or equal X≤Y
≥ Greater than or equal X≥Y
Logical Operators
Logical operators perform tests on multiple relations or Boolean operations. A logical operator returns a result that is either TRUE or FALSE. The outcome of a logical operation is determined as shown in the table below. These outcomes are listed in order of precedence. Parentheses are used to change the order of precedence.
Operations within parentheses are performed first, with the usual order of precedence being maintained within the parentheses.
Operator X Y Output
TRUE n/a FALSE
NOT
FALSE n/a TRUE
TRUE TRUE TRUE
TRUE FALSE FALSE
FALSE TRUE FALSE
X AND Y
FALSE FALSE FALSE
TRUE TRUE TRUE
TRUE FALSE TRUE
FALSE TRUE TRUE
X OR Y
Operator X Y Output
TRUE TRUE FALSE
TRUE FALSE TRUE
FALSE TRUE TRUE
X XOR Y
FALSE FALSE FALSE
TRUE TRUE TRUE
TRUE FALSE FALSE
FALSE TRUE FALSE
X EQV Y
FALSE FALSE TRUE
1.4
Data Blocks
A data block is a table or matrix represented by a symbolic name. All data blocks are comprised of records. Each record can contain a variable number of words.
The first record ("Record 0") is called the header record, of which the first two words (when concatenated) form the name of the data block. The third and subsequent words are not usually used.
The subsequent records are sometimes called "data records." For tables, the data record can contain a mixture of any type of data; for example, real, integer, complex, character, and so on. For matrices, the data record corresponds to the nonzero values in the column of the matrix; for example, record 3 corresponds to the nonzero values in column 3.
The last record is called the trailer record and contains summary information about the table or matrix.
Table trailers
In tables, the trailer record contains six words. The contents vary among the tables and are described in“Data Blocks”at the end of the table’s description. Table trailers are printed when DIAG 15 is specified in the Executive Control or DIAGON(15) is specified in the DMAP sequence.
Matrix trailers
In matrices, the characteristics of a matrix are described in a twelve-word matrix trailer. Matrix trailers are printed when DIAG 8 is present in the Executive Control Section DIAGON(8) or is specified in the DMAP sequence. The contents of a matrix trailer are as follows:
Word Contents
1 Number of columns in matrix
Word Contents
3 Form of the matrix
4 Type of matrix
5 Largest number of nonzero words among all columns
6 Density of the matrix multiplied by 10000
7 Size in blocks
8 Maximum string length over all strings
9 Number of strings
10 Average bandwidth
11 Maximum bandwidth
12 Number of null columns
Form is defined as one of the following:
Form Meaning
1 Square
2 Rectangular
3 Diagonal
4 Lower triangular factor
5 Upper triangular factor
6 Symmetric
8 Identity
9 Pseudo identity
10 Cholesky factor
11 Trapezoidal factor
13 Sparse lower triangular factor
15 Sparse upper triangular factor
Type Meaning
1 Real, single precision
2 Real, double precision
3 Complex, single precision
4 Complex, double precision
Data Block Type and Status
The data block type depends on whether the data block is stored on a permanent or scratch DBset and whether its name appears on a TYPE DB statement. A DBset is a physical file that is a subdivision of the database (see the NX Nastran User’s Guide).
There are three types of DMAP data blocks:
Permanent NDDL Referenced on a TYPE DB statement and assigned to a permanent
DBset through the NDDL
Scratch NDDL Referenced on a TYPE DB statement and assigned to the SCRATCH
DBset through the NDDL
Local Not referenced on a TYPE DB statement and automatically assigned
to the SCRATCH DBset.
At any point during a DMAP execution a data block is in one of the three following states:
Generated The data block has been created
Not generated The data block has been deleted or is not yet created
Empty The data block has been created but has no data (or purged). In
other words, the name of the data block is stored on a permanent DBset without any associated data.
Permanent blocks can have all states: generated, not generated, and empty. Empty data blocks are created when a module is executed, but no data is actually generated for the data block. For example, the ADD module has two inputs; if both inputs do not exist (not generated), the output is empty or purged. Empty data blocks are required to support automatic restarts. A permanent data block can be explicitly purged with the PURGEX statement. Permanent data blocks can be deleted from the database with the DELETE statement.
Scratch data blocks can have only two states: generated and not generated. These data blocks can be deleted with the DELETE or PURGEX statements.
1.5
Instructions
A DMAP instruction can be classified as either a module or a statement. A module is similar to a "macro" function and, in general, processes data blocks as input and/or output. A module
can also have parameters as input and/or output. A statement is any instruction that is not a module and that does not operate on data blocks.
Modules
A module instruction has the following form: the name of the module followed by a comma [,] and a list of input data block names separated by commas, a slash [/], a list of output data block names separated by commas, a slash, and a list of parameter (variable names or constants) separated by slashes:
module_name , input_data_block_list / output_data_block_list / parameter_list $
The dollar sign [$] is required to terminate the module instruction. The modules are described in
“Descriptions of DMAP Modules and Statements”. Most modules have a prescribed number of inputs, outputs, and parameters, which are defined in the Module Property List (MPL). The MPL is an internal NX Nastran table that prescribes the exact format of all modules; the number of input and output data block lists and the number, type, and default of the parameters in the parameter list. The MPL can be listed by specifying DIAG 31 in the Executive Control Section. The position of the data block and parameter names is critical to the proper execution of the module.
Below is an example using the MPYAD module, which performs the following matrix operation: [D] = SIGNAB*[A][B] + SIGNC*[C]
or
[D] = SIGNAB*[A]T[B] + SIGNC*[C]
where [A], [B], [C] and [D] represent matrices, and SIGNAB and SIGNC represent the sign to be applied to the product and additive matrices, respectively.
The format of the MPYAD module is:
MPYAD , A , B , C / D / T / SIGNAB / SIGNC / PREC / FORM $
where A, B, and C, represent the input data block names, D represents the output data block name, and T, SIGNAB, SIGNC, PREC, and FORM represent the parameter names.
The MPL listing for the MPYAD and PARAML modules appears below:
The MPL listing contains useful information under the following column headers:
Header Description
MOD-NAME Module name
IN Number of input data blocks
OUT Number of output data blocks
ID Parameter position
TYP type of parameter:
INT - integer
RSP - real single precision RDP - real double precision CSP - complex single precision CDP - complex double precision BCD - character
LOG - logical
DEFAULT Default value of parameter
The other column headers are less important to the DMAP programmer.
Some or all data blocks and parameters can be left unspecified (or purged), according to the module description in“Descriptions of DMAP Modules and Statements”. If a parameter is unspecified, the default value is assumed and obtained from the MPL. For example,
MPYAD A , B , / D $
According to the MPYAD module description, if C is unspecified, only the matrix multiplication of A and B is performed. Also, by default, T=0 and therefore A is not transposed. SIGNAB and SIGNC parameters are defaulted to 1 resulting in:
[D] = [A][B]
However, if no default is defined in the MPL, a constant or variable parameter must be specified for the first parameter. For example,
NO DEFAULT
--on the PARAML module indicates that there is no default value for the first parameter.
The first comma after the module name can be omitted as long as the first input data block name is specified. For example, the ELTPRT module has the following format:
ELTPRT ECT,GPECT,BGPDT,UNUSED4,EST,CSTM,MPT,DIT,CASECC/ VELEM/PROUT/S,N,ERROR $
To obtain a printout of the elements connected to each grid point, only GPECT and BGPDTS need to be specified. However, a comma must also be specified after the module name:
ELTPRT , ,GPECT,BGPDTS,,,,,,/ $
In addition, trailing commas can be left unspecified:
ELTPRT , ,GPECT,BGPDTS,,,,,,/ $
Parameters can be specified on a module as: • Input only
• Input and output
• Output only
Each module has its own rules for parameter specification, as described in“Descriptions of DMAP Modules and Statements”. If a parameter is specified as input, either a constant or variable can be specified. Note that character strings or variables specified for parameters are limited to eight characters in length.
For example, the first parameter of the ADD module specifies a scalar multiplier of 1+2i on the first input matrix:
ADD A , B / C / (1.,2.) $
or ALPHA:
ADD A , B / C / ALPHA $
If a parameter is to be used as both input and output, or output only, a variable name must be specified and preceded by S, N. For example, on the PARAML module, the fourth parameter, TERM, is an output parameter:
PARAML A // ’DMI’ / 4 / 7 / S, N, TERM $
TERM is the value of matrix A at column 4 and row 7, which is returned by the PARAM module for later use in the DMAP program. If the S,N prefix is omitted, TERM is assumed to be input only, no fatal message is issued, and the TERM value is incorrect.
Statements
A statement is any instruction that is not a module and that typically does not produce output data blocks from input data blocks or parameters. Another distinction is that a statement has no definition in the MPL (Module Property List). The different types of statements are:
• Assignment (=) • Function • Control • Declarative • Database Function Assignment Statement
The assignment statement evaluates an expression and assigns the resulting value to a variable parameter. This statement has the following form:
v = e $
where v is a variable parameter name, and e is an expression. The dollar sign [$] is required to terminate the statement. Assignment statements are arithmetic, logical, or character, depending on the type of the variable parameter. The type of the variable and the expression must be the same. In other words, no mixed mode specification is allowed.
Type conversions can be performed with the INT, REAL, CMPLX, ITOL, and LTOI DMAP functions.
For character assignment statements, if the length of the expression does not match the size of the variable, the expression is adjusted as follows:
• If the expression is shorter than the variable, the expression is padded with enough blanks on the right before the assignment takes place to make the sizes equal.
• If the expression is longer than the variable, characters on the right are truncated to make the sizes the same.
Function Statement
Functions can appear only within an arithmetic or logical expression; they cannot be referenced within module or CALL statements. Execution of the function causes the evaluation of the function and returns a value to the referencing expression. Some functions, however, can appear as a DMAP statement without appearing in an arithmetic or logical expression. These functions are DIAGON, DIAGOFF, NOOP, PUTSYS, PUTDIAG, RDIAGOFF, and RDIAGON.
The type of the value returned from a function is dependent on the type of the argument(s) supplied, in addition to the functional operation. In general, the precision (single, double) and form (integer, real, complex) of the result returned by the function carries at least as much information as the arguments supplied. For example, ACOS(X) is typed as follows:
X ACOS(X) I RS RS RS RD RD CS CS CD CD
Returned values for character functions can be processor dependent.
The following table shows the complete function library. The abbreviations in the far right column signify types:
Abbreviation Type
I Integer
R, RS, or RD Real
Abbreviation Type
A Character
L Logical
Format Definition Result Argument type to result type
ABS(x) absolute value |x| if x is I or
R ,
if x = a + ib
I to IR and C to R
arccosine cos−1(x) where −1 ≤ x ≤ 1, if x is
I or R
I and R to CC to C ACOS(x)
The result is computed in radians.
hyperbolic arccosine cosh−1(x)x ≥ 1 I and R to RC to C
ACOSH(x)
For real and integer arguments, values less than 1 result in errors. ANDL(x, y) numeric AND TRUE if x< 0 and y< 0
FALSE otherwise
I, R, and C to L arcsin sin−1(x) where−1 ≤ x ≤ 1, if x is I
or R
I and R to RC to C ASIN(x)
The result is computed in radians.
ASINH(x) hyperbolic sine sinh−1(x) I and R to RC to C
arctangent tan−1(x) I and R to RC to C
ATAN(x)
The result is computed in radians. arctangent of
quotient
tan−1(x1/x2) I and R to RC to C
ATAN2(x1, x2)
If both arguments are zero, the result is zero. If x1 and x2 are real and:
x1 = 0 and x2 > 0, the result is 0.x1 = 0 and x2 < 0, the result is π.x1 > 0 and x2 = 0, the result is
π/2.x1 < 0 and x2 = 0, the result is −π/2.
If x1 and x2 are complex (x1 = a + bi and x2 = b + di) and:
a = b = 0 and (sign of c) = (sign of d), the result is 0.a = b = 0 and (sign of c) ≠ (sign of d), the
result is π.
(sign of a) = (sign of b) and c = d = 0, the result is π/2. (sign of a) ≠ (sign of b) and c = d = 0, the result is −π/2. ATANH(x) hyperbolic
arctangent
tan−1(x) where −1 ≤ x≤ 1, if x is I
or R
Format Definition Result Argument type to result type hyperbolic arctangent of quotient tan−1(x1, x2) I and R to RC to C ATANH2(x1, x2)
For real arguments, the following must be true: |x1| > |x2| and x2 ≠ 0. If x1 and x2 are complex (x1 = a + bi and x2 = b + di) and:
a = b = 0 and (sign of c) = (sign of d), the result is 0.a = b = 0 and (sign of c) ≠ (sign of d), the
result is π.
(sign of a) = (sign of b) and c = d = 0, the result is π/2. (sign of a) ≠ (sign of b) and c = d = 0, the result is −π/2.
character value See note below. I to A CHAR(x)
The function takes the processor collating sequence equivalent (for example, ASCII or EBCDIC) of a character and converts it to the character value. The integer value must be within the range 1 to n − 1, where n = 2(number of bits per character).
CLEN(c) character length Character string length in multiples of 4.
A to I CLOCK( ) CPU time in sec.
since job started
I convert to complex a + ib x, if complex x + i 0, otherwise See below CMPLX(a, b) CMPLX(x)
For real arguments, if one value is specified, the result is (value, 0). The precision of the complex number is dependent on the precision of the argument; for example, integer and real single values create complex single results, and real double values create complex double results. For complex arguments only one value can be specified. The result is the value and type of the argument.
Integer, real single, and real double values are allowed with two arguments only. The results are complex double if either or both arguments are real double. The results are complex single if neither argument is real double.
CONCAT1(a1, a2) full word concatenation
a1 & a2 A to A
concatenation a1 & a2 A to A CONCAT2(a1, a2)
Any trailing blanks of a1 are compressed to a single blank before a2 is concatenated. concatenation a1 & a2 A to A
CONCAT3(a1, a2)
The result is argument 1, with trailing blanks removed and argument 2 concatenated together. CONJG (x) complexconjugate a − ib is conjugate to a + ib C to C
Format Definition Result Argument type to result type
cosine cos(x) I,R to R, C to C COS(x)
The angle must be in radians.
hyperbolic cosine cosh(x) I,R to R, C to C COSH(x)
The angle must be in radians. convert to double
precision
I to RD, R to RDC to CD DBLE(x)
Integer and real single values are converted to real double values. Real double values are not changed.
Complex single values are converted to complex double values Complex double values are not changed.
DIAGOFF(x1, ..) turn off DIAG TRUE if 0 < x1...xn<65 FALSE otherwise
I to L DIAGON(x1, ..) turn on DIAG TRUE if 0 < x1...xn<65
FALSE otherwise
I to L
positive difference x1 - MIN(x1,x2) I to I, R to RC not allowed DIM(x1, x2)
Mixed arguments are allowed, but function result depends solely on type of first argument. The second argument is converted to the type of the first argument prior to application of the function. DLABLANK(x) remove all blanks
(collapse string)
’AB’ = DLABLANK(’A B’) A to A DLXBLANK(x) replace multiple
blanks with blank (compress string)
’AB’ = DLXBLANK(’A B’) A to A
double product x1 * x2 I to RD, R to RDC to CD DPROD(x1,x2)
Mixed arguments are allowed. The result is complex double, if either or both arguments are complex single. If neither argument is complex single, the result is real double.
numeric equivalence
I,R,C to L EQVL(x,y)
The result is TRUE if both arguments are negative, zero, or positive. FALSE otherwise. EXP(x) exponential ex I,R to R, C to C
get DIAG cell I to I GETDIAG(x)
Format Definition Result Argument type to result type
get value of SYSTEM cell y
I to I GETSYS(x,y)
The value extracted has the same type (I, RS, RD ...) as x. The value x must be a variable parameter.
In order to obtain the value for later use in the DMAP, specify x = GETSYS(x,y). See“PUTSYS, GETSYS”.
return integer value ASCII code A to I ICHAR(x)
The function returns the ASCII code of the character argument. Integer returned I < 2(number of bits per character).
imaginary part b, for x = a + ib I,R,C to R IMAG(x)
For integer arguments, the result is zero. Results are single precision real.
For real arguments, the result is zero. The resulting precision is the same as the argument. For complex numbers, the result is the imaginary component, with precision equal to that of the argument.
numeric implication I,R,C to L IMPL(x,y)
The result is FALSE if the first argument is negative and the second is positive or zero. The result is TRUE otherwise.
start position of a2 in a1
2 = INDEX(’ABC’,’B’) A to I INDEX(a1, a2)
The result is zero if the second string is not found in the first string. start position of a2
from x1 to x2 in a1
A,I to I INDEXSTR (a1,a2,x1,x2)
Arguments 1 and 2 must be character strings.
Arguments 3 and 4 must be numeric values. Prior to use as substring subscripts, both arguments are converted to integers and checked for range of 1 to 80.
If the lower string subscript is less than 1, it is changed to 1. If the upper string subscript is greater than 80, it is changed to 80.
The larger string subscript value becomes the upper substring subscript.
The result is zero if the second string is not found in the substring of the first string. type to I largest integer in abs(x) with sign
of x
I,R,C to I INT(x)
For complex arguments the function is applied to the real component. ITOL(x) type to L TRUE, if x < 0
FALSE, if x ≥ 0
I,R to L LEQ(a1, a2) lexical equality TRUE, if a1 = a2
FALSE otherwise
Format Definition Result Argument type to result type
LGE(a1, a2) lexical greater than or equal to
TRUE, if a1 ≥ a2 FALSE, if a1 < a2
A to L LGT(a1, a2) lexical greater than TRUE, if a1 > a2
FALSE, if a1 ≤ a2
A to L LLE(a1,a2) lexical lessthan or
equal
TRUE, if a1 ≤ a2 FALSE otherwise
A to L LLT(a1, a2) lexical lessthan TRUE, if a1 ≤ a2
FALSE otherwise
A to L lexical notequal to TRUE, if a1 ≠ a2
FALSE otherwise
A to L LNE(a1, a2)
Both arguments must be character strings. For arguments of the same length, the results are TRUE if the strings satisfy the lexical comparison, and FALSE otherwise.
For strings of different lengths, the shorter string is padded with blanks on the right to the same size. The strings are then compared as equal length strings.
natural logarithm loge(x) I,R to R, C to C LOG(x)
For integer and real arguments, values less than or equal to 0 result in errors. For complex arguments the value of (0.,0.) results in an error.
Common logarithm log10(x) I,R to R, C to C
LOG10(x)
For integer and real arguments, values less than or equal to 0 result in errors. For complex arguments the value of (0.,0.) results in an error.
base x logarithm log1(x2) I,R to R C to C
LOGX(x1, x2)
The first argument is the base of the logarithm.
The second argument is the number for which the logarithm must be determined.
If the first argument is negative or 0, natural logarithms are assumed. If the first argument is 1, common logarithms are assumed. If the first argument is positive and not equal to 1, this value is used as the logarithm base.
LTOI(x) type to I –1, if x is TRUE+1, if x is FALSE L to I MODCOM get I output MCGETSYS(x,y)
The value of y ranges from 1 to 10.
Returns the value of system cell 70 + y. The command is similar in operation to GETSYS(x,70 + y). MODCOM put I output
MCPUTSYS(x,y)
The value of y ranges from 1 to 10.
Format Definition Result Argument type to result type
choosing the largest argument
max(x1,x2,...) I to I, R to R MAX( 1,x2,...)
The argument list must have at least two arguments and can have up to the system limit (100) of arguments.
Mixed argument types are allowed. Complex argument types are not allowed.
The results are integer if all arguments are integer, real single if at least one argument is real single and no arguments are real double, and real double if at least one argument is real double. choosing the
smallest
min(x1,x2,...) I to I, R to R MIN( 1,x2,...)
The argument list must have at least two arguments and can have up to the system limit (100) of arguments.
Mixed argument types are allowed. Complex argument types not allowed.
The results are integer if all arguments are integer, real single if at least one argument is real single and no arguments are real double, and real double if at least one argument is real double. remainder (x1 − x2) * INT(x1/x2) I to I, R to R
MOD(x1,x2)
The results are integer only if both arguments are integer, real single if at least one argument is real single and neither argument is real double, and real double if at least one argument is real double.
x2 must not be equal to 0.
numeric nonequivalence
I,R,C to L NEQVL(X,Y)
The result is TRUE if the signs of the arguments are different, FALSE otherwise. type to I with Round-off INT(x + 0.5), if x ≥ 0INT(x − 0.5), if x < 0 I,R,C to I NINT(x)
For complex arguments the function is applied to the real component.
NOOP() no-operation returns TRUE logical output no input NORMAL(x) normalize
if x = a + bi
C to R
NOTL(x) numeric not FALSE if x < 0 TRUE otherwise
I,R,C to L NUMEQ(x1,x2) equality TRUE, if x1 = x2
FALSE otherwise
I,R,C to L NUMGE(x1,x2) greater than or
equal to
TRUE if x1 ≥ x2 FALSE, if x1 < x2
Format Definition Result Argument type to result type
NUMGT(x1,x2) greater than TRUE, if x1 > x2 FALSE, if x1 ≤ x2
I,R,C to L NUMLE(x1,x2) less than or equal to TRUE if x1 ≤ x2
FALSE otherwise
I,R,C to L NUMLT(x1,x2) less than TRUE, if x1 < x2
FALSE otherwise
I,R,C to L NUMNE(x1,x2) not equal to TRUE, if x1 ≠ x2
FALSE otherwise
I,R,C to L ORL(x1,x2) numeric or TRUE, if x1 <0 or x2 < 0
FALSE otherwise
I,R,C to L multiples of pi xπ I,R to R, C to C PI(x)
Complex arguments of (a,b) form return aπ, bπ results. current analysis
precision
integer output PRECISON()
The function returns the currently requested precision: 1, single precision, 2, double precision. put x into DlAG cell
y
I to I PUTDIAG(x,y)
The function deposits the value x into DIAG cell y, where y = 1 or 2. See“PUTDIAG, GETDIAG”.
modify system cell put x into system cell y I to I PUTSYS(x,y)
The function deposits the value x into system cell y. PUTSYS returns the value x on completion. See“PUTSYS, GETSYS”.
random number generator
x = seed if x>0. Use last RAND(x)
as seed if x=0. If x<0 use wall clock as seed.
I,R to R RAND(x)
Result precision determined by argument precision. Real double arguments return real double results. Integer and real single arguments return real single results.
If the argument is greater than 0, calculate new random seed value, based on this value, before generating random number. Provides reproducible random sequence.
If the argument equals 0, generate new random number from last random number generated. If the argument is less than 0, calculate new random seed value, based on this value and current wall clock time, before generating random number. Provides non-reproducible random sequence.
Format Definition Result Argument type to result type
turns on DIAGover range x to y
TRUE if x>0, and y<65 FALSE otherwise
I to L RDIAGON(x,y)
The function turns on the DIAGs within the range x,y. The value of TRUE is returned if the operation was successful.
Type to R real(x)a, if x=a+ib I,R to R, C to R REAL(x)
Integer, real single, and complex single arguments return real single values. Real double and complex double arguments return real double values. Complex arguments return the real component.
remaining CPU time
returns R RTIMTOGO()
Returns the CPU time remaining to the nearest hundredth of a second. Time remaining is found by subtracting the current CPU time from the value on the TIME execution control statement. SETCORE(x) set core Initialize all words in memory to
the value x
I,RS,L transfer of sign |x1|, if x2 > 0−|x1|, if x2 < 0 I to I, R to R SIGN(x1,x2)
Resultant type determined by first argument.
sine sin(x) I,R to R, C to C SIN(x)
The angles are given in radians.
hyperbolic sine sinh(x) I,R to R, C to C SINH(x)
The angles are given in radians.
SNGL(x) convert to single I,R to RS, C to CS single prec product x1 * x2 RD to RS, CD to CS SPROD(x1,x2)
The results are real single if both arguments are real double and complex single if at least one of the arguments is complex double.
square root I,R to R, C to C SQRT(x)
If the value of integer or real arguments is less than 0, an error results.
For complex arguments the principal square root is returned. That is, the first component is always greater than or equal to 0.
substring SUBSTRIN (¢ABC¢, 2, 3) ® ¢BC¢ x1,x2 can be I, R or C
SUBSTRIN(A,x1,x2)
Return substring of first argument with length of ABS(x2-x1)+1.
Arguments 2 and 3 must be numeric values. Prior to use as substring subscripts, both arguments are converted to integers and checked for range of 1 to 80. If the lower string subscript is less than 1, it is changed to 1. If the upper string subscript is greater than 80, it is changed to 80. The larger string subscript value becomes the upper substring subscript.
Format Definition Result Argument type to result type
TAN(x) tangent tan(x) I,R to R, C to C TANH(x) hyperbolic tangent tanh(x) I,R to R, C to C
remaining CPU Time
returns I TIMETOGO()
Returns the remaining CPU time in integer seconds. Time remaining is found by subtracting the current CPU time from the value on the TIME executive control statement.
VPS word length Returns VPS word length of argument
A,I,R,C,L to I WLEN(x)
Returns VPS word length of argument. Constant for all types, except character data that ranges from 1-20.
XORL(x1,x2) numeric exclusive OR
TRUE, if x1 or x2 < 0 FALSE otherwise
I,R,C to L
PUTDIAG, GETDIAG
In the PUTDIAG and GETDIAG examples below, DVALUE is an integer whose 32 bits from left to right represent 32 DIAG values.
DVALUE=GETDIAG(DWORD) $ PUTDIAG(DVALUE,DWORD) $
DWORD=1 represents the 1st through 32nd DIAG settings and DWORD=2, the 33rd through 64th DIAG settings. GETDIAG and PUTDIAG are best used in pairs. For example, to turn on DIAG 8 temporarily and restore the original DIAG 8 setting, the following sequence can be used:
TYPE PARM,,I,,DIAG32 $ DIAG32=GETDIAG(1) $
DIAGON(8) $ DIAG 8 WILL BE ON HERE REGARDLESS OF SETTING IN $ EXEC. CONTROL
. . .
PUTDIAG(DIAG32,1) $ RESTORE DIAGs TO THEIR ORIGINAL VALUE
PUTSYS, GETSYS
System cell values can be set and recovered via the PUTSYS and GETSYS DMAP functions. See “nastran Command and NASTRAN Statement” in the NX Nastran Quick Reference Guide for a description of various system cells. System cells 253 through 262 are reserved for the DMAP writer. This permits the DMAP writer to pass parameter values in via the NASTRAN statement or between subDMAPs.
For example, NASTRAN SYSTEM(253)=4 SOL MYDMAP COMPILE MYDMAP SUBDMAP MYDMAP $ TYPE PARM,,I,N,NP $ . . .
IF ( GETSYS(NP,253)<>4 ) THEN $ . . . ENDIF $ Control Statement
The NX Nastran DMAP language contains control statements that perform conditional branching and looping similar to those found in the FORTRAN programming language. The control statements are:
Conditional Execution IF
Unconditional Branching JUMP and LABEL
Conditional Branching IF()THEN, ELSE IF()THEN, ELSE, and ENDIF
Looping DO WHILE and ENDDO
Calling SubDMAP Operations
SUBDMAP, CALL, and RETURN
Termination EXIT and END
Conditional Execution—IF Statement
The IF statement conditionally executes a single DMAP instruction:
IF ( logical expression ) instruction $
In other words, if the logical expression is true, the instruction is executed. Instruction is any DMAP module or statement, except a control statement or the FILE, DBVIEW, TYPE and SUBDMAP statements. Examples include:
IF ( NOGOA=-1 ) ADD GOAT,GOAQ/GOA $ IF ( ERRFLAG<0 ) CALL ERROR //S,GO/ERROR $ IF ( A AND B ) X=2*Y $
Unconditional Branching—JUMP and LABEL Statements
The JUMP and LABEL statements are analogous to the GO TO and CONTINUE statements in FORTRAN, except the LABEL statement cannot appear above the JUMP statement. For example, JUMP n $ . . . LABEL n $
where n is character string, up to eight alphanumeric characters in length, and the first character must be alphabetic.
JUMP and LABEL can be used to jump out of a DO WHILE loop or IF()THEN block, but JUMP and LABEL cannot be used to jump into a DO WHILE loop or IF()THEN block.
JUMP can appear on an IF statement; however, in this case, Siemens PLM Software recommends using an IF()THEN statement.
Conditional Branching—IF ( ) THEN Statement
The IF ( ) THEN operation has the following form: 1. IF(expression)THEN $
.
. DMAP executed if expression is TRUE .
ENDIF $
2. IF(expression)THEN $ .
. DMAP executed if expression is TRUE .
ELSE $ .
. DMAP executed if expression is FALSE .
ENDIF $
3. IF(expression 1)THEN $ .
. DMAP executed if expression 1 is TRUE .
ELSE IF(expression 2)THEN $ .
. DMAP executed if expression 1 is FALSE . and expression 2 is TRUE
ELSE IF(expression n)THEN $ .
. DMAP executed if expression 1 through expression . n-1 are FALSE and expression n is TRUE
ELSE $ .
. DMAP executed if expression 1 through expression . n are FALSE
ENDIF $
The expressions in the above examples are relational and/or logical operations that result in a logical output of either TRUE or FALSE. The allowable relational operators are discussed in
Looping—DO WHILE ( ) Statement DO WHILE(expression) $ . . . ENDDO $
The expression in the above example is a relational and/or logical operation that results in a logical output of either TRUE or FALSE. The allowable relational and logical operators are discussed in“Expressions and Operators”. There is no limit to the allowable number of DO WHILE statements.
Scratch NDDL and local blocks which are first referenced and created inside a DO WHILE loop are automatically deleted at the end of the loop. The FILE statement with the APPEND or SAVE keyword can be specified to override the automatic deletion in order to "save" a scratch data block for subsequent passes through the DO WHILE loop. See the APPEND and FILE statement descriptions in“DMAP Modules and Statements”for examples.
Calling SubDMAP Operations—SUBDMAP, CALL, and RETURN Statements
The CALL and SUBDMAP statements allow for the definition of DMAP subprograms called subDMAPs. The RETURN statement can be used in a subDMAP to return to the calling subDMAP.
The SUBDMAP statement denotes the beginning of a DMAP subprogram; either a main subDMAP or a called subDMAP. A main subDMAP can be invoked with the SOL Executive Control statement and cannot have any arguments. A called subDMAP can or cannot have arguments and is invoked by a CALL statement in another subDMAP, defined as the calling subDMAP.
The form of the SUBDMAP and CALL statements are:
SUBDMAP subDMAP-name [I1,I2,I3,.../ O1,O2,O3,.../ P1/P2/P3/... $]
CALL subDMAP-name [I1,I2,I3,.../ O1,O2,O3,.../
[S,]P1/[S,]P2/[S,]P3/...] $
where subDMAP-name is the name of a subDMAP. The arguments Ii, Oi, and Pi are the list of input data block names, output data block names, and variable parameter names or constant parameters. The specification of arguments is optional. If arguments are specified, the CALL and SUBDMAP statements must agree in order, in number, and, for parameters only, in type. The linker checks for correspondence of the arguments. The linker also checks for consistent parameter authorization if NASTRAN SYSTEM(147)=1. In addition, a view-name defined by the DBVIEW statement cannot be specified in the argument list.
If an argument list is specified on the SUBDMAP statement, no argument can be left unspecified. Also, all parameter arguments must be variable parameter names. Any data block argument on the CALL statement can be left unspecified. Inside the called subDMAP, the data block argument is treated as purged. All parameters must be specified on the CALL statement, but the parameters can be either a variable parameter name or a constant value. Also on the CALL statement, parameter values, such as qualifiers or local parameters (which are computed in the called subDMAP), can be returned to calling subDMAP by preceding the parameter name with
"S,". This method is called the save option. The save option is not required for parameters specified on TYPE PARM,NDDL statements in the called subDMAP.
The RETURN statement can be specified anywhere in the subDMAP. This statement terminates execution of the current subDMAP and resumes execution of the calling subDMAP. If the RETURN statement is not specified in the subDMAP, all DMAP execution is terminated at the END statement (discussed in the next section).
Below is an example using the SUBDMAP, CALL, and RETURN statements. The main subDMAP is called MAIN and contains two calls to subDMAP TEST. In the first CALL to subDMAP TEST, the second input and output data blocks are marked as ",," and are not generated. The value of Q1 is returned as computed in TEST. In both CALL statements, the value of P2 is returned from TEST. Although Q3 can have changed in subDMAP TEST, Q3’s value is not returned to MAIN. In the second call a constant value of 0 is specified for P1.
SUBDMAP MAIN $ Main SUBDMAP TYPE PARM,,I,N,Q1=5 $
TYPE PARM,,I,N,P1,P2,P3,Q3 $ .
. .
CALL TEST A,,C/D,,F/P1/S,P2/S,Q1 $ .
. .
CALL TEST A,B,C/I,J,K/0/S,P2/Q3 $ .
. . END $
SUBDMAP TEST X,Y,Z/L,M,N/A1/A2/A3 $ TYPE PARM,,I,Y,A3 $ TYPE PARM,,I,N,A1,A2 $ . . . RETURN $ END $
The following should also be noted:
• The data block names specified on the SUBDMAP statement argument list are called local names and do not appear in any diagnostic output. Diagnostic output, such as data base directory print or DIAG 8, indicates only the top-level name. The top-level name is the name of the data block in the highest CALL statement in which it appears. In the example above, the local names are X, Y, Z, and so on, and the top-level names are A, B, C, and so on. • All input data blocks specified on a CALL statement must have been previously defined
by output from a module in the calling subDMAP or from a previously specified CALL statement, or specified on TYPE DB statements. See the“TYPE”statement.
• Recursive subDMAP calls are allowed; for example, a subDMAP can call itself either directly or indirectly.
Termination—EXIT and END statements
Both EXIT and END statements terminate the DMAP execution. However, the EXIT statement can be specified at any time in a subDMAP, and the END statement can be specified only once and must appear at the end of a subDMAP.
The following example demonstrates the use of both statements:
SUBDMAP AAA $ .
. (some DMAP instructions) .
IF(ERROR)EXIT$ .
. (some DMAP instructions) .
END $
If ERROR is true, the EXIT statement is used to terminate the subDMAP. The END statement is required and must be the last statement in the subDMAP.
Declarative Statement
The declarative statements are TYPE, DBVIEW, and FILE. See“DMAP Modules and Statements”for a description, and“Output from a Previous Module Rule”and“Automatic Deletion of Scratch Data Blocks”for related discussion.
Data Base Function Statement
The data base function statements are DBEQUIV and DBDELETE. See“DMAP Modules and Statements”for a description.
1.6
Output from a Previous Module Rule
If a data block has already been specified as output by a previous module and is specified as output from another module, User Fatal Message 1126 is issued during execution. This principle is called the “output from a previous module” or “output twice” rule. This rule is waived if any of the following is true:
• The data block is specified on a FILE statement with the APPEND or OVRWRT keyword. • The data block is TYPE’d (specified on a TYPE DB statement), and its current qualifier values
are different from the qualifier values given at the time of the previous module execution. • The data block is specified as output on a CALL statement and TYPE’d.
1.7
Automatic Deletion of Scratch Data Blocks
Scratch NDDL and local data blocks are stored on the SCRATCH DBset. A DBset is a physical file that is a subdivision of the database. To minimize the size of the SCRATCH DBset, module scratch files are automatically deleted upon completion of the module and DMAP scratch data blocks are automatically deleted after the DMAP instruction in which they are used last. The location of this DMAP instruction is called the last-time-used (LTU). An LTU is assigned to every data block. When the LTU of an Scratch NDDL data block is reached, the data block is deleted
if the current qualifier values match. If the data block’s LTU is skipped, the entire family is deleted, regardless of the current qualifier values.
Special rules apply for data blocks specified in the following situations:
• For a scratch data block specified before a loop and last used inside the loop, the LTU is extended to the bottom of the loop (for example, ENDDO), meaning that the data block is deleted when the loop is exited. If the data block is Scratch NDDL, the entire family is deleted, regardless of the current qualifier values.
• For a local data block created inside a DMAP loop and last used after the loop, the data block is deleted after the next execution of the top of the loop, for example, DO WHILE, even though the data block’s LTU is located after the loop (for example, when the loop is exited). Thus, the last generated data block can be used after the loop exits.
• For a scratch data block created and last used inside a DMAP loop, the FILE statement with the SAVE keyword extends the data block’s original LTU to the bottom of the loop. Otherwise, the data block is deleted at the original LTU within the loop.
• For a Scratch NDDL data block used in a DBVIEW statement, the data block is deleted at the LTU of the view name or the data block name, whichever is last.
DlAG 57 prints the LTU information of all data blocks and a message indicating when they are deleted.
1.8
Preface Modules and SOLution 100
The preface modules IFP1, XSORT, IFPi, DTIIN, and DMIIN generate data blocks related to the Case Control, Bulk Data, and DMI or DTI entries. These modules are specified at the beginning of all solution sequences.
SOLution 100 is also provided for the DMAP writer who wishes to execute his/her DMAP sequences without having to specify the Preface modules IFP1, XSORT, and IFPi. The DMAP writer needs to insert the following DMAP statements in the Executive Control of the input data:
1. SOL 100
COMPILE USERDMAP ALTER 2
2. If matrices or tables are to be input with DMI or DTI Bulk Data entries, the DMIIN or DTIIN modules must be specified by the DMAP writer. For example, the following DMAP statements generate matrices A, B, C, D, and E and tables TA, TB, TC, TD, and TE:
DMIIN DMI,DMINDX/A,B,C,D,E,,,,,/ $ DMIIN DMI,DTINDX/TA,TB,TC,TD,TE,,,,,/ $
Data block names A, B, C, D, E, TA, TB, TC, TD, and TE can now be referenced in subsequent DMAP statements.
3. The DMAP writer’s DMAP sequence can now be inserted.
4. TYPE statements that reference data blocks or parameters defined in the NDDL of the structured solution sequences (SOLutions 101 through 200) can also be inserted.