Lack of update of discretization parameters
jwboth opened this issue · comments
The routine set_discretization_parameters()
is only executed during prepare_simulation
in SolutionStrategy
. This leads to missing update of relevant parameters. An example scenario, which results in unwanted behavior is md-poromechanics. The change in aperture / specific_volume is not communicated to the second_order_tensor
, thus the flux discretization matrix associated to lower-dimensional objects does not account for changes in aperture. To me it seems (just an opinion) that it should not be the responsibility of the user to use inheritance and update the discretization parameters.
A simple solution for mitigating this effect is part of PR #839 . There, set_discretization_parameters()
is part of discretize().
Side info. In this PR on restarting models, it was indeed required to update the flux matrix, to allow for a successful integration test. Obviously, redundant updates are included, though note that the cost for the creation of discretization matrices exceeds the cost for updating the discretization parameters.