On 10/21/19 2:20 PM, Matteo Frigo wrote: > > I have figured out what the trouble is. I notice that the dimensions > stored in "dofs_per_block" are the global number of dof per each block. > Hence, the constructor "BlockDynamicSparsityPattern dsp" allocates for > each block a std::vector<line> with the size equal to the global dof > number of the respective block.
Oh, doh, yes. I had looked at your code for a minute and thought about that line, but didn't see the problem that you're not writing DynamicSparsityPattern dsp(dofs_per_block, dofs_per_block); but BlockDynamicSparsityPattern dsp(dofs_per_block, dofs_per_block); Indeed, the constructor arguments should of course be the number of blocks, not the number of DoFs! 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 on the web visit https://groups.google.com/d/msgid/dealii/46583fe4-dd41-dca3-8d89-9dc76d667c7e%40colostate.edu.
