phaseField icon indicating copy to clipboard operation
phaseField copied to clipboard

Fix ownership issue for user inputs and pf tools

Open fractalsbyx opened this issue 4 months ago • 2 comments

In main, we construct a pde operator using user inputs, then construct a pde problem using user inputs and the pde operator. This isn't airtight design as one could supply different user inputs to each object; the internal pointers aren't guaranteed to be identical. This would be avoided if we don't allow the pde operator to have user inputs as a member. If we don't want to change that, another alternative would be to make the operator type a template for pde problem, that way the operators would be constructed inside pde problem, and this wouldn't be an issue. It would also declutter main a bit.

fractalsbyx avatar Aug 22 '25 17:08 fractalsbyx

In conjunction, if we want to remove user inputs or pf tools as members of pde operator, we would have to make pointers to them members of matrixfree operator and pass in the necessary info (namely current time and pf tools) into the operator through the compute_local calls.

fractalsbyx avatar Aug 22 '25 17:08 fractalsbyx

Templating the operator template would also remove the need to construct a second operator for floats.

fractalsbyx avatar Sep 04 '25 19:09 fractalsbyx