Dear Wolfgang,
Thank you very much for your message.
Is there a different between how DynamicSparsityPatterns and 
BlockDynamicSparsityPatterns behave?
When you look at step-40, which is the first "MPI" step, the way the 
sparsity pattern is made is (
https://dealii.org/current/doxygen/deal.II/step_40.html#LaplaceProblemsetup_system
)
DynamicSparsityPattern 
<https://dealii.org/current/doxygen/deal.II/classDynamicSparsityPattern.html> 
dsp(locally_relevant_dofs);
 DoFTools::make_sparsity_pattern 
<https://dealii.org/current/doxygen/deal.II/group__constraints.html#gad93530ee35c780e9ef7bc5e4856039df>
(dof_handler, dsp, constraints, false);
 SparsityTools::distribute_sparsity_pattern 
<https://dealii.org/current/doxygen/deal.II/namespaceSparsityTools.html#ae2c7bdbdb62642f60d60087e4cb6195f>
(
   dsp,
   dof_handler.n_locally_owned_dofs_per_processor(),
   mpi_communicator,
   locally_relevant_dofs);

My understanding was that you were only making the sparsity pattern for 
your own locally relevants dofs and the distribution step would make sure 
that everything was coherent. However, the sparsity pattern is made in a 
completely different way in step-32 (
https://dealii.org/current/doxygen/deal.II/step_32.html) and the 
TrilinosWrappers:BlockSparsityPattern is used.

Consequently, I was a bit confused as to the difference between these 
approaches. It seems like the second one is necessary for Block matrices?
I will take a deeper look into this, but I must say my understanding of 
that point right now is relatively poor :(
Thanks!
Bruno




On Friday, 30 August 2019 23:41:05 UTC-4, Wolfgang Bangerth wrote:
>
>
> Bruno, 
> I don't quite recall if we ever used the BlockDynamicSparsityPattern in a 
> parallel context. For sure, the way you're initializing it implies that 
> every 
> process allocates the memory for all DoFs as it's not given the 
> information 
> about locally_relevant_dofs. I'd have to look up whether there is a way to 
> do 
> that. On the other hand, I would assume that the Trilinos version has a 
> way to 
> designate what are the locally relevant dofs on each process. 
>
> Best 
>   W. 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth          email:                 bang...@colostate.edu 
> <javascript:> 
>                             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/3d5e5349-ef9a-4a8e-8922-bcd3256caa08%40googlegroups.com.

Reply via email to