OpenPNM icon indicating copy to clipboard operation
OpenPNM copied to clipboard

Add back `remove` and `purge_object` methods

Open mkaguer opened this issue 2 years ago • 3 comments

These methods would have been handy for me recently. Would we consider adding these back? I ran into a situation where my algorithm was not running do to nans in the conductance model. It was a problem with the geometry. So to trouble shoot I wanted to export to paraview, but when I tried exporting the project I couldn't because the algorithm had not been run yet! (The reason why it can't export is because there is no alg.soln, which project_to_xdmf uses to see if it contains transient data or not.) So anyway I wanted to simply delete the algorithm and export without it but there was no way of doing this. But perhaps the problem is with how we check for transient data on our algs.

mkaguer avatar Aug 24 '22 13:08 mkaguer

Yes, I think as you mentioned yourself, the problem is how we check for transient data, so I'd say that needs to be refactored.

ma-sadeghi avatar Aug 24 '22 15:08 ma-sadeghi

I have actually fixed this sorta...the Transport alg now puts soln = {} on self during init, so this allows you to export even if the alg has not been run.

jgostick avatar Sep 21 '22 01:09 jgostick

I like that solution.

mkaguer avatar Sep 21 '22 12:09 mkaguer