firedrakeproject / asQ

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

Assemble the firedrake form in `AllAtOnceForm` into a cofunction. #176

Open JHopeCollins opened 6 months ago

JHopeCollins commented 6 months ago

AllAtOnceForm (aaoform) assembles the firedrake form aaoform.form into an AllAtOnceFunction called F (actually it assembles it into the firedrake Function F.function).

Really F should be a AllAtOnceCofunction but we can't currently do that because of the way we then apply boundary conditions to the residual: bc.apply(F.function, aaofunc.function) where aaofunc.function is the current state. If F.function is a fd.Cofunction then we get an internal firedrake error from bc.apply because of the argument type mismatch.

JHopeCollins commented 6 months ago

According to Pablo this should be achievable using:

fd.assemble(form, tensor=cofunction, bcs=bcs, zero_bc_nodes=True)

However this currently does nothing so well have to wait for it to be fixed.