Download diploma document - saces :: Full Release

Transcript
saces
6 The Internals of the tool ‘saces’
The SNAPSHOT Record (Nybble 3)
The SNAPSHOT record contains the count of all particles, then for each particle
its particle class index and six floating-point numbers; three for the position and
three for the velocity. It is a very big record. For 1000 particles, 16 + 4 + (4 · 7 ·
1000) + 4 = 28020 + 4 bytes (or more than 27 kilobytes) are written.
The
‘Snapshot’ button causes such a snapshot to be saved to the binary log,
where it can be converted to text and be processed by other software.
The HISTOGRAM Record (Nybble 4)
Speed histograms show how particle speeds are distributed. The record has four
floating point values for the minimum, average and maximum speed and for
the top speed of the histogram. Maximum particle speed and upper limit of
the histogram do not need to coincide. Then the number of histogram speed
subdivisions and the number of particles in the speed subdivisions are written.
Suppose there are 10 subdivisions between speed zero and histogram top, then
16 + 4 · 4 + 4 + (4 · 10) + 4 = 80 bytes (including 4 bytes of padding) are written.
The PROPERTY Records (Nybbles d, e and f)
A name-value pair can be written to the binary log. The name is written by the
method writeUTF(). After the name the value follows. It can be of type int, float
or String, depending on the record type. Padding is also applied here.
The simulation process can write any data to the binary logger. Especially the
PROPERTY records are flexible and the data is easily identified by its name. The
partitioning algorithm, for example, writes how many partitions were requested,
the number of partitions for each dimension and the estimated average particle
count per partition as five PROPERTY records with the names “RequestedPartitionCount”, “PartitionCount[X]”, “PartitionCount[Y]” “PartitionCount[Z]” and
“AverageParticleCountPerPartition”.
78