Dear all, I have got a question about the time it takes to copy a *BlockDynamicSparsityPattern *into a* BlockSparsityPattern* using the *copy_from()*-function. In my special case I have a vector-valued 3D problem with trilinear finite elements. The system matrix is 3x3 block matrix with non-zero blocks (0,0), (0,2), (1,1), (1,2), (2,0), (2,1). I'm setting up the *BlockDynamicSparsityPattern *the following way:
BlockDynamicSparsityPattern dsp (3,3); dsp.block(0,0).reinit (ndofs_m, ndofs_m); dsp.block(0,1).reinit (ndofs_m, ndofs_s); dsp.block(0,2).reinit (ndofs_m, ndofs_bi); dsp.block(1,0).reinit (ndofs_s, ndofs_m); dsp.block(1,1).reinit (ndofs_s, ndofs_s); dsp.block(1,2).reinit (ndofs_s, ndofs_bi); dsp.block(2,0).reinit (ndofs_bi, ndofs_m); dsp.block(2,1).reinit (ndofs_bi, ndofs_s); dsp.block(2,2).reinit (ndofs_bi, ndofs_bi); dsp.collect_sizes(); After that I create the sparsity pattern for the (0,0) and the (1,1) block DoFTools::make_sparsity_pattern(dofhandler_m, dsp.block(0,0), constraints_m, false); DoFTools::make_sparsity_pattern(dofhandler_s, dsp.block(1,1), constraints_s, false); and then for the off-diagonal blocks make_offdiagonal_sparsity_pattern (dsp); The last thing is to copy the *BlockDynamicSparsityPattern *into a * BlockSparsityPattern sparsity_pattern.copy_from(dsp);*With regard to a lot of tutorial programms I would say that this is the usual way to work with *DynamicSparsityPatterns*, isn't it? So back to the question. Running the program the copy operation takes a huge amount of time. Just giving you some figures. With ndofs_m = 823875, ndofs_s = 1635075, ndofs_bi = 25155, meaning about 2.5 million dofs at all it takes about 10 hours and 50 minutes to copy the *BlockDynamicSparsityPattern *in contrast to an assembling time of 2 minutes and 38 seconds. So the question is if it is normal the copying operation taking so much time? And also whether there is way to increase the performance? By the way the program was compiled in release mode. Best regards Dustin -- 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.