Nektar++
|
HDF5 data source using H5 reader utilities.
on HDF5-based FLD files.
This class implements a HDF5 reader/writer based on MPI/O that is designed to operate on a single file across all processors of a simulation. The definition follows vaguely similar lines to XML output but is stored somewhat differently to accommodate parallel reading and writing. At a basic level metadata is organised as follows:
/NEKTAR
group.Metadata
group to contain field metadata that is written.We then define five data sets to contain field data:
DATA
dataset contains the double-precision modal coefficient data.IDS
dataset contains the element IDs of the elements that are written out.POLYORDERS
dataset is written if the field data contains variable polynomial order, and contains the (possibly hetergeneous) mode orders in each direction for each of the elements.HOMOGENEOUSZIDS
dataset contains the IDs of z-planes for homogeneous simulations, if the data are homogeneous.HOMOGENEOUSYIDS
dataset contains the IDs of y-planes for homogeneous simulations, if the data are homogeneous.HOMOGENEOUSSIDS
dataset contains the strip IDs for homogeneous simulations, if the data are homogeneous and use strips.The ordering is defined according to the DECOMPOSITION
dataset. A ‘decomposition’ in this class is essentially a single field definition with its accompanying data. Data are written into each dataset by the order of each decomposition. Each decomposition contains the following seven integers that define it per field definition per processor:
DATA
array for this field definition (index #VAL_DCMP_IDX)POLYORDERS
array for this field definition (index #ORDER_DCMP_IDX)HOMOGENEOUSZIDS
array (index #HOMZ_DCMP_IDX).HOMOGENEOUSYIDS
array (index #HOMY_DCMP_IDX).HOMOGENEOUSSIDS
array (index #HOMS_DCMP_IDX).The number of decompositions is therefore calculated as the field size divided by #MAX_DCMPS which allows us to calculate the offsets of the data for each field definition within the arrays.
XML data source using TinyXML.
on XML FLD files.
This class is the default for Nektar++ output. It reads and writes one XML file per processor that represents the underlying field data. For serial output, the format of an XML file obeys the following structure:
<Metadata>
tag.In parallel, each process writes its contributions into an XML file of the form P0000001.fld
(where 1 is replaced by the rank of the process) inside a directory with the desired output name. These files only include the ELEMENT
data. Metadata are instead stored in a separate Info.xml
file, which contains the Metadata and additional tags of the form
<Partition FileName="P0000000.fld"> ID list </Partition>
The ID list enumerates all element IDs on each partition's contribution. For large parallel jobs, this is used to avoid each process reading in every single partition in order to load field data.