Skip to content

Backward compatible python module

Eskil Vik requested to merge feature/backward-compatible-python-module into master

Implements a python module designed to be backward compatible with inputs and outputs from the compiled c++ executables.

The implemented module is called the following command line command:
python3 -m IW2D.legacy <mode> <path-to-input-file>
is either 'roundchamber' or 'flatchamber' (without quotation marks), and the input file has the same format as those used for the C++ executables.

Running the command generates a set of .dat files with the outputs in the current directory.

Currently you might be unable to call the command from anywhere else than the root directory, I'm still figuring out how packages actually work.

The wake function scripts will also be implemented similarly in the future.

Some changes had to be made to the c++ code itself for cppyy to be able to compile it. The two main changes has been to store a lookup table of matrix calculation results in a struct passed as a function argument instead of as mutable global variables, and to rename Precision to PRECISION to avoid name conflicts.

A (somewhat quick and dirty) script for comparing results from c++ executables and the new module is posted below.

Edited by Eskil Vik

Merge request reports

Loading