BlockForestFile.h File Reference

Detailed Description

Description of the BlockForest save file format.

Author
Florian Schornbaum flori.nosp@m.an.s.nosp@m.chorn.nosp@m.baum.nosp@m.@fau..nosp@m.de

File Format

HEADER

BYTES DESCRIPTION
6 x ( 3 + sizeof(real_t) ) domain AABB
3 x 4 number of coarse/root blocks in each direction ( max 2^32 = 4 294 967 296 )
3 x 1 domain periodicity
1 block forest depth (= number of levels - 1)
1 treeIdDigits (= number of bits used for storing the tree ID [tree ID marker + tree index])
1 processIdBytes (= number of bytes required for storing process IDs)
1 insertBuffersIntoProcessNetwork? ( 0=no, 1=yes )
4 number of processes ( max 2^32 = 4 294 967 296 )

--> 23 + 6 x ( 3 + sizeof(real_t) ) BYTES

SUID MAPPING:

1 | number of SUIDs (= #SUIDs)

for each SUID:
1 | length of the UID identifier string
length-of-string | UID identifier string

--> 1 + #SUIDs + number-of-characters-of-all-identifiers-combined BYTES

How the mapping works:
SUID #1 is assigned bit #1 ( -> [...]0 0000 0001 )
SUID #2 is assigned bit #2 ( -> [...]0 0000 0010 )
SUID #3 is assigned bit #3 ( -> [...]0 0000 0100 )
...
For every block a bit mask containing information about all SUIDs (i.e., is the corresponding SUID set at this block?) is saved. -> The number of available SUIDs determines the size that is needed to store this bit mask (= SUID-mask-bytes). One byte is enough to hold 8 SUIDs, two bytes are enough to hold 16 SUIDs, ...

BLOCK DATA

for each process:
2 | number of blocks (can be '0' -> buffer process! - 2^16 = 65 536 )
if( number-of-blocks > 0 ):
for each block:
block-ID-bytes | ID of the block (the number of bytes required for storing the block ID largely depends on the size
of the simulation, the total number of blocks, and the number of refinement levels)
SUID-mask-bytes | state of the block = bit mask containing information about all SUIDs (see "How the mapping works" for SUIDs,
SUID-mask-bytes can be equal to 0 bytes if no SUIDs exist!)
2 | number of neighbor processes
for each neighbor process:
process-ID-bytes | process ID / rank of the neighbor process (one byte if there are less than 257 processes,
two bytes if there are less than 65 537 processes, ...)
#include "core/DataTypes.h"

Namespaces

 walberla
 \file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede.nosp@m.rik..nosp@m.henni.nosp@m.g@fa.nosp@m.u.de
 
 walberla::blockforest
 
 walberla::blockforest::internal
 

Variables

static const uint_t walberla::blockforest::internal::FILE_HEADER_SIZE = 6 * sizeof( real_t ) + 6 + 12 + 3 * 4 + 3 + 1 + 1 + 1 + 1 + 4