10.08.2013 Views

Code Manual for CONTAIN 2.0 - Federation of American Scientists

Code Manual for CONTAIN 2.0 - Federation of American Scientists

Code Manual for CONTAIN 2.0 - Federation of American Scientists

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A sub-block thus can begin with a leading keyword or variable and end with an EOI. It can begin<br />

with a leading keyword or variable and end with the leading keyword or variable to the next subblock;<br />

it can begin with an indentation without a leading keyword and end with an EOI. (The EOI ~<br />

is the only keyword at the level <strong>of</strong> the sub-block in the latter case.) From the above definitions, it<br />

follows that an EOI keyword, ifpresent, will always be written at the same level <strong>of</strong> indentation as<br />

the sub-block that it terminates. This consistent positioning <strong>of</strong> the EOI should be quite helpful in<br />

determining which sub-block is terminated by each EOI when multiple sub-block levels are present.<br />

With the above definitions, it is now possible to give the ordering requirements <strong>for</strong> sub-blocks: (1)<br />

A sub-block must be specified after the last keyword or leading variable that precedes it in the<br />

template and is at a higher level than the sub-block. Similarly, the sub-block must be specified<br />

be<strong>for</strong>e the next keyword or leading variable at a higher level. By induction, this rule constrains<br />

quantities within a sub-block to be specified in the order given, with exceptions only as allowed by<br />

the second rule. (2) However, within a contiguous group <strong>of</strong> sub-blocks at the same level, those subblocks<br />

may be specified in any order. A contiguous group <strong>of</strong> sub-blocks is defined as one that is not<br />

separated by a sub-block at a higher level. (It is not possible to have sub-blocks at a given level<br />

separated by a sub-block at a lower level because the sub-block at the lower level is by definition<br />

included in one <strong>of</strong> the higher level sub-blocks.) Since at the lowest level, individual non-EOI<br />

keywords and leading variables each represent a sub-block, the second rule implies that within a<br />

contiguous group <strong>of</strong> such items at the lowest level, those items can be specified in any order.<br />

Two examples <strong>of</strong> the template <strong>for</strong>mat are given below. The first is:<br />

***** ***** ***** ***** ***** ************************************************<br />

KEY n (const)<br />

[OPTION1] {OPTION2 or 0PTION3}<br />

EOI<br />

***** ***** ***** ***** ***** ************************************************<br />

where “n”is defined as the number <strong>of</strong> values <strong>of</strong> “const” to follow the keyword KEY and OPTION 1,<br />

0PTION2, and 0PTION3 are the three options associated with the KEY block. In this example,<br />

KEY, “n,” “const,” and EOI are considered to be at the fust level in the input hierarchy, and<br />

OPTION1, 0PTION2, and 0PTION3 are considered to be at the second level. The “n” and “const”<br />

variables are required to immediately follow KEY in the input because <strong>of</strong> the ordering requirement<br />

<strong>for</strong> variables following keywords. OPTION1 is truly optional, as indicated by its square brackets.<br />

However, one <strong>of</strong> OPTION2 or OPTION3 must be selected, as indicated by the curly brackets. The<br />

option keywords selected are required to follow KEY, the last keyword preceding them at a higher<br />

level in the input hierarchy, and to precede EOI, the next keyword following them at a higher level.<br />

However, they are not required to follow KEY immediately as are “n” and “const.” Since OPTION1,<br />

0PTION2, and 0PTION3 are each considered sub-blocks at the lower level, they are not restricted<br />

in the order in which they maybe specified with respect to each other. (However, the curly brackets<br />

indicate that only one <strong>of</strong> 0PTION2 or 0PTION3 can be specified.) The EOI terminates the subblock<br />

which begins at the same level <strong>of</strong> indentation as the EOI, in this case the sub-block beginning<br />

with KEY and not with OPTION 1. In the input one might thus specify<br />

Rev O 14-8 6/30/97

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

Saved successfully!

Ooh no, something went wrong!