arh2_file_format.tex 7.17 KB
Newer Older
1
2
3
4
5
6
7
8
9
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{longtable}

10
11
\newcommand{\for}{$\triangleright$ \texttt{FOR} }

12
13
\author{Simon Praetorius}
\date{2015-03-02}
14
\title{File format description for ARH Version 3.0}
15
16
17
18

\begin{document}
\maketitle
\begin{abstract}
19
This document describes the AMDiS Refinement Hierarchy (ARH) File format, version 3.0. The file format includes a description of the refinement of mesh-elements and value containers for the degrees of freedom (DOFs) for a given Finite Element. The concrete definition of finite elements is thereby described in a separate file format (AMDiS Finite Element Description (AFED) ) given elsewhere.
20

21
Historically the ARH format is based on the format from 2010 by Thomas Witkowski and Florian Stenger.
22

23
Please send comments on ARH to the AMDiS form:\\ \url{https://fusionforge.zih.tu-dresden.de/forum/?group_id=11}\\or post the comments on the Wiki:\\
24
25
26
27
28
\url{https://fusionforge.zih.tu-dresden.de/plugins/mediawiki/wiki/amdis}
\end{abstract}

\section{Version history}
\begin{description}
29
\item[Version 3.0: March 02, 2015] The file descriptor is now \texttt{sARH} for sequential ARH file format, since a new file format for parallel data (pARH) is added. Definition and description of Finite Elements was restructured and extracted from the ARH file format and put into a new file format.
30

31
\item[Version 2.1: May 20, 2014] A zlib compression for the file was added.
32

33
\item[Version 2.0: November 29, 2013] First official release of the ARH version 2 file format. The format consists of two parts, the \textit{header} and the \textit{body}. The header contains the general information about the content in this file, the format version number, the header size, dimensions, a macro table, an simplified Finite Element description and a value table. The header is followed by body structure for each macro element, which includes mesh structure code and DOF value vectors. 
34
35
36
37

\item [Version 1.1, December 2010] Format description, as implemented in AMDiS.

\item[Version 1.0: July 29, 2010] First format description of original ARH file format. Implemented by MeshConv.
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
\end{description}

\section{The file format}
The ARH2 file format consists of three sections: 
\begin{enumerate}
\item The first section contains a file format descriptor and version informations. This can be used to distinguish between the old ARH format and the ARH2 format and all of its versions, i.e. test whether the reader supports the actual format.

\item The second part contains header information about the data stored in the file. This contains information about the dimension of the mesh and the elements, amount of data stored in the file and some flags concerning the data format and compression of the data.

\item The third part contains information about the macro-elements stored in the file, about the different finite elements spaces of the value vectors stored in the file and a list of the value vectors including addition information used to extract only parts of the data from file.

\item The last block contains for all macro element the structure code (an information how to refine a macro element) and all values stored on this macro element.
\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}}
54
55
56
57
58
\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
59
60
61
fd & 4 & string & Format descriptor (lower case) [\texttt{sarh}] \\
maj & 1 & uchar & major version [3] \\
min & 1 & uchar & minor version [0] \\\hline
62
hs & 4 & uint & header size \\
63
64
dow & 4 & uint & dimension of world \\
dim & 4 & uint & dimension of the mesh \\
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
\#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
\end{longtable}
87

88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
\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
105
106
107
\end{longtable}

\end{document}