Homec4science

remove need for static class member variables in Dump and Irregular

Authored by Axel Kohlmeyer <akohlmey@gmail.com> on Jun 15 2017, 05:10.

Description

remove need for static class member variables in Dump and Irregular

The dump and irregular classes were using qsort() from the C-library
for sorting lists through custom comparison functions, which required
access to additional data, which was passed via static class variables,
i.e. globals. This collides with having multiple LAMMPS instances in
the same address space.

the calls to qsort() are replaced with a custom merge sort, which passes
a void pointer to the comparison functions, which can contain any kind
of desired information, e.g. a class handle or a list

Details

Committed
Axel Kohlmeyer <akohlmey@gmail.com>Jun 15 2017, 05:10
Pushed
jungeOct 19 2017, 09:53
Parents
rLAMMPS286d4f2743f8: Merge pull request #506 from lammps/snap
Branches
Unknown
Tags
Unknown

Event Timeline

Axel Kohlmeyer <akohlmey@gmail.com> committed rLAMMPS1f17e8ebbbaf: remove need for static class member variables in Dump and Irregular (authored by Axel Kohlmeyer <akohlmey@gmail.com>).Jun 15 2017, 05:10