On 1/12/21 9:18 AM, Konrad Simon wrote:
>
> Thank you, Wolfgang, that was the issue. I am using the mean value function
> at several different places in my code. One of them is inside a preconditioner
> vmult that accepts only a fully distributed vector. Is there also a simple
> workaround?
Then you need to create a vector with locally relevant entries as ghosts and
copy your fully distributed vector to it. There is no other way if you want to
use that function.
But if your goal is to fix the pressure in a Stokes problem, it doesn't have
to be the integral mean of the pressure that is zero. It could just be the
arithmetic mean, which you can compute without access to ghost elements.