Re: [deal.II] Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-13 Thread Konrad Simon
> > 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

Re: [deal.II] Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-13 Thread Wolfgang Bangerth
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

Re: [deal.II] Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-12 Thread Konrad Simon
> > I suspect you are passing a fully distributed vector to that function, but > it > needs to read ghost elements of the vector. Have you tried copying the > vector > into a locally_relevant vector, and passing that to the function in > question? > Thank you, Wolfgang, that was the issue.

Re: [deal.II] Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-11 Thread Wolfgang Bangerth
On 1/10/21 12:43 PM, Konrad Simon wrote: ). Using one MPI rank is fine but if I use more I get the error "An error occurred in line <666> of file in function    dealii::TrilinosScalar dealii::TrilinosWrappers::MPI::Vector::operator()(dealii::TrilinosWrappers::MPI::Vector::size_type) const

[deal.II] Mean value of component of TrilinosWrappers::MPI::BlockVector

2021-01-10 Thread Konrad Simon
Dear all, I am trying to compute the mean value of the pressure component of a Trilinos block vector with three blocks and 7 components (vorticity-velocity-pressure). Using one MPI rank is fine but if I use more I get the error "An error occurred in line <666> of file in function