i have a problem as follow
\nabla p = f
where p is a scalar and f is 2\times 1 vector
the boundary condition of p is p_bc
I want to know whether my Fenics form is right
my form: inner(grad(p), V)*dx - inner(f,V) = 0
THE SYSTEM TOLD ME THAT:
*** -------------------------------------------------------------------------
*** Error: Unable to set given (local) rows to identity matrix.
*** Reason: some diagonal elements not preallocated (try assembler option keep_diagonal).
*** Where: This error was encountered inside PETScMatrix.cpp.
*** Process: 0
COULD YOU TELL ME HOW TO MAKE MY FORM CORRECT.