Dear all,
I have an issue where I use MPC to ensure periodic boundary constraints on a square domain, and the solution must have zero mean over the domain. I would like to combine the linear solver of MPC with a real_function_space, but I cannot find the equivalent of the dolfinx.fem.petsc.assemble_matrix_block
function in MPC.
I worked around the issue by using the MPC solver and adding a null space. At the end, I subtracted the mean of the function. However, I cannot do this now because I have a problem where the linear form depends directly on the test function and not on its gradient. Therefore, I want to ensure that the test function is chosen in a zero-mean space from the beginning.
Is there a way to do this?
Thanks in advance!