Skip to content

WIP: wence/feature/fielddecomposition hook

Lawrence Mitchell requested to merge wence/feature/fielddecomposition-hook into master

A first attempt at addressing #413.

This seems to fix the problem for us.

  • I need to write a test that exercises this setup in PETSc. Any suggestion on which one is a good one to start with?

  • I can't figure out how one should clean up the hooks on the coarse grids. Is the idea that we just call remove hook in SNESDestroy and hope that the coarse DMs that are created are cleaned up and drop their hook lists?

In Firedrake, the approach I have is that when I have a hook to be called to move data I provide setup and a teardown callback. I save these in a trail of breadcrumbs on the "parent" DM, so when I start SNESSolve, I walk the breadcrumb trail and call the setup callbacks, then when I finish, I walk the trail and call the teardown.

Merge request reports