A first group of iterators iterate on finite element entities of the finite element model stored in the DataBase.
“each_coordSysId” iterates on the integer identifiers of coordinate systems.
“each_elemId” iterates on the integer identifiers of elements.
“each_rbeId” iterates on the integer identifiers of rigid body elements.
“each_mpcId” iterates on the integer identifiers of MPC and MPCADD cards.
“each_propertyId” iterates on the integer identifiers of properties.
“each_materialId” iterates on the integer identifiers of materials.
The elements produced by the iterator are single integers. Each of these iterators has 0, 1 or 2 arguments. The two optional arguments are the integer bounds considered for the iteration: “IdMin” and “IdMax”.
Two iterators loop on the nodes defining an element:
These two iterators have one integer argument corresponding to the index of the element. They iterate on the integer indices of nodes.
Iterator “each_xdbRaw” is discussed in section III.1.1.10.7. Iterator “each_bdfCard’ allows to read the content of one (or several) BDF file(s), without trying to import the corresponding FEM entities in a NastranDb database. This is a singleton method, which means that the method is to be called directly from NastranDb class. The arguments of the method are the same as those of “readBdf” method described in section III.1.1.1:
A String containing the name of the main Nastran Bulk Data File.
An Array of Strings containing the list of directories in which files specified by “include” statements shall be searched. Its default value is a void Array.
The name of an extension that may be added to the file names specified in include statements. Its default value is a void String. (This argument corresponds to the jidtype in Nastran.)
A Hash with String keys and values corresponding to the list of “symbols” that can be used in “include” statements in the Bulk Data Files. The default value is a void Hash.
A Logical that specifies verbosity for the scanning of the Nastran Bulk Data File. Its default value is “false”. This parameter is redundant with “setVerbosityLevel” of “Post” Module: to set the parameter to “true” is equivalent to set “Post” verbosity level to 1.
A Logical that specifies whether the file contains only Bulk Data Section lines. Its default value is “false”. If the parameter is “true”, the “BEGIN BULK” and “ENDDATA” lines are ignored, and all the input lines, except comments, are interpreted. (See also the remarks below.)
For example, the iterator can be used as follows:
NastranDb.each_bdfCard("../../MODEL/MAINS/unit_xyz.bdf") do |crd| puts crd end