firedrakeproject / asQ

A library for implementing ParaDIAG timestepping algorithms using Firedrake
MIT License
4 stars 1 forks source link

Remove Riesz map in the preconditioner by using `firedrake.Cofunction` #149

Closed JHopeCollins closed 11 months ago

JHopeCollins commented 11 months ago

~Waiting on upstream PRs: fenics ufl#243 and either firedrake#3235 or firedrake#3241~

This PR changes the pc to use a Cofunction rhs to the block solvers. This means we can copy the diagonalised residual straight into the Cofunction instead of having to do a Riesz map solve into a Function to use as the rhs.

JHopeCollins commented 11 months ago

the pedant may complain that self.xfi and self.xfr should be Cofunctions as well.

I would have but cpx.{set,get}_{real,imag} doesn't work between Cofunctions with the complex_proxy.vector implementation (the default). I've opened an issue to fix it #151.