Compressor: field compression module
Version: 2.5 (20/09/2017)
Author: Onera
Preamble
Compressor enables fields compression for arrays/pyTrees.
To use it with the Converter array interface, you must import the
Compressor module:
import Compressor
Then, in the following, a is an array, and A a list of arrays.
To use it with the pyTree interface, you must import the module:
import Compressor.PyTree as Compressor
Then, in the following, a is a zone node and A is a list of zone nodes
or a complete pyTree.
Index field compression
Compressor.deltaIndex:
compress a list of indices using delta algorithm. Delta contains
the number of added indices in a when compared to ref,
the list of added indices, the
number of suppressed indices, the list of suppressed indices:
delta = Compressor.deltaIndex(a, ref)
Example of use: compress a list of indices.
Object serializer/compressor
Compressor.pack:
serialize/compress a python object a. This is a general interface
to msgpack/pickle module:
b = Compressor.pack(a)
Example of use: serialize a python object.
Compressor.unpack:
deserialize/decompress a serialized stream b. This is a general interface
to msgpack/pickle module:
a = Compressor.unpack(b)
Example of use: deserialize a stream.
Return to main userguide
Index field compression
Compressor.deltaInterpolations:
compress a list of interpolation data (interpolated and donor points, periodicity, interpolation coefficients) for a donor block, using delta algorithm. Delta contains
the Id of interpolated blocks, the number of modified interpolations data by interpolated blocks in a when compared to ref,
the list of modified interpolation data. The function is called for a given location (cell center or face center):
delta = Compressor.deltaInterpolations(a, ref, loc)
Example of use: compress a list of interpolation data.