On 7/9/25 23:40, Md Mahmudul Islam wrote:
Hope this email finds you all well. I am working on NSE flow. I wrote my code in parallel following step-55. I could compile the code, but when I run the code I get this following error of ghost elements:

An error occurred in line <941> of file </usr/src/dealii-v9.6.0/include/deal.II/lac/petsc_vector_base.h> in function

const dealii::PETScWrappers::internal::VectorReference& dealii::PETScWrappers::internal::VectorReference::operator+=(const PetscScalar&) const

The violated condition was:

!vector.has_ghost_elements()

Additional information:

You are trying an operation on a vector that is only allowed if the

vector has no ghost elements, but the vector you are operating on does

have ghost elements.

Specifically, there are two kinds of operations that are typically not

allowed on vectors with ghost elements. First, vectors with ghost

elements are read-only and cannot appear in operations that write into

these vectors. Second, reduction operations (such as computing the

norm of a vector, or taking dot products between vectors) are not

allowed to ensure that each vector element is counted only once (as

opposed to once for the owner of the element plus once for each

process on which the element is stored as a ghost copy).

I think that the error message is actually quite clear. It explains what the problem is, and at the top it also says which function causes trouble. Which part is not clear to you, and what stops you from fixing the issue yourself?

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/f27e9cb4-be79-429c-a98f-a059ca094114%40colostate.edu.

Reply via email to