As far as Results extraction is concerned, the behaviour of HDF read or attachment functions is very similar to the behaviour of corresponding XDB functions. For example in “RUBY/EX27/readHdf5.rb” script, one prints characteristics of Results obtained from an HDF attachment and from different superelements with the following instructions:
printf("\n\n E) Getting Attachment results from all databases : \n\n")
seIds.each do |seId|
currentDb=nil
if seId>0 then
currentDb=db.getSuperElementFromId(seId)
else
currentDb=db
end
printf("currentDb.SEID = %d\n",currentDb.SEID)
lcNames.each do |lcName|
scNames.each do |scName|
resNames.each do |resName|
h=currentDb.getHdfAttachmentResults(hdfName,lcName,scName,resName)
if (h) then
h.each do |key,res|
str1,str2,str3=key
$stdout.printf("E) SEID %d - %s - %s - %s : %d\n",currentDb.SEID,str1,str2,str3,res.Size)
end
end
end
end
end
end
Superelements can also be read from the HDF file using method “readFemFromHdf” in NastranDb class. (Description of the method is given in section III.1.1.3.) An illustration of this is given in “RUBY/EX37/readHdfWithSE.rb” script. In that example, the residual FEM and the superelements are read with the following instructions:
hdfPath="../../MODEL/OTHER_EXECS/msc_seug_chapter2_Jet/jet101_op2_b.h5" db.readFemFromHdf(hdfPath,true,true)