Commit 2a483789 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Documentation of Arh2 file format ver. 3.0 added

parent 73a0434e
......@@ -6,8 +6,16 @@
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{bigdelim}
\usepackage{bigstrut}
\usepackage[left=1.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\newcommand{\for}{$\triangleright$ \texttt{FOR} }
\newcommand{\first}[1]{\multicolumn{2}{l|}{#1}}
\newcommand{\second}[1]{\multicolumn{3}{l|}{#1}}
\newcommand{\third}[1]{\multicolumn{4}{l|}{#1}}
\author{Simon Praetorius}
\date{2015-03-02}
......@@ -50,58 +58,72 @@ The ARH2 file format consists of three sections:
\end{enumerate}
The concrete structure is given in the table below:
\begin{longtable}{p{.2\textwidth}|p{.12\textwidth}|p{.1\textwidth}|p{.58\textwidth}}
\textbf{Field} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline\endfirsthead
\textbf{Field} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline
\multicolumn{4}{r}{\textit{(Continued from last page)}}\\\endhead
\multicolumn{4}{r}{\textit{(Continued on next page)}}\\\endfoot
\multicolumn{4}{r}{\textit{(End of header)}}\\\endlastfoot
fd & 4 & string & Format descriptor (lower case) [\texttt{sarh}] \\
maj & 1 & uchar & major version [3] \\
min & 1 & uchar & minor version [0] \\\hline
hs & 4 & uint & header size \\
dow & 4 & uint & dimension of world \\
dim & 4 & uint & dimension of the mesh \\
\#fes & 4 & uint & number of Finite Element spaces \\
\#vec & 4 & uint & number of value vectors \\
\#el & 4 & uint & number of macro elements \\
cps & 4 & int & compression flag: \texttt{0}: no compression, \texttt{1}: ZLib compression\footnote{Details of ZLib Version, Parameters etc.} \\
\multicolumn{4}{l}{~}\\
\multicolumn{4}{l}{\for $i=0,\ldots,$\#el-1} \\\hline
\multicolumn{1}{|l|}{macro[i]$\rightarrow$index} & 4 & uint & global index of the macro element \\
\multicolumn{1}{|l|}{macro[i]$\rightarrow$pos} & 4 & uint & position of the macro description in this file \\
\multicolumn{1}{|l|}{macro[i]$\rightarrow$size} & 4 & uint & uncompressed size of the data block for the macro element \\\hline
index\_end & 4 & uint & index to indicate the end of the macro list [-1] \\
pos\_end & 4 & uint & size of the compressed file \\
size\_end & 4 & uint & (size of the uncompressed file $|$ 0)\footnote{This value is not needed, thus an arbitrary value could be stored.} \\\newpage
\multicolumn{4}{l}{\for $i=0,\ldots,$\#fes-1} \\\hline
\multicolumn{1}{|l|}{fe[i]$\rightarrow$ID} & 16 & string & ``\texttt{costum}'', or name of file with description of Finite Element in AFED format \\
\multicolumn{1}{|l|}{fe[i]$\rightarrow$DOFs/pos} & 16 & $4\times$uint & number of DOFs per position (vertex, edge, face, center) \\\hline
\multicolumn{4}{l}{~}\\
\multicolumn{4}{l}{\for $i=0,\ldots,$\#vec-1} \\\hline
\multicolumn{1}{|l|}{vec[i]$\rightarrow$nl} & 4 & uint & length of name \\
\multicolumn{1}{|l|}{vec[i]$\rightarrow$name} & nl & string & name of the value vector\\
\multicolumn{1}{|l|}{vec[i]$\rightarrow$fe} & 4 & uint & index of the fe it belongs to\\
\multicolumn{1}{|l|}{vec[i]$\rightarrow$type} & 4 & string & value-type descriptor: \texttt{[SU][IF][0-9]+}\footnote{regular expression: \texttt{[SU]} signed/unsigned, \texttt{[IF]} integer/float, \texttt{[0-9]+} number of bits (08/16/32/64)} default: \texttt{SF64}\\\hline
\newpage
\begin{longtable}{p{.01\linewidth}p{.18\linewidth}|p{.1\linewidth}|p{.09\linewidth}|p{.55\linewidth}}
&\textbf{Field} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline\endfirsthead
&\textbf{Field} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline
\multicolumn{5}{r}{\textit{(Continued from last page)}}\\\endhead
\multicolumn{5}{r}{\textit{(Continued on next page)}}\\\endfoot
\multicolumn{5}{r}{\textit{(End of header)}}\\\endlastfoot
\first{fd} & 4 & string & Format descriptor (lower case) [\texttt{sarh}] \\
\first{maj} & 1 & uchar & major version [3] \\
\first{min} & 1 & uchar & minor version [0] \\\hline
\first{hs} & 4 & uint & header size \\
\first{dow} & 4 & uint & dimension of world \\
\first{dim} & 4 & uint & dimension of the mesh \\
\first{\#fes} & 4 & uint & number of Finite Element spaces \\
\first{\#vec} & 4 & uint & number of value vectors \\
\first{\#el} & 4 & uint & number of macro elements \\
\first{cps} & 4 & int & compression flag: \texttt{0}: no compression, \texttt{1}: ZLib compression\footnote{Details of ZLib Version, Parameters etc.} \\\hline
& & & & \\
\first{\for $i=0,\ldots,$\#el-1} & & &\\
\ldelim[{3}{1mm} & macro[i]$\rightarrow$index & 4 & uint & global index of the macro element \\
& macro[i]$\rightarrow$pos & 4 & uint & position of the macro description in this file \\
& macro[i]$\rightarrow$size & 4 & uint & uncompressed size of the data block for the macro element \\
\first{index\_end} & 4 & uint & index to indicate the end of the macro list [-1] \\
\first{pos\_end} & 4 & uint & size of the compressed file \\
\first{size\_end} & 4 & uint & (size of the uncompressed file $|$ 0)\footnote{This value is not needed, thus an arbitrary value could be stored.} \\
& & & & \\
\first{\for $i=0,\ldots,$\#fes-1} & & &\\
\ldelim[{3}{1mm} & fe[i]$\rightarrow$ID & 16 & string & ``\texttt{costum}'', or name of file with description of Finite Element in AFED format \\
& fe[i]$\rightarrow$DOFs/pos & 16 & $4\times$uint & number of DOFs per position (vertex, edge, face, center) \\
& & & & \\
\first{\for $i=0,\ldots,$\#vec-1} & & & \\
\ldelim[{4}{1mm} & vec[i]$\rightarrow$nl & 4 & uint & length of name \\
& vec[i]$\rightarrow$name & nl & string & name of the value vector\\
& vec[i]$\rightarrow$fe & 4 & uint & index of the fe it belongs to\\
& vec[i]$\rightarrow$type & 4 & string & value-type descriptor: \texttt{[SU][IF][0-9]+}\footnote{regular expression: \texttt{[SU]} signed/unsigned, \texttt{[IF]} integer/float, \texttt{[0-9]+} number of bits (08/16/32/64)} default: \texttt{SF64}\\
& & & & \\\hline
\end{longtable}
\begin{longtable}{p{.2\textwidth}|p{.12\textwidth}|p{.1\textwidth}|p{.58\textwidth}}
\textbf{Field} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline\endfirsthead
\textbf{Field} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline
\multicolumn{4}{r}{\textit{(Continued from last page)}}\\\endhead
\multicolumn{4}{r}{\textit{(Continued on next page)}}\\\endfoot
\multicolumn{4}{r}{\textit{(End of body)}}\\\endlastfoot
\multicolumn{4}{l}{~}\\
\multicolumn{4}{l}{\for Macro[i], $i=0,\ldots,$\#el-1} \\\hline
\multicolumn{1}{|l|}{\#codes} & 4 & uint & number of structure codes \\
\multicolumn{1}{|l|}{\#bits} & 4 & uint & total number of bits for structure codes \\
\multicolumn{1}{|l|}{code-data} & $8\times$\#codes & uint & all structure codes \\
\multicolumn{4}{|l}{~}\\
\multicolumn{4}{|l}{\for $j=0,\ldots,$\#fes-1} \\\hline
\multicolumn{1}{||l|}{fe[j]: \#el\_val} & 4 & & number of values per vector in fespace \\
\multicolumn{4}{||l}{~}\\
\multicolumn{4}{||l}{\for $k=0,\ldots,$n-1} \\\hline
\multicolumn{1}{|||l|}{fe[j]$\rightarrow$data[k]} & $X\times$\#el\_val & & sequence of values, X: size of data-type (vec[*]$\rightarrow$type), n: number of value vector belonging to fe[j]. \\\hline
\begin{longtable}{p{.01\linewidth}p{.01\linewidth}p{.01\linewidth}p{.16\linewidth}|p{.1\linewidth}|p{.05\linewidth}|p{.53\linewidth}}
\third{\textbf{Field}} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline\endfirsthead
\third{\textbf{Field}} & \textbf{Size (B)} & \textbf{Type} & \textbf{Description} \\\hline\hline
\multicolumn{7}{r}{\textit{(Continued from last page)}}\\\endhead
\multicolumn{7}{r}{\textit{(Continued on next page)}}\\\endfoot
\multicolumn{7}{r}{\textit{(End of body)}}\\\endlastfoot
& & & & & & \\
\third{\for Macro[i], $i=0,\ldots,$\#el-1} & & &\\
\ldelim[{10}{1mm} & \second{\#codes} & 4 & uint & number of structure codes \\
& \second{\#bits} & 4 & uint & total number of bits for structure codes \\
& \second{code-data} & $8\times$\#codes & uint & all structure codes \\
& & & & & & \\
& \second{\for $j=0,\ldots,$\#fes-1} & & & \\
& \ldelim[{5}{1mm} & \first{\#el\_val} & 4 & & number of values per vector in fespace fe[j] \\
& & & & & & \\
& & \first{\for $k=0,\ldots,$n-1} & & & \\
& & \ldelim[{2}{1mm} & data[k] & $X\times$\#el\_val & & sequence of values, X: size of data-type (vec[i(j,k)]$\rightarrow$type), n: number of value vector belonging to fe[j].\\
& & & & & & \\\hline
\end{longtable}
\end{document}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment