Skip to content

Improve on-demand quantities and make the current an on-demand quantity

Sebastian Ohlmann requested to merge improve_ondemand_quantities into main

Description

The update condition for on-demand quantities missed a condition for the case that the partner is on a longer timestep than the system itself - in this case, a deadlock occurred because the on-demand quantity was only updated at a time were the interaction cannot be updated anymore. Now there is an additional condition that allows on-demand quantities to get ahead by one step if retarded interactions are allowed. With this, the clocks are updated correctly.

Moreover, the clock comparisons did exact floating point comparisons which leads to problems with the finite floating point precision. Equality is now tested with a certain relative tolerance and the other comparisons are adjusted accordingly.

The current is now an on-demand quantity for both maxwell and charged particles with its clock and update being handled through the framework.

Checklist

  • I have checked that my code follows the Octopus coding standards
  • I have added tests for all the new features added in this request.

Merge request reports