MPh-py / MPh

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

Not all solutions returned from auxiliary sweep #104

Closed gyger closed 1 year ago

gyger commented 1 year ago

I observed a problem with returning all solutions from an Auxiliary Sweep, but I think it could also be happening by other sweeps.

I have two datasets in the model, where the first one has less inner solutions, than the second. When creating a global expression in model.evaluate the 'solnum' property is not updated after the dataset for the global expression is changed. This leads to only part of the results being returned as the array is not complete.

One solution could be linked to the SolutionInfo, that contains the getIndices function, but I do not fully understand the parameters of this function yet.

john-hen commented 1 year ago

Hi. You could be on to something, but I can't really tell. Can you provide a way to reproduce the problem? Ideally, the reproducer would be based on the capacitor.mph model from the tutorial. Then add a second time-dependent dataset/study with a few more time steps (inner solutions). And then... what call to mph.evaluate() does "not return all solutions"?

john-hen commented 1 year ago

Probably fixed in MPh 1.2.2, see #112.