On 10/15/19 1:55 AM, Mauro Murer wrote:
> s in the system matrices.
> All went well until I tried to implement a mesh refinement.
> In particular, when I assemble the gradient operator after the refinement of 
> the mesh (increasing the dof of the problem), this error occurs when 
> "distribute_local_to_global" function is called:
> 
> *The violated condition was:
>      (this_cols[counter] == col_indices[i]) || (values[i] == number2())
> Additional information:
> You are trying to access the matrix entry with index <35518,4519>, but this 
> entry does not exist in the sparsity pattern of this matrix.
> 
> The most common cause for this problem is that you used a method to build the 
> sparsity pattern that did not (completely) take into account all of the 
> entries you will later try to write into. An example would be building a 
> sparsity pattern that does not include the entries you will write into due to 
> constraints on degrees of freedom such as hanging nodes or periodic boundary 
> conditions. In such cases, building the sparsity pattern will succeed, but 
> you 
> will get errors such as the current one at one point or other when trying to 
> write into the entries of the matrix.*
> 
> 
> I found in the documentation the "add_entries" command, in such a way to add 
> the matrix entry in the sparsity pattern, but I don't know if it is the right 
> way to proceed. Any suggestions???

You need to take constraints into account when you build the sparsity pattern 
but I believe from your screen shot that you don't. Take a look at step-6, for 
example:
   https://github.com/dealii/dealii/blob/master/examples/step-6/step-6.cc#L225

Best
  W.

-- 
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                            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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3efefd13-6554-9fb3-fd7e-b6bf230d4b00%40colostate.edu.

Reply via email to