Hi Mustafa,

This does sound strange: BlockSparseMatrix::m() should return the number of 
rows of blocks (which is clearly 4 in your code).

Would it be possible for you to post a more complete code fragment that 
shows the problem? I cannot figure out where the problem is with what you 
posted.

Thanks,
David Wells

On Friday, December 14, 2018 at 8:41:10 AM UTC-5, Mustafa Aggul wrote:
>
> Hello,
> I have created my own block sparsity pattern by adding non-zero entries 
> manually, and then compressed it. Upon some testings on this sparsity 
> pattern, I have realized that it is indeed created correctly, in terms of 
> dimension and number of elements it has. However, the system matrix that I 
> initialized with this sparsity pattern looks empty (system_matrix.m() = 0). 
> What would be the possible reason for this?
> Thanks for any response in advance,
>
> sparsity_pattern.reinit(4,4);
>
> if(something happens)
> sparsity_pattern.block(0,0).add(local_dof_indices1[i],local_dof_indices2[j]); 
> //these kind of operations
> sparsity_pattern.compress();
> system_matrix.reinit(sparsity_pattern);
>
> -- 
> *Mustafa Ağgül*
> *Department of Mathematics*
> *Michigan Technological University*
> *1400 Townsend Drive*
> *Houghton, Michigan 49931-1295*
> *Tel: 906-487-3135*
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to