<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>DEFINE</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <hr noshade="true">
      <div class="title_refTopic" id="xps10_pagetitle">DEFINE </div>
      <hr noshade="true">
      <h4 class="refClassification">Parameter Definition </h4>
      <p class="para_refTopic">Assigns user defined keywords (or cellnames) to NASTRAN system cells.  (See the NASTRAN statement for a description of &ldquo;cellname&rdquo;).  In addition, the DEFINE statement provides a mechanism to set default values for system cells. </p>
      <div class="title_refCategory">Format: </div>
      <div class="refCategoryContent">
         <p class="para_refCategory">DEFINE keyword [ =expression ] [ LOCATION=SYSTEM(i) ] [ TYPE=type ] </p>
      </div>
      <div class="title_refCategory">Describers:</div>
      <div class="refCategoryContent">
         <table cellpadding="10" width="100%" align="center">
            <colgroup span="1">
               <col span="1" width="23.05*">
               <col span="1" width="76.95*">
            </colgroup>
            <thead>
               <tr>
                  <th align="left" colspan="1" rowspan="1">
                     <p class="para_th"><b class="uiTerm">Describer </b></p>
                  </th>
                  <th align="left" colspan="1" rowspan="1">
                     <p class="para_th"><b class="uiTerm">Meaning </b></p>
                  </th>
               </tr>
            </thead>
            <tbody>
               <tr>
                  <td align="left" colspan="1" rowspan="1" valign="top">
                     <p class="para_td">keyword </p>
                  </td>
                  <td align="left" colspan="1" rowspan="1" valign="top">
                     <p class="para_td">User defined name, 1 through 24 characters in length.  The first character must be alphabetic. Only the following characters can be used for keywords:  A-Z, 0-9, &rsquo; , _ , and &ldquo;.  All other characters are invalid. </p>
                  </td>
               </tr>
               <tr>
                  <td align="left" colspan="1" rowspan="1" valign="top">
                     <p class="para_td">expression </p>
                  </td>
                  <td align="left" colspan="1" rowspan="1" valign="top">
                     <p class="para_td">Expression produces a single value from a set of constant and/or variable parameters separated by operators.  The value is assigned to the &ldquo;keyword&rdquo; and is also used to set the value for the NASTRAN system cell specified by &ldquo;LOCATION&rdquo;. The TYPE determines both the type of the result and the type conversions that will be applied to the constants and variables within the expression&mdash;mixed mode expressions are allowed (see Remark <a class="links" href="javascript:void(0)" onclick="top.openFile('QRG/03ref33329_20.html#reflOOvncblori');return(false);">31-6</a>).  The parentheses can be used to change the order of precedence.  Operations within parentheses are performed first with the usual order of precedence being maintained within the parentheses. The variable parameters within the expression must be keywords previously defined on a DEFINE statement. The following operations are allowed 
                     </p>
                  </td>
               </tr>
               <tr>
                  <td colspan="1" rowspan="1" valign="top"></td>
                  <td colspan="1" rowspan="1">
                     <table border="1" width="550" align="center">
                        <colgroup span="1">
                           <col span="1" width="28*">
                           <col align="center" span="1" width="15*">
                           <col span="1" width="51*">
                        </colgroup>
                        <thead>
                           <tr>
                              <th colspan="1" rowspan="1">
                                 <p class="para_th"><b class="uiTerm">Parameter Type </b></p>
                              </th>
                              <th colspan="1" rowspan="1">
                                 <p class="para_th"><b class="uiTerm">Operator </b></p>
                              </th>
                              <th colspan="1" rowspan="1">
                                 <p class="para_th"><b class="uiTerm">Operation </b></p>
                              </th>
                           </tr>
                        </thead>
                        <tbody>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Integer or Real </p>
                              </td>
                              <td colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">+ </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Addition </p>
                              </td>
                           </tr>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">&nbsp; </p>
                              </td>
                              <td colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">− </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Subtraction </p>
                              </td>
                           </tr>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">&nbsp; </p>
                              </td>
                              <td colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">× </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Multiplication </p>
                              </td>
                           </tr>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">&nbsp; </p>
                              </td>
                              <td colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">/ </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Division </p>
                              </td>
                           </tr>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Logical </p>
                              </td>
                              <td colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">+ </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Bit-wise OR </p>
                              </td>
                           </tr>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Logical </p>
                              </td>
                              <td colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">- </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Bit clear.  For example, the result of <em>a-b</em> is equal to the value of <em>a</em> with the bits associated with <em>b</em> set to 0. 
                                 </p>
                              </td>
                           </tr>
                        </tbody>
                     </table><br></td>
               </tr>
               <tr>
                  <td align="left" colspan="1" height="63" rowspan="1" valign="top">
                     <p class="para_td">SYSTEM(I) </p>
                  </td>
                  <td align="left" colspan="1" height="63" rowspan="1" valign="top">
                     <p class="para_td">Specifies the NASTRAN system cell number to be associated with the keyword. </p>
                  </td>
               </tr>
               <tr>
                  <td align="left" colspan="1" rowspan="1" valign="top">
                     <p class="para_td">type </p>
                  </td>
                  <td align="left" colspan="1" rowspan="1" valign="top">
                     <p class="para_td">The type of the expression result and the type conversions that will be applied to the constants and variables within the expression.  Allowable data types are as follows: </p>
                     <table border="1" width="451" align="center">
                        <colgroup span="1">
                           <col span="1" width="48*">
                           <col span="1" width="49*">
                        </colgroup>
                        <thead>
                           <tr>
                              <th colspan="1" rowspan="1">
                                 <p class="para_th"><b class="uiTerm">Description </b></p>
                              </th>
                              <th colspan="1" rowspan="1">
                                 <p class="para_th"><b class="uiTerm">Type </b></p>
                              </th>
                           </tr>
                        </thead>
                        <tbody>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Integer (default) </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">I </p>
                              </td>
                           </tr>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Real </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">R </p>
                              </td>
                           </tr>
                           <tr>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">Logical </p>
                              </td>
                              <td align="left" colspan="1" rowspan="1" valign="top">
                                 <p class="para_td">LOGICAL </p>
                              </td>
                           </tr>
                        </tbody>
                     </table><br></td>
               </tr>
            </tbody>
         </table><br></div>
      <div class="title_refCategory">Remarks: </div>
      <div class="refCategoryContent">
         <ol type="1" start="1">
            <li>
               <p class="para_item">If TYPE, LOCATION and EXPRESSION are omitted, the default data type is integer and the default value is zero. </p>
            </li>
            <li>
               <p class="para_item">If expression is omitted, an internal default will be assigned to the keyword/cellname based on the LOCATION. (See <a class="links" href="javascript:void(0)" onclick="top.openFile('QRG/02ref95657_4.html');return(false);">&ldquo;NASTRAN&rdquo;</a> for a list of internal default values). 
               </p>
            </li>
            <li>
               <p class="para_item">A DEFINE statement that specifies a LOCATION sets the default for a NASTRAN system cell and therefore it is not necessary to set the system cell value on a subsequent NASTRAN statement, unless the user wishes to override the previous DEFINE statement setting.  Also, since more than one DEFINE statement may be present for the same &ldquo;keyword&rdquo; the last specification takes precedence.  &ldquo;Keywords&rdquo; referenced on a NASTRAN statement or in an expression on the DEFINE statement are automatically substituted by the last specification of the &ldquo;keyword&rdquo; prior to the current statement being processed. </p>
            </li>
            <li>
               <p class="para_item">DEFINE statements may also be specified in Runtime Configuration (RC) files.  See the <a class="links" href="javascript:void(0)" onclick="top.popUpPage('cog/index.html?goto=cog/01topic_1.html&vars=-aux,-home','linkInter','menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,location=no,directories=no');return(false);"><em>NX Nastran Installation and Operations Guide.</em></a></p>
            </li>
            <li>
               <p class="para_item">System cells may also be set with the NASTRAN statement.  In addition, they may be set or values returned with the DMAP PUTSYS and GETSYS functions and the PARAM module.  See the <a class="links" href="javascript:void(0)" onclick="top.popUpPage('QRG/linkInter_target_not_resolved.html#dmap:dmap:-aux,-home','linkInter','menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,location=no,directories=no');return(false);"><em>NX Nastran DMAP Programmer&rsquo;s Guide </em></a></p>
            </li>
            <li><a name="reflOOvncblori"></a><p class="para_item">Each operand within the expression will be converted to the result type prior to the arithmetic operation.  For example: the statement &ldquo;DEFINE JJ=2.5 + 3.6  TYPE=I&rdquo; would result in 2.5 and 3.6 being converted to 2 and 3 respectively and the result of 5 would be assigned to JJ. </p>
            </li>
         </ol>
      </div>
      <div class="title_refCategory">Examples: </div>
      <div class="refCategoryContent">
         <ol type="1" start="1">
            <li>
               <p class="para_item">Change the default value for block size. </p><pre class="indent">DEFINE BUFFSIZE=4097  LOCATION=SYSTEM(1)</pre></li>
            <li>
               <p class="para_item">Set the sparse matrix selection to forward-backward substitution only. </p><pre class="indent">DEFINE SPARSE=16 LOCATION=SYSTEM(126)</pre></li>
            <li>
               <p class="para_item">Define the system cell keyword and default value for the maximum output line count and then reset it to another value on a NASTRAN statement.  Note: The DEFINE statement would typically be placed in an RC file and the NASTRAN statement would be placed in the File Management Section whenever the user wants to override the DEFINE statement default setting. </p>
               <table width="100%" align="center">
                  <colgroup span="1">
                     <col span="1" width="20.99*">
                     <col span="1" width="79.01*">
                  </colgroup>
                  <tbody>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">DEFINE</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">MAXLINES=999999999 LOCATION=SYSTEM(9)</pre></td>
                     </tr>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">NASTRAN</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">MAXLINES=100000</pre></td>
                     </tr>
                  </tbody>
               </table><br></li>
            <li>
               <p class="para_item">Define system cells that behave like &ldquo;toggles&rdquo;, turning some feature on or off. </p>
               <table width="655" align="center">
                  <colgroup span="1">
                     <col span="1" width="34*">
                     <col span="1" width="63*">
                  </colgroup>
                  <tbody>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">DEFINE</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">MESH=2 LOCATION=(31)</pre></td>
                     </tr>
                     <tr>
                        <td align="left" colspan="1" height="54" rowspan="1" valign="top"><pre class="indent">DEFINE</pre></td>
                        <td align="left" colspan="1" height="54" rowspan="1" valign="top"><pre class="indent">NOMESH=0 LOCATION=(31)</pre></td>
                     </tr>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">NASTRAN</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">MESH</pre></td>
                     </tr>
                  </tbody>
               </table><br><p class="para_item">Note: Since each subsequent DEFINE  statement redefines the default value, the second DEFINE of system cell location 31 sets the default value to 0.  A NASTRAN statement can then be inserted in the input file to reset the MESH system cell back to a value of 2.  This same technique can be used with any system cell where the user wishes to simply refer to the system cell keyword and have the system cell set to a previous DEFINE statement default. </p>
            </li>
            <li>
               <p class="para_item">Invalid usage of the DEFINE and NASTRAN statement: </p>
               <table width="100%" align="center">
                  <colgroup span="1">
                     <col span="1" width="27*">
                     <col span="1" width="70*">
                  </colgroup>
                  <tbody>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">DEFINE</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">BUFFSIZE=4097</pre></td>
                     </tr>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">NASTRAN</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">BUFFSIZE=2048</pre></td>
                     </tr>
                  </tbody>
               </table><br><p class="para_item">Valid usage: </p>
               <table width="100%" align="center">
                  <colgroup span="1">
                     <col span="1" width="23.36*">
                     <col span="1" width="76.64*">
                  </colgroup>
                  <tbody>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">DEFINE</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">BUFFSIZE=4097 LOCATION=SYSTEM(1)</pre></td>
                     </tr>
                     <tr>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">NASTRAN</pre></td>
                        <td align="left" colspan="1" rowspan="1" valign="top"><pre class="indent">BUFFSIZE=2048</pre></td>
                     </tr>
                  </tbody>
               </table><br></li>
         </ol>
      </div>
   </body>
</html>
