MPh-py / MPh

Pythonic scripting interface for Comsol Multiphysics
https://mph.readthedocs.io
MIT License
265 stars 67 forks source link

Fix missing time steps when evaluating parameter sweeps #113

Closed john-hen closed 1 year ago

john-hen commented 1 year ago

In parametric sweeps where the number of time steps depends on the parameter, the number of time steps returned always corresponded to the first outer solution, i.e. the first parameter value. In evaluations of other outer solutions, the additional time steps were then missing. See issue #112.

We now use an EvalGlobal feature instead of a Global evaluation feature, and call computeResult instead of getData. This fixes the issue, though it is not clear (to me) from the Comsol API documentation why the two feature types and method calls behave differently.

https://doc.comsol.com/6.1/doc/com.comsol.help.comsol/api/com/comsol/model/NumericalFeature.html