orderfix

reorder solutions of parametric studies to make continuous curves


Keywords
cython, eigenvalues, numpy, postprocessing, python, python2, python27, python3, python34
License
BSD-3-Clause
Install
pip install orderfix==0.1.0

Documentation

Example

Figure. Orderfix applied to an example problem. Legend: gray = before, black = after.

orderfix

Reorder solutions of parametric studies (assumed to be in random order) to make continuous curves.

The common use case is postprocessing of numerically computed eigenvalues from parametric studies of linear PDE boundary-value problems. The ordering of the numerically computed eigenvalues may suddenly change, as the problem parameter sweeps through the range of interest.

The reordering allows the plotting of continuous curves, which are much more readable visually than scatterplots of disconnected points.

The simple distance-based algorithm implemented here may fail in regions where the solutions cluster closely together, but for the most part of the data, it usually works well.

For a discussion of this issue and some more algorithms, see Jeronen (2011), On the mechanical stability and out-of-plane dynamics of a travelling panel submerged in axially flowing ideal fluid: a study into paper production in mathematical terms, Jyväskylä Studies in Computing 148, University of Jyväskylä, ISBN 978-951-39-4596-1.

Usage summary

Basically:

import orderfix
orderfix.fix_ordering(data)

See test.py for a usage example, complete with test data generation.

Installation

From PyPI

Install as user:

pip install orderfix --user

Install as admin:

sudo pip install orderfix

From GitHub

As user:

git clone https://github.com/Technologicat/orderfix.git
cd orderfix
python setup.py install --user

As admin, change the last command to

sudo python setup.py install

Dependencies

License

BSD. Copyright 2016-2017 Juha Jeronen and University of Jyväskylä.

Acknowledgement

This work was financially supported by the Jenny and Antti Wihuri Foundation.