Hello, I want to use dolfinx_mpc to impose periodic boundary condition to solve the Poisson equation, but I got some PETSC ERROR
I define my linear and bilinear forms as follows:
create the mesh and function space
The periodic condition and relation are defined here
Then I create the MPC as follows(maybe it is not correct
and when I tried to assemble the matrix:
I get error, the error message is
and
It seems like the way I assemble the matrix causes the error, the problems may be within here:
la::petsc::Matrix::set_block_fn(A.mat(), ADD_VALUES)
la::petsc::Matrix::set_fn(A.mat(), ADD_VALUES)
is there anyone know how to solve this issue? Thanks very much!